aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2016-12-23 02:42:26 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2016-12-23 02:42:26 +0100
commit9cc3d3ab21eb8b4766b71dffb04132184c754f7b (patch)
tree11ebefbc2a008c9479110177d97c346893ba4d82
parent7c5dea399b16341ead146cb86eb4f6cde031a12d (diff)
downloadbusybox-w32-9cc3d3ab21eb8b4766b71dffb04132184c754f7b.tar.gz
busybox-w32-9cc3d3ab21eb8b4766b71dffb04132184c754f7b.tar.bz2
busybox-w32-9cc3d3ab21eb8b4766b71dffb04132184c754f7b.zip
fix breakage found by mass one-applet builds
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--archival/bbunzip.c4
-rw-r--r--libbb/Kbuild.src1
-rw-r--r--libbb/appletlib.c32
-rw-r--r--libbb/update_passwd.c2
-rw-r--r--networking/libiproute/Kbuild.src3
-rw-r--r--networking/udhcp/Config.src2
-rw-r--r--networking/udhcp/Kbuild.src2
-rw-r--r--sysklogd/logread.c3
8 files changed, 29 insertions, 20 deletions
diff --git a/archival/bbunzip.c b/archival/bbunzip.c
index d5db4627f..60a837e22 100644
--- a/archival/bbunzip.c
+++ b/archival/bbunzip.c
@@ -9,8 +9,12 @@
9 9
10/* lzop_main() uses bbunpack(), need this: */ 10/* lzop_main() uses bbunpack(), need this: */
11//kbuild:lib-$(CONFIG_LZOP) += bbunzip.o 11//kbuild:lib-$(CONFIG_LZOP) += bbunzip.o
12//kbuild:lib-$(CONFIG_LZOPCAT) += bbunzip.o
13//kbuild:lib-$(CONFIG_UNLZOP) += bbunzip.o
12/* bzip2_main() too: */ 14/* bzip2_main() too: */
13//kbuild:lib-$(CONFIG_BZIP2) += bbunzip.o 15//kbuild:lib-$(CONFIG_BZIP2) += bbunzip.o
16/* gzip_main() too: */
17//kbuild:lib-$(CONFIG_GZIP) += bbunzip.o
14 18
15/* Note: must be kept in sync with archival/lzop.c */ 19/* Note: must be kept in sync with archival/lzop.c */
16enum { 20enum {
diff --git a/libbb/Kbuild.src b/libbb/Kbuild.src
index e426f3c7e..898a51a89 100644
--- a/libbb/Kbuild.src
+++ b/libbb/Kbuild.src
@@ -176,6 +176,7 @@ lib-$(CONFIG_TRACEROUTE6) += inet_cksum.o
176lib-$(CONFIG_UDHCPC) += inet_cksum.o 176lib-$(CONFIG_UDHCPC) += inet_cksum.o
177lib-$(CONFIG_UDHCPC6) += inet_cksum.o 177lib-$(CONFIG_UDHCPC6) += inet_cksum.o
178lib-$(CONFIG_UDHCPD) += inet_cksum.o 178lib-$(CONFIG_UDHCPD) += inet_cksum.o
179lib-$(CONFIG_DHCPRELAY) += inet_cksum.o
179 180
180# We shouldn't build xregcomp.c if we don't need it - this ensures we don't 181# We shouldn't build xregcomp.c if we don't need it - this ensures we don't
181# require regex.h to be in the include dir even if we don't need it thereby 182# require regex.h to be in the include dir even if we don't need it thereby
diff --git a/libbb/appletlib.c b/libbb/appletlib.c
index 9425c7bd4..ee8b4ec14 100644
--- a/libbb/appletlib.c
+++ b/libbb/appletlib.c
@@ -329,21 +329,6 @@ static struct suid_config_t {
329 329
330static bool suid_cfg_readable; 330static bool suid_cfg_readable;
331 331
332/* check if u is member of group g */
333static int ingroup(uid_t u, gid_t g)
334{
335 struct group *grp = getgrgid(g);
336 if (grp) {
337 char **mem;
338 for (mem = grp->gr_mem; *mem; mem++) {
339 struct passwd *pwd = getpwnam(*mem);
340 if (pwd && (pwd->pw_uid == u))
341 return 1;
342 }
343 }
344 return 0;
345}
346
347/* libbb candidate */ 332/* libbb candidate */
348static char *get_trimmed_slice(char *s, char *e) 333static char *get_trimmed_slice(char *s, char *e)
349{ 334{
@@ -568,7 +553,22 @@ static inline void parse_config_file(void)
568# endif /* FEATURE_SUID_CONFIG */ 553# endif /* FEATURE_SUID_CONFIG */
569 554
570 555
571# if ENABLE_FEATURE_SUID 556# if ENABLE_FEATURE_SUID && NUM_APPLETS > 0
557/* check if u is member of group g */
558static int ingroup(uid_t u, gid_t g)
559{
560 struct group *grp = getgrgid(g);
561 if (grp) {
562 char **mem;
563 for (mem = grp->gr_mem; *mem; mem++) {
564 struct passwd *pwd = getpwnam(*mem);
565 if (pwd && (pwd->pw_uid == u))
566 return 1;
567 }
568 }
569 return 0;
570}
571
572static void check_suid(int applet_no) 572static void check_suid(int applet_no)
573{ 573{
574 gid_t rgid; /* real gid */ 574 gid_t rgid; /* real gid */
diff --git a/libbb/update_passwd.c b/libbb/update_passwd.c
index 6255af492..95423d19b 100644
--- a/libbb/update_passwd.c
+++ b/libbb/update_passwd.c
@@ -180,6 +180,7 @@ int FAST_FUNC update_passwd(const char *filename,
180 if (!line) /* EOF/error */ 180 if (!line) /* EOF/error */
181 break; 181 break;
182 182
183#if ENABLE_FEATURE_ADDUSER_TO_GROUP || ENABLE_FEATURE_DEL_USER_FROM_GROUP
183 if (!name && member) { 184 if (!name && member) {
184 /* Delete member from all groups */ 185 /* Delete member from all groups */
185 /* line is "GROUP:PASSWD:[member1[,member2]...]" */ 186 /* line is "GROUP:PASSWD:[member1[,member2]...]" */
@@ -209,6 +210,7 @@ int FAST_FUNC update_passwd(const char *filename,
209 fprintf(new_fp, "%s\n", line); 210 fprintf(new_fp, "%s\n", line);
210 goto next; 211 goto next;
211 } 212 }
213#endif
212 214
213 cp = is_prefixed_with(line, name_colon); 215 cp = is_prefixed_with(line, name_colon);
214 if (!cp) { 216 if (!cp) {
diff --git a/networking/libiproute/Kbuild.src b/networking/libiproute/Kbuild.src
index c20e2fee8..056a58540 100644
--- a/networking/libiproute/Kbuild.src
+++ b/networking/libiproute/Kbuild.src
@@ -62,13 +62,16 @@ lib-$(CONFIG_FEATURE_IP_TUNNEL) += \
62lib-$(CONFIG_FEATURE_IP_RULE) += \ 62lib-$(CONFIG_FEATURE_IP_RULE) += \
63 ip_parse_common_args.o \ 63 ip_parse_common_args.o \
64 iprule.o \ 64 iprule.o \
65 libnetlink.o \
65 rt_names.o \ 66 rt_names.o \
67 rtm_map.o \
66 utils.o 68 utils.o
67 69
68lib-$(CONFIG_FEATURE_IP_NEIGH) += \ 70lib-$(CONFIG_FEATURE_IP_NEIGH) += \
69 ip_parse_common_args.o \ 71 ip_parse_common_args.o \
70 ipneigh.o \ 72 ipneigh.o \
71 libnetlink.o \ 73 libnetlink.o \
74 ll_addr.o \
72 ll_map.o \ 75 ll_map.o \
73 rt_names.o \ 76 rt_names.o \
74 utils.o 77 utils.o
diff --git a/networking/udhcp/Config.src b/networking/udhcp/Config.src
index c34c8d6f0..90fb313b5 100644
--- a/networking/udhcp/Config.src
+++ b/networking/udhcp/Config.src
@@ -16,7 +16,6 @@ config UDHCPD
16config DHCPRELAY 16config DHCPRELAY
17 bool "dhcprelay" 17 bool "dhcprelay"
18 default y 18 default y
19 depends on UDHCPD
20 help 19 help
21 dhcprelay listens for dhcp requests on one or more interfaces 20 dhcprelay listens for dhcp requests on one or more interfaces
22 and forwards these requests to a different interface or dhcp 21 and forwards these requests to a different interface or dhcp
@@ -25,7 +24,6 @@ config DHCPRELAY
25config DUMPLEASES 24config DUMPLEASES
26 bool "Lease display utility (dumpleases)" 25 bool "Lease display utility (dumpleases)"
27 default y 26 default y
28 depends on UDHCPD
29 help 27 help
30 dumpleases displays the leases written out by the udhcpd server. 28 dumpleases displays the leases written out by the udhcpd server.
31 Lease times are stored in the file by time remaining in lease, or 29 Lease times are stored in the file by time remaining in lease, or
diff --git a/networking/udhcp/Kbuild.src b/networking/udhcp/Kbuild.src
index 5ea77df06..fcb725fbc 100644
--- a/networking/udhcp/Kbuild.src
+++ b/networking/udhcp/Kbuild.src
@@ -15,7 +15,7 @@ lib-$(CONFIG_UDHCPD) += common.o packet.o signalpipe.o socket.o
15lib-$(CONFIG_UDHCPC) += dhcpc.o 15lib-$(CONFIG_UDHCPC) += dhcpc.o
16lib-$(CONFIG_UDHCPD) += dhcpd.o arpping.o 16lib-$(CONFIG_UDHCPD) += dhcpd.o arpping.o
17lib-$(CONFIG_DUMPLEASES) += dumpleases.o 17lib-$(CONFIG_DUMPLEASES) += dumpleases.o
18lib-$(CONFIG_DHCPRELAY) += dhcprelay.o 18lib-$(CONFIG_DHCPRELAY) += dhcprelay.o common.o socket.o packet.o
19 19
20lib-$(CONFIG_FEATURE_UDHCPC_ARPING) += arpping.o 20lib-$(CONFIG_FEATURE_UDHCPC_ARPING) += arpping.o
21lib-$(CONFIG_FEATURE_UDHCP_RFC3397) += domain_codec.o 21lib-$(CONFIG_FEATURE_UDHCP_RFC3397) += domain_codec.o
diff --git a/sysklogd/logread.c b/sysklogd/logread.c
index 5b999730a..1f0c6252d 100644
--- a/sysklogd/logread.c
+++ b/sysklogd/logread.c
@@ -11,7 +11,8 @@
11//config:config LOGREAD 11//config:config LOGREAD
12//config: bool "logread" 12//config: bool "logread"
13//config: default y 13//config: default y
14//config: depends on FEATURE_IPC_SYSLOG 14//WRONG: it should be compilable without SYSLOG=y:
15//WRONG: depends on FEATURE_IPC_SYSLOG
15//config: help 16//config: help
16//config: If you enabled Circular Buffer support, you almost 17//config: If you enabled Circular Buffer support, you almost
17//config: certainly want to enable this feature as well. This 18//config: certainly want to enable this feature as well. This