From 4bd0c2ab38a53d5ecc89eacc61b3291d4fe01d51 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sun, 4 Dec 2016 10:42:07 +0100 Subject: fix musl problem with dirname, now for all users of bb_make_directory() function old new delta bb_make_directory 412 419 +7 install_main 793 769 -24 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 7/-24) Total: -17 bytes Signed-off-by: Denys Vlasenko --- libbb/make_directory.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'libbb') diff --git a/libbb/make_directory.c b/libbb/make_directory.c index 89352ca1f..a6b7c28df 100644 --- a/libbb/make_directory.c +++ b/libbb/make_directory.c @@ -35,9 +35,20 @@ int FAST_FUNC bb_make_directory(char *path, long mode, int flags) char c; struct stat st; - /* Happens on bb_make_directory(dirname("no_slashes"),...) */ - if (LONE_CHAR(path, '.')) + /* "path" can be a result of dirname(). + * dirname("no_slashes") returns ".", possibly read-only. + * musl dirname() can return read-only "/" too. + * We need writable string. And for "/", "." (and ".."?) + * nothing needs to be created anyway. + */ + if (LONE_CHAR(path, '/')) return 0; + if (path[0] == '.') { + if (path[1] == '\0') + return 0; /* "." */ +// if (path[1] == '.' && path[2] == '\0') +// return 0; /* ".." */ + } org_mask = cur_mask = (mode_t)-1L; s = path; -- cgit v1.2.3-55-g6feb From 548620c18b1f0988dbeab1009788daf9f002e927 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 8 Dec 2016 12:24:48 +0100 Subject: randomconfig fixes Signed-off-by: Denys Vlasenko --- archival/bbunzip.c | 7 ++++++- archival/libarchive/Kbuild.src | 9 ++++++++- include/libbb.h | 12 ++++++++++-- libbb/Kbuild.src | 5 +++++ runit/sv.c | 2 +- 5 files changed, 30 insertions(+), 5 deletions(-) (limited to 'libbb') diff --git a/archival/bbunzip.c b/archival/bbunzip.c index 7d5402e8d..d5db4627f 100644 --- a/archival/bbunzip.c +++ b/archival/bbunzip.c @@ -9,6 +9,8 @@ /* lzop_main() uses bbunpack(), need this: */ //kbuild:lib-$(CONFIG_LZOP) += bbunzip.o +/* bzip2_main() too: */ +//kbuild:lib-$(CONFIG_BZIP2) += bbunzip.o /* Note: must be kept in sync with archival/lzop.c */ enum { @@ -190,7 +192,10 @@ int FAST_FUNC bbunpack(char **argv, return exitcode; } -#if ENABLE_UNCOMPRESS || ENABLE_BUNZIP2 || ENABLE_UNLZMA || ENABLE_UNXZ +#if ENABLE_UNCOMPRESS \ + || ENABLE_BUNZIP2 || ENABLE_BZCAT \ + || ENABLE_UNLZMA || ENABLE_LZCAT || ENABLE_LZMA \ + || ENABLE_UNXZ || ENABLE_XZCAT || ENABLE_XZ static char* FAST_FUNC make_new_name_generic(char *filename, const char *expected_ext) { diff --git a/archival/libarchive/Kbuild.src b/archival/libarchive/Kbuild.src index b159a786a..ad5c5c42d 100644 --- a/archival/libarchive/Kbuild.src +++ b/archival/libarchive/Kbuild.src @@ -48,16 +48,23 @@ lib-$(CONFIG_CPIO) += get_header_cpio.o lib-$(CONFIG_TAR) += get_header_tar.o unsafe_prefix.o lib-$(CONFIG_FEATURE_TAR_TO_COMMAND) += data_extract_to_command.o lib-$(CONFIG_LZOP) += lzo1x_1.o lzo1x_1o.o lzo1x_d.o +lib-$(CONFIG_UNLZOP) += lzo1x_1.o lzo1x_1o.o lzo1x_d.o +lib-$(CONFIG_LZOPCAT) += lzo1x_1.o lzo1x_1o.o lzo1x_d.o lib-$(CONFIG_LZOP_COMPR_HIGH) += lzo1x_9x.o lib-$(CONFIG_BUNZIP2) += open_transformer.o decompress_bunzip2.o +lib-$(CONFIG_BZCAT) += open_transformer.o decompress_bunzip2.o lib-$(CONFIG_UNLZMA) += open_transformer.o decompress_unlzma.o +lib-$(CONFIG_LZCAT) += open_transformer.o decompress_unlzma.o +lib-$(CONFIG_LZMA) += open_transformer.o decompress_unlzma.o lib-$(CONFIG_UNXZ) += open_transformer.o decompress_unxz.o +lib-$(CONFIG_XZCAT) += open_transformer.o decompress_unxz.o +lib-$(CONFIG_XZ) += open_transformer.o decompress_unxz.o lib-$(CONFIG_GUNZIP) += open_transformer.o decompress_gunzip.o +lib-$(CONFIG_ZCAT) += open_transformer.o decompress_gunzip.o lib-$(CONFIG_UNCOMPRESS) += open_transformer.o decompress_uncompress.o lib-$(CONFIG_UNZIP) += open_transformer.o decompress_gunzip.o unsafe_prefix.o lib-$(CONFIG_RPM2CPIO) += open_transformer.o decompress_gunzip.o get_header_cpio.o lib-$(CONFIG_RPM) += open_transformer.o decompress_gunzip.o get_header_cpio.o - lib-$(CONFIG_GZIP) += open_transformer.o lib-$(CONFIG_BZIP2) += open_transformer.o lib-$(CONFIG_LZOP) += open_transformer.o diff --git a/include/libbb.h b/include/libbb.h index bdafcf5a6..a42a2fba8 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -1191,8 +1191,16 @@ int bb_cat(char** argv); /* If shell needs them, they exist even if not enabled as applets */ int echo_main(int argc, char** argv) IF_ECHO(MAIN_EXTERNALLY_VISIBLE); int printf_main(int argc, char **argv) IF_PRINTF(MAIN_EXTERNALLY_VISIBLE); -int test_main(int argc, char **argv) IF_TEST(MAIN_EXTERNALLY_VISIBLE); -int kill_main(int argc, char **argv) IF_KILL(MAIN_EXTERNALLY_VISIBLE); +int test_main(int argc, char **argv) +#if ENABLE_TEST || ENABLE_TEST1 || ENABLE_TEST2 + MAIN_EXTERNALLY_VISIBLE +#endif +; +int kill_main(int argc, char **argv) +#if ENABLE_KILL || ENABLE_KILLALL || ENABLE_KILLALL5 + MAIN_EXTERNALLY_VISIBLE +#endif +; /* Similar, but used by chgrp, not shell */ int chown_main(int argc, char **argv) IF_CHOWN(MAIN_EXTERNALLY_VISIBLE); /* Used by ftpd */ diff --git a/libbb/Kbuild.src b/libbb/Kbuild.src index 52a90e9a1..7440974b0 100644 --- a/libbb/Kbuild.src +++ b/libbb/Kbuild.src @@ -132,6 +132,7 @@ lib-$(CONFIG_TFTPD) += udp_io.o lib-$(CONFIG_TCPSVD) += udp_io.o lib-$(CONFIG_UDPSVD) += udp_io.o lib-$(CONFIG_TRACEROUTE) += udp_io.o +lib-$(CONFIG_TRACEROUTE6) += udp_io.o lib-$(CONFIG_LOSETUP) += loop.o lib-$(CONFIG_FEATURE_MOUNT_LOOP) += loop.o @@ -156,6 +157,7 @@ lib-$(CONFIG_FEATURE_FTP_AUTHENTICATION) += pw_encrypt.o lib-$(CONFIG_DF) += find_mount_point.o lib-$(CONFIG_MKFS_MINIX) += find_mount_point.o lib-$(CONFIG_MKFS_EXT2) += find_mount_point.o +lib-$(CONFIG_MKE2FS) += find_mount_point.o lib-$(CONFIG_MKFS_REISER) += find_mount_point.o lib-$(CONFIG_FSCK_MINIX) += find_mount_point.o lib-$(CONFIG_MOUNT) += find_mount_point.o @@ -168,6 +170,7 @@ lib-$(CONFIG_MPSTAT) += get_cpu_count.o lib-$(CONFIG_POWERTOP) += get_cpu_count.o lib-$(CONFIG_PING) += inet_cksum.o +lib-$(CONFIG_PING6) += inet_cksum.o lib-$(CONFIG_TRACEROUTE) += inet_cksum.o lib-$(CONFIG_TRACEROUTE6) += inet_cksum.o lib-$(CONFIG_UDHCPC) += inet_cksum.o @@ -181,6 +184,8 @@ lib-$(CONFIG_UDHCPD) += inet_cksum.o lib-$(CONFIG_AWK) += xregcomp.o lib-$(CONFIG_SED) += xregcomp.o lib-$(CONFIG_GREP) += xregcomp.o +lib-$(CONFIG_EGREP) += xregcomp.o +lib-$(CONFIG_FGREP) += xregcomp.o lib-$(CONFIG_EXPR) += xregcomp.o lib-$(CONFIG_MDEV) += xregcomp.o lib-$(CONFIG_LESS) += xregcomp.o diff --git a/runit/sv.c b/runit/sv.c index 71865bd4f..9e2132259 100644 --- a/runit/sv.c +++ b/runit/sv.c @@ -175,7 +175,7 @@ Exit Codes //config: It is comaptible with daemontools command with the same name. //applet:IF_SV(APPLET(sv, BB_DIR_USR_BIN, BB_SUID_DROP)) -//applet:IF_SV(APPLET(svc, BB_DIR_USR_BIN, BB_SUID_DROP)) +//applet:IF_SVC(APPLET(svc, BB_DIR_USR_BIN, BB_SUID_DROP)) //kbuild:lib-$(CONFIG_SV) += sv.o //kbuild:lib-$(CONFIG_SVC) += sv.o -- cgit v1.2.3-55-g6feb From c6f35241b38ea0c9581409efcd83716b74918903 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 9 Dec 2016 18:30:30 -0500 Subject: selinux: drop deprecated headers The selinux guys want you to get class values at runtime by converting textual names into constants. Drop the deprecated headers and switch to the new format. This API has been around for years, so there shouldn't be an issue with backwards compatibility. Signed-off-by: Mike Frysinger --- include/libbb.h | 2 -- libbb/update_passwd.c | 13 ++++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'libbb') diff --git a/include/libbb.h b/include/libbb.h index a42a2fba8..2e9ea46e2 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -81,8 +81,6 @@ #if ENABLE_SELINUX # include # include -# include -# include #endif #if ENABLE_FEATURE_UTMP # if defined __UCLIBC__ && ( \ diff --git a/libbb/update_passwd.c b/libbb/update_passwd.c index a2004f480..6255af492 100644 --- a/libbb/update_passwd.c +++ b/libbb/update_passwd.c @@ -30,7 +30,18 @@ static void check_selinux_update_passwd(const char *username) if (!seuser) bb_error_msg_and_die("invalid context '%s'", context); if (strcmp(seuser, username) != 0) { - if (checkPasswdAccess(PASSWD__PASSWD) != 0) + security_class_t tclass; + access_vector_t av; + + tclass = string_to_security_class("passwd"); + if (tclass == 0) + goto die; + av = string_to_av_perm(tclass, "passwd"); + if (av == 0) + goto die; + + if (selinux_check_passwd_access(av) != 0) + die: bb_error_msg_and_die("SELinux: access denied"); } if (ENABLE_FEATURE_CLEAN_UP) -- cgit v1.2.3-55-g6feb From ac5d324540c5ec38c016848f2075b9f3e0560c11 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sat, 10 Dec 2016 20:57:00 +0100 Subject: randomconfig fixes Signed-off-by: Denys Vlasenko --- libbb/Kbuild.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libbb') diff --git a/libbb/Kbuild.src b/libbb/Kbuild.src index 7440974b0..e426f3c7e 100644 --- a/libbb/Kbuild.src +++ b/libbb/Kbuild.src @@ -142,7 +142,7 @@ lib-$(CONFIG_ADDUSER) += update_passwd.o lib-$(CONFIG_DELGROUP) += update_passwd.o lib-$(CONFIG_DELUSER) += update_passwd.o -lib-$(CONFIG_FTPD) += correct_password.o +lib-$(CONFIG_FTPD) += pw_encrypt.o correct_password.o lib-$(CONFIG_PASSWD) += pw_encrypt.o update_passwd.o obscure.o lib-$(CONFIG_CHPASSWD) += pw_encrypt.o update_passwd.o lib-$(CONFIG_CRYPTPW) += pw_encrypt.o -- cgit v1.2.3-55-g6feb From e184a883567ee3fd735644416e4bd683f1894ac5 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 12 Dec 2016 19:56:31 +0100 Subject: df: implement -B n and -B formats of -B option Signed-off-by: Denys Vlasenko --- coreutils/df.c | 20 ++++++++++++++++++-- include/libbb.h | 1 + libbb/xatonum.c | 19 +++++++++++++++++++ util-linux/fstrim.c | 25 +++---------------------- 4 files changed, 41 insertions(+), 24 deletions(-) (limited to 'libbb') diff --git a/coreutils/df.c b/coreutils/df.c index fdcdae675..79e4c4670 100644 --- a/coreutils/df.c +++ b/coreutils/df.c @@ -129,8 +129,19 @@ int df_main(int argc UNUSED_PARAM, char **argv) if (opt & OPT_MEGA) df_disp_hr = 1024*1024; - if (opt & OPT_BSIZE) - df_disp_hr = xatoul_range(chp, 1, ULONG_MAX); /* disallow 0 */ + if (opt & OPT_BSIZE) { + /* GNU coreutils 8.25 accepts "-BMiB" form too */ + int i; + for (i = 0; kmg_i_suffixes[i].suffix[0]; i++) { + if (strcmp(kmg_i_suffixes[i].suffix, chp) == 0) { + df_disp_hr = kmg_i_suffixes[i].mult; + goto got_it; + } + } + /* Range used to disallow 0 */ + df_disp_hr = xatoul_range_sfx(chp, 1, ULONG_MAX, kmg_i_suffixes); + got_it: ; + } /* From the manpage of df from coreutils-6.10: * Disk space is shown in 1K blocks by default, unless the environment @@ -203,6 +214,11 @@ int df_main(int argc UNUSED_PARAM, char **argv) bb_simple_perror_msg(mount_point); goto set_error; } + /* Some uclibc versions were seen to lose f_frsize + * (kernel does return it, but then uclibc does not copy it) + */ + if (s.f_frsize == 0) + s.f_frsize = s.f_bsize; if ((s.f_blocks > 0) || !mount_table || (opt & OPT_ALL)) { if (opt & OPT_INODE) { diff --git a/include/libbb.h b/include/libbb.h index b1fec0157..abdc8c2b8 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -923,6 +923,7 @@ extern const struct suffix_mult bkm_suffixes[]; #define km_suffixes (bkm_suffixes + 1) extern const struct suffix_mult cwbkMG_suffixes[]; #define kMG_suffixes (cwbkMG_suffixes + 3) +extern const struct suffix_mult kmg_i_suffixes[]; #include "xatonum.h" /* Specialized: */ diff --git a/libbb/xatonum.c b/libbb/xatonum.c index 9dd5c3e7e..b63b7f54d 100644 --- a/libbb/xatonum.c +++ b/libbb/xatonum.c @@ -96,3 +96,22 @@ const struct suffix_mult cwbkMG_suffixes[] = { /* coreutils also understands TPEZY suffixes for tera- and so on, with B suffix for decimal */ { "", 0 } }; + +const struct suffix_mult kmg_i_suffixes[] = { + { "KiB", 1024 }, + { "kiB", 1024 }, + { "K", 1024 }, + { "k", 1024 }, + { "MiB", 1048576 }, + { "miB", 1048576 }, + { "M", 1048576 }, + { "m", 1048576 }, + { "GiB", 1073741824 }, + { "giB", 1073741824 }, + { "G", 1073741824 }, + { "g", 1073741824 }, + { "KB", 1000 }, + { "MB", 1000000 }, + { "GB", 1000000000 }, + { "", 0 } +}; diff --git a/util-linux/fstrim.c b/util-linux/fstrim.c index 51400ef0b..fc51878b6 100644 --- a/util-linux/fstrim.c +++ b/util-linux/fstrim.c @@ -47,25 +47,6 @@ struct fstrim_range { #define FITRIM _IOWR('X', 121, struct fstrim_range) #endif -static const struct suffix_mult fstrim_sfx[] = { - { "KiB", 1024 }, - { "kiB", 1024 }, - { "K", 1024 }, - { "k", 1024 }, - { "MiB", 1048576 }, - { "miB", 1048576 }, - { "M", 1048576 }, - { "m", 1048576 }, - { "GiB", 1073741824 }, - { "giB", 1073741824 }, - { "G", 1073741824 }, - { "g", 1073741824 }, - { "KB", 1000 }, - { "MB", 1000000 }, - { "GB", 1000000000 }, - { "", 0 } -}; - int fstrim_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; int fstrim_main(int argc UNUSED_PARAM, char **argv) { @@ -98,11 +79,11 @@ int fstrim_main(int argc UNUSED_PARAM, char **argv) range.len = ULLONG_MAX; if (opts & OPT_o) - range.start = xatoull_sfx(arg_o, fstrim_sfx); + range.start = xatoull_sfx(arg_o, kmg_i_suffixes); if (opts & OPT_l) - range.len = xatoull_sfx(arg_l, fstrim_sfx); + range.len = xatoull_sfx(arg_l, kmg_i_suffixes); if (opts & OPT_m) - range.minlen = xatoull_sfx(arg_m, fstrim_sfx); + range.minlen = xatoull_sfx(arg_m, kmg_i_suffixes); mp = argv[optind]; if (find_block_device(mp)) { -- cgit v1.2.3-55-g6feb From 9cc3d3ab21eb8b4766b71dffb04132184c754f7b Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 23 Dec 2016 02:42:26 +0100 Subject: fix breakage found by mass one-applet builds Signed-off-by: Denys Vlasenko --- archival/bbunzip.c | 4 ++++ libbb/Kbuild.src | 1 + libbb/appletlib.c | 32 ++++++++++++++++---------------- libbb/update_passwd.c | 2 ++ networking/libiproute/Kbuild.src | 3 +++ networking/udhcp/Config.src | 2 -- networking/udhcp/Kbuild.src | 2 +- sysklogd/logread.c | 3 ++- 8 files changed, 29 insertions(+), 20 deletions(-) (limited to 'libbb') 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 @@ /* lzop_main() uses bbunpack(), need this: */ //kbuild:lib-$(CONFIG_LZOP) += bbunzip.o +//kbuild:lib-$(CONFIG_LZOPCAT) += bbunzip.o +//kbuild:lib-$(CONFIG_UNLZOP) += bbunzip.o /* bzip2_main() too: */ //kbuild:lib-$(CONFIG_BZIP2) += bbunzip.o +/* gzip_main() too: */ +//kbuild:lib-$(CONFIG_GZIP) += bbunzip.o /* Note: must be kept in sync with archival/lzop.c */ enum { 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 lib-$(CONFIG_UDHCPC) += inet_cksum.o lib-$(CONFIG_UDHCPC6) += inet_cksum.o lib-$(CONFIG_UDHCPD) += inet_cksum.o +lib-$(CONFIG_DHCPRELAY) += inet_cksum.o # We shouldn't build xregcomp.c if we don't need it - this ensures we don't # 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 { static bool suid_cfg_readable; -/* check if u is member of group g */ -static int ingroup(uid_t u, gid_t g) -{ - struct group *grp = getgrgid(g); - if (grp) { - char **mem; - for (mem = grp->gr_mem; *mem; mem++) { - struct passwd *pwd = getpwnam(*mem); - if (pwd && (pwd->pw_uid == u)) - return 1; - } - } - return 0; -} - /* libbb candidate */ static char *get_trimmed_slice(char *s, char *e) { @@ -568,7 +553,22 @@ static inline void parse_config_file(void) # endif /* FEATURE_SUID_CONFIG */ -# if ENABLE_FEATURE_SUID +# if ENABLE_FEATURE_SUID && NUM_APPLETS > 0 +/* check if u is member of group g */ +static int ingroup(uid_t u, gid_t g) +{ + struct group *grp = getgrgid(g); + if (grp) { + char **mem; + for (mem = grp->gr_mem; *mem; mem++) { + struct passwd *pwd = getpwnam(*mem); + if (pwd && (pwd->pw_uid == u)) + return 1; + } + } + return 0; +} + static void check_suid(int applet_no) { 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, if (!line) /* EOF/error */ break; +#if ENABLE_FEATURE_ADDUSER_TO_GROUP || ENABLE_FEATURE_DEL_USER_FROM_GROUP if (!name && member) { /* Delete member from all groups */ /* line is "GROUP:PASSWD:[member1[,member2]...]" */ @@ -209,6 +210,7 @@ int FAST_FUNC update_passwd(const char *filename, fprintf(new_fp, "%s\n", line); goto next; } +#endif cp = is_prefixed_with(line, name_colon); 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) += \ lib-$(CONFIG_FEATURE_IP_RULE) += \ ip_parse_common_args.o \ iprule.o \ + libnetlink.o \ rt_names.o \ + rtm_map.o \ utils.o lib-$(CONFIG_FEATURE_IP_NEIGH) += \ ip_parse_common_args.o \ ipneigh.o \ libnetlink.o \ + ll_addr.o \ ll_map.o \ rt_names.o \ 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 config DHCPRELAY bool "dhcprelay" default y - depends on UDHCPD help dhcprelay listens for dhcp requests on one or more interfaces and forwards these requests to a different interface or dhcp @@ -25,7 +24,6 @@ config DHCPRELAY config DUMPLEASES bool "Lease display utility (dumpleases)" default y - depends on UDHCPD help dumpleases displays the leases written out by the udhcpd server. 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 lib-$(CONFIG_UDHCPC) += dhcpc.o lib-$(CONFIG_UDHCPD) += dhcpd.o arpping.o lib-$(CONFIG_DUMPLEASES) += dumpleases.o -lib-$(CONFIG_DHCPRELAY) += dhcprelay.o +lib-$(CONFIG_DHCPRELAY) += dhcprelay.o common.o socket.o packet.o lib-$(CONFIG_FEATURE_UDHCPC_ARPING) += arpping.o lib-$(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 @@ //config:config LOGREAD //config: bool "logread" //config: default y -//config: depends on FEATURE_IPC_SYSLOG +//WRONG: it should be compilable without SYSLOG=y: +//WRONG: depends on FEATURE_IPC_SYSLOG //config: help //config: If you enabled Circular Buffer support, you almost //config: certainly want to enable this feature as well. This -- cgit v1.2.3-55-g6feb From 1afa494fd131891e195ab11086ee52fce5c5f4b8 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 23 Dec 2016 13:40:24 +0100 Subject: Make FEATURE_USERNAME_COMPLETION=y by default This matches bash behavior on Fedora Signed-off-by: Denys Vlasenko --- libbb/Config.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libbb') diff --git a/libbb/Config.src b/libbb/Config.src index 00804e31e..172fbcc0e 100644 --- a/libbb/Config.src +++ b/libbb/Config.src @@ -152,7 +152,7 @@ config FEATURE_TAB_COMPLETION config FEATURE_USERNAME_COMPLETION bool "Username completion" - default n + default y depends on FEATURE_TAB_COMPLETION help Enable username completion. -- cgit v1.2.3-55-g6feb From f1d76b64a0f9da5a6bd068fff0ac3dc66422a3ab Mon Sep 17 00:00:00 2001 From: Cristian Ionescu-Idbohrn Date: Mon, 2 Jan 2017 11:17:09 +0100 Subject: appletlib: avoid warning on unused function ingroup libbb/appletlib.c:558:12: warning: 'ingroup' defined but not used [-Wunused-function] static int ingroup(uid_t u, gid_t g) ^~~~~~~ That function is used only if FEATURE_SUID_CONFIG is also enabled. Signed-off-by: Cristian Ionescu-Idbohrn Signed-off-by: Denys Vlasenko --- libbb/appletlib.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libbb') diff --git a/libbb/appletlib.c b/libbb/appletlib.c index ee8b4ec14..805cd3ae6 100644 --- a/libbb/appletlib.c +++ b/libbb/appletlib.c @@ -554,6 +554,7 @@ static inline void parse_config_file(void) # if ENABLE_FEATURE_SUID && NUM_APPLETS > 0 +# if ENABLE_FEATURE_SUID_CONFIG /* check if u is member of group g */ static int ingroup(uid_t u, gid_t g) { @@ -568,6 +569,7 @@ static int ingroup(uid_t u, gid_t g) } return 0; } +# endif static void check_suid(int applet_no) { -- cgit v1.2.3-55-g6feb