aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/applets.src.h42
-rw-r--r--include/bb_archive.h3
-rw-r--r--include/libbb.h9
3 files changed, 7 insertions, 47 deletions
diff --git a/include/applets.src.h b/include/applets.src.h
index dac83e7fb..5b597202e 100644
--- a/include/applets.src.h
+++ b/include/applets.src.h
@@ -76,8 +76,6 @@ INSERT
76IF_TEST(APPLET_NOFORK([, test, BB_DIR_USR_BIN, BB_SUID_DROP, test)) 76IF_TEST(APPLET_NOFORK([, test, BB_DIR_USR_BIN, BB_SUID_DROP, test))
77IF_TEST(APPLET_NOFORK([[, test, BB_DIR_USR_BIN, BB_SUID_DROP, test)) 77IF_TEST(APPLET_NOFORK([[, test, BB_DIR_USR_BIN, BB_SUID_DROP, test))
78IF_ACPID(APPLET(acpid, BB_DIR_SBIN, BB_SUID_DROP)) 78IF_ACPID(APPLET(acpid, BB_DIR_SBIN, BB_SUID_DROP))
79IF_ADDGROUP(APPLET(addgroup, BB_DIR_USR_SBIN, BB_SUID_DROP))
80IF_ADDUSER(APPLET(adduser, BB_DIR_USR_SBIN, BB_SUID_DROP))
81IF_ADJTIMEX(APPLET(adjtimex, BB_DIR_SBIN, BB_SUID_DROP)) 79IF_ADJTIMEX(APPLET(adjtimex, BB_DIR_SBIN, BB_SUID_DROP))
82IF_ARP(APPLET(arp, BB_DIR_SBIN, BB_SUID_DROP)) 80IF_ARP(APPLET(arp, BB_DIR_SBIN, BB_SUID_DROP))
83IF_ARPING(APPLET(arping, BB_DIR_USR_SBIN, BB_SUID_DROP)) 81IF_ARPING(APPLET(arping, BB_DIR_USR_SBIN, BB_SUID_DROP))
@@ -90,13 +88,10 @@ IF_CAL(APPLET(cal, BB_DIR_USR_BIN, BB_SUID_DROP))
90IF_CAT(APPLET_NOFORK(cat, cat, BB_DIR_BIN, BB_SUID_DROP, cat)) 88IF_CAT(APPLET_NOFORK(cat, cat, BB_DIR_BIN, BB_SUID_DROP, cat))
91IF_CATV(APPLET(catv, BB_DIR_BIN, BB_SUID_DROP)) 89IF_CATV(APPLET(catv, BB_DIR_BIN, BB_SUID_DROP))
92IF_CHAT(APPLET(chat, BB_DIR_USR_SBIN, BB_SUID_DROP)) 90IF_CHAT(APPLET(chat, BB_DIR_USR_SBIN, BB_SUID_DROP))
93IF_CHATTR(APPLET(chattr, BB_DIR_BIN, BB_SUID_DROP))
94IF_CHCON(APPLET(chcon, BB_DIR_USR_BIN, BB_SUID_DROP)) 91IF_CHCON(APPLET(chcon, BB_DIR_USR_BIN, BB_SUID_DROP))
95IF_CHGRP(APPLET_NOEXEC(chgrp, chgrp, BB_DIR_BIN, BB_SUID_DROP, chgrp)) 92IF_CHGRP(APPLET_NOEXEC(chgrp, chgrp, BB_DIR_BIN, BB_SUID_DROP, chgrp))
96IF_CHMOD(APPLET_NOEXEC(chmod, chmod, BB_DIR_BIN, BB_SUID_DROP, chmod)) 93IF_CHMOD(APPLET_NOEXEC(chmod, chmod, BB_DIR_BIN, BB_SUID_DROP, chmod))
97IF_CHOWN(APPLET_NOEXEC(chown, chown, BB_DIR_BIN, BB_SUID_DROP, chown)) 94IF_CHOWN(APPLET_NOEXEC(chown, chown, BB_DIR_BIN, BB_SUID_DROP, chown))
98IF_CHPASSWD(APPLET(chpasswd, BB_DIR_USR_SBIN, BB_SUID_DROP))
99IF_CHPST(APPLET(chpst, BB_DIR_USR_BIN, BB_SUID_DROP))
100IF_CHROOT(APPLET(chroot, BB_DIR_USR_SBIN, BB_SUID_DROP)) 95IF_CHROOT(APPLET(chroot, BB_DIR_USR_SBIN, BB_SUID_DROP))
101IF_CHRT(APPLET(chrt, BB_DIR_USR_BIN, BB_SUID_DROP)) 96IF_CHRT(APPLET(chrt, BB_DIR_USR_BIN, BB_SUID_DROP))
102IF_CHVT(APPLET(chvt, BB_DIR_USR_BIN, BB_SUID_DROP)) 97IF_CHVT(APPLET(chvt, BB_DIR_USR_BIN, BB_SUID_DROP))
@@ -106,13 +101,10 @@ IF_COMM(APPLET(comm, BB_DIR_USR_BIN, BB_SUID_DROP))
106IF_CP(APPLET_NOEXEC(cp, cp, BB_DIR_BIN, BB_SUID_DROP, cp)) 101IF_CP(APPLET_NOEXEC(cp, cp, BB_DIR_BIN, BB_SUID_DROP, cp))
107/* Needs to be run by root or be suid root - needs to change /var/spool/cron* files: */ 102/* Needs to be run by root or be suid root - needs to change /var/spool/cron* files: */
108IF_CRONTAB(APPLET(crontab, BB_DIR_USR_BIN, BB_SUID_REQUIRE)) 103IF_CRONTAB(APPLET(crontab, BB_DIR_USR_BIN, BB_SUID_REQUIRE))
109IF_CRYPTPW(APPLET(cryptpw, BB_DIR_USR_BIN, BB_SUID_DROP))
110IF_CUT(APPLET_NOEXEC(cut, cut, BB_DIR_USR_BIN, BB_SUID_DROP, cut)) 104IF_CUT(APPLET_NOEXEC(cut, cut, BB_DIR_USR_BIN, BB_SUID_DROP, cut))
111IF_DC(APPLET(dc, BB_DIR_USR_BIN, BB_SUID_DROP)) 105IF_DC(APPLET(dc, BB_DIR_USR_BIN, BB_SUID_DROP))
112IF_DD(APPLET_NOEXEC(dd, dd, BB_DIR_BIN, BB_SUID_DROP, dd)) 106IF_DD(APPLET_NOEXEC(dd, dd, BB_DIR_BIN, BB_SUID_DROP, dd))
113IF_DEALLOCVT(APPLET(deallocvt, BB_DIR_USR_BIN, BB_SUID_DROP)) 107IF_DEALLOCVT(APPLET(deallocvt, BB_DIR_USR_BIN, BB_SUID_DROP))
114IF_DELGROUP(APPLET_ODDNAME(delgroup, deluser, BB_DIR_USR_SBIN, BB_SUID_DROP, delgroup))
115IF_DELUSER(APPLET(deluser, BB_DIR_USR_SBIN, BB_SUID_DROP))
116IF_DEVFSD(APPLET(devfsd, BB_DIR_SBIN, BB_SUID_DROP)) 108IF_DEVFSD(APPLET(devfsd, BB_DIR_SBIN, BB_SUID_DROP))
117IF_DEVMEM(APPLET(devmem, BB_DIR_SBIN, BB_SUID_DROP)) 109IF_DEVMEM(APPLET(devmem, BB_DIR_SBIN, BB_SUID_DROP))
118IF_DF(APPLET(df, BB_DIR_BIN, BB_SUID_DROP)) 110IF_DF(APPLET(df, BB_DIR_BIN, BB_SUID_DROP))
@@ -130,8 +122,6 @@ IF_DUMPLEASES(APPLET(dumpleases, BB_DIR_USR_BIN, BB_SUID_DROP))
130IF_ECHO(APPLET_NOFORK(echo, echo, BB_DIR_BIN, BB_SUID_DROP, echo)) 122IF_ECHO(APPLET_NOFORK(echo, echo, BB_DIR_BIN, BB_SUID_DROP, echo))
131IF_EJECT(APPLET(eject, BB_DIR_USR_BIN, BB_SUID_DROP)) 123IF_EJECT(APPLET(eject, BB_DIR_USR_BIN, BB_SUID_DROP))
132IF_ENV(APPLET_NOEXEC(env, env, BB_DIR_USR_BIN, BB_SUID_DROP, env)) 124IF_ENV(APPLET_NOEXEC(env, env, BB_DIR_USR_BIN, BB_SUID_DROP, env))
133IF_ENVDIR(APPLET_ODDNAME(envdir, chpst, BB_DIR_USR_BIN, BB_SUID_DROP, envdir))
134IF_ENVUIDGID(APPLET_ODDNAME(envuidgid, chpst, BB_DIR_USR_BIN, BB_SUID_DROP, envuidgid))
135IF_ETHER_WAKE(APPLET_ODDNAME(ether-wake, ether_wake, BB_DIR_USR_SBIN, BB_SUID_DROP, ether_wake)) 125IF_ETHER_WAKE(APPLET_ODDNAME(ether-wake, ether_wake, BB_DIR_USR_SBIN, BB_SUID_DROP, ether_wake))
136IF_EXPAND(APPLET(expand, BB_DIR_USR_BIN, BB_SUID_DROP)) 126IF_EXPAND(APPLET(expand, BB_DIR_USR_BIN, BB_SUID_DROP))
137IF_EXPR(APPLET(expr, BB_DIR_USR_BIN, BB_SUID_DROP)) 127IF_EXPR(APPLET(expr, BB_DIR_USR_BIN, BB_SUID_DROP))
@@ -153,7 +143,6 @@ IF_FLOCK(APPLET(flock, BB_DIR_USR_BIN, BB_SUID_DROP))
153IF_FOLD(APPLET_NOEXEC(fold, fold, BB_DIR_USR_BIN, BB_SUID_DROP, fold)) 143IF_FOLD(APPLET_NOEXEC(fold, fold, BB_DIR_USR_BIN, BB_SUID_DROP, fold))
154IF_FREE(APPLET(free, BB_DIR_USR_BIN, BB_SUID_DROP)) 144IF_FREE(APPLET(free, BB_DIR_USR_BIN, BB_SUID_DROP))
155IF_FREERAMDISK(APPLET(freeramdisk, BB_DIR_SBIN, BB_SUID_DROP)) 145IF_FREERAMDISK(APPLET(freeramdisk, BB_DIR_SBIN, BB_SUID_DROP))
156IF_FSCK(APPLET(fsck, BB_DIR_SBIN, BB_SUID_DROP))
157//IF_E2FSCK(APPLET_ODDNAME(fsck.ext2, e2fsck, BB_DIR_SBIN, BB_SUID_DROP, fsck_ext2)) 146//IF_E2FSCK(APPLET_ODDNAME(fsck.ext2, e2fsck, BB_DIR_SBIN, BB_SUID_DROP, fsck_ext2))
158//IF_E2FSCK(APPLET_ODDNAME(fsck.ext3, e2fsck, BB_DIR_SBIN, BB_SUID_DROP, fsck_ext3)) 147//IF_E2FSCK(APPLET_ODDNAME(fsck.ext3, e2fsck, BB_DIR_SBIN, BB_SUID_DROP, fsck_ext3))
159IF_FSCK_MINIX(APPLET_ODDNAME(fsck.minix, fsck_minix, BB_DIR_SBIN, BB_SUID_DROP, fsck_minix)) 148IF_FSCK_MINIX(APPLET_ODDNAME(fsck.minix, fsck_minix, BB_DIR_SBIN, BB_SUID_DROP, fsck_minix))
@@ -165,7 +154,6 @@ IF_FUSER(APPLET(fuser, BB_DIR_USR_BIN, BB_SUID_DROP))
165IF_GETENFORCE(APPLET(getenforce, BB_DIR_USR_SBIN, BB_SUID_DROP)) 154IF_GETENFORCE(APPLET(getenforce, BB_DIR_USR_SBIN, BB_SUID_DROP))
166IF_GETOPT(APPLET(getopt, BB_DIR_BIN, BB_SUID_DROP)) 155IF_GETOPT(APPLET(getopt, BB_DIR_BIN, BB_SUID_DROP))
167IF_GETSEBOOL(APPLET(getsebool, BB_DIR_USR_SBIN, BB_SUID_DROP)) 156IF_GETSEBOOL(APPLET(getsebool, BB_DIR_USR_SBIN, BB_SUID_DROP))
168IF_GETTY(APPLET(getty, BB_DIR_SBIN, BB_SUID_DROP))
169IF_HD(APPLET_NOEXEC(hd, hexdump, BB_DIR_USR_BIN, BB_SUID_DROP, hd)) 157IF_HD(APPLET_NOEXEC(hd, hexdump, BB_DIR_USR_BIN, BB_SUID_DROP, hd))
170IF_HDPARM(APPLET(hdparm, BB_DIR_SBIN, BB_SUID_DROP)) 158IF_HDPARM(APPLET(hdparm, BB_DIR_SBIN, BB_SUID_DROP))
171IF_HEAD(APPLET_NOEXEC(head, head, BB_DIR_USR_BIN, BB_SUID_DROP, head)) 159IF_HEAD(APPLET_NOEXEC(head, head, BB_DIR_USR_BIN, BB_SUID_DROP, head))
@@ -201,7 +189,6 @@ IF_KBD_MODE(APPLET(kbd_mode, BB_DIR_BIN, BB_SUID_DROP))
201IF_KILL(APPLET(kill, BB_DIR_BIN, BB_SUID_DROP)) 189IF_KILL(APPLET(kill, BB_DIR_BIN, BB_SUID_DROP))
202IF_KILLALL(APPLET_ODDNAME(killall, kill, BB_DIR_USR_BIN, BB_SUID_DROP, killall)) 190IF_KILLALL(APPLET_ODDNAME(killall, kill, BB_DIR_USR_BIN, BB_SUID_DROP, killall))
203IF_KILLALL5(APPLET_ODDNAME(killall5, kill, BB_DIR_USR_SBIN, BB_SUID_DROP, killall5)) 191IF_KILLALL5(APPLET_ODDNAME(killall5, kill, BB_DIR_USR_SBIN, BB_SUID_DROP, killall5))
204IF_KLOGD(APPLET(klogd, BB_DIR_SBIN, BB_SUID_DROP))
205IF_LAST(APPLET(last, BB_DIR_USR_BIN, BB_SUID_DROP)) 192IF_LAST(APPLET(last, BB_DIR_USR_BIN, BB_SUID_DROP))
206//IF_LENGTH(APPLET_NOFORK(length, length, BB_DIR_USR_BIN, BB_SUID_DROP, length)) 193//IF_LENGTH(APPLET_NOFORK(length, length, BB_DIR_USR_BIN, BB_SUID_DROP, length))
207IF_LESS(APPLET(less, BB_DIR_USR_BIN, BB_SUID_DROP)) 194IF_LESS(APPLET(less, BB_DIR_USR_BIN, BB_SUID_DROP))
@@ -211,17 +198,9 @@ IF_LN(APPLET_NOEXEC(ln, ln, BB_DIR_BIN, BB_SUID_DROP, ln))
211IF_LOAD_POLICY(APPLET(load_policy, BB_DIR_USR_SBIN, BB_SUID_DROP)) 198IF_LOAD_POLICY(APPLET(load_policy, BB_DIR_USR_SBIN, BB_SUID_DROP))
212IF_LOADFONT(APPLET(loadfont, BB_DIR_USR_SBIN, BB_SUID_DROP)) 199IF_LOADFONT(APPLET(loadfont, BB_DIR_USR_SBIN, BB_SUID_DROP))
213IF_LOADKMAP(APPLET(loadkmap, BB_DIR_SBIN, BB_SUID_DROP)) 200IF_LOADKMAP(APPLET(loadkmap, BB_DIR_SBIN, BB_SUID_DROP))
214IF_LOGGER(APPLET(logger, BB_DIR_USR_BIN, BB_SUID_DROP))
215/* Needs to be run by root or be suid root - needs to change uid and gid: */
216IF_LOGIN(APPLET(login, BB_DIR_BIN, BB_SUID_REQUIRE))
217IF_LOGNAME(APPLET_NOFORK(logname, logname, BB_DIR_USR_BIN, BB_SUID_DROP, logname)) 201IF_LOGNAME(APPLET_NOFORK(logname, logname, BB_DIR_USR_BIN, BB_SUID_DROP, logname))
218IF_LOGREAD(APPLET(logread, BB_DIR_SBIN, BB_SUID_DROP))
219IF_LOSETUP(APPLET(losetup, BB_DIR_SBIN, BB_SUID_DROP)) 202IF_LOSETUP(APPLET(losetup, BB_DIR_SBIN, BB_SUID_DROP))
220IF_LPD(APPLET(lpd, BB_DIR_USR_SBIN, BB_SUID_DROP))
221IF_LPQ(APPLET_ODDNAME(lpq, lpqr, BB_DIR_USR_BIN, BB_SUID_DROP, lpq))
222IF_LPR(APPLET_ODDNAME(lpr, lpqr, BB_DIR_USR_BIN, BB_SUID_DROP, lpr))
223IF_LS(APPLET_NOEXEC(ls, ls, BB_DIR_BIN, BB_SUID_DROP, ls)) 203IF_LS(APPLET_NOEXEC(ls, ls, BB_DIR_BIN, BB_SUID_DROP, ls))
224IF_LSATTR(APPLET(lsattr, BB_DIR_BIN, BB_SUID_DROP))
225IF_LSPCI(APPLET(lspci, BB_DIR_USR_BIN, BB_SUID_DROP)) 204IF_LSPCI(APPLET(lspci, BB_DIR_USR_BIN, BB_SUID_DROP))
226IF_LSUSB(APPLET(lsusb, BB_DIR_USR_BIN, BB_SUID_DROP)) 205IF_LSUSB(APPLET(lsusb, BB_DIR_USR_BIN, BB_SUID_DROP))
227IF_MAKEDEVS(APPLET(makedevs, BB_DIR_SBIN, BB_SUID_DROP)) 206IF_MAKEDEVS(APPLET(makedevs, BB_DIR_SBIN, BB_SUID_DROP))
@@ -240,9 +219,7 @@ IF_MKFS_MINIX(APPLET_ODDNAME(mkfs.minix, mkfs_minix, BB_DIR_SBIN, BB_SUID_DROP,
240IF_MKFS_REISER(APPLET_ODDNAME(mkfs.reiser, mkfs_reiser, BB_DIR_SBIN, BB_SUID_DROP, mkfs_reiser)) 219IF_MKFS_REISER(APPLET_ODDNAME(mkfs.reiser, mkfs_reiser, BB_DIR_SBIN, BB_SUID_DROP, mkfs_reiser))
241IF_MKFS_VFAT(APPLET_ODDNAME(mkfs.vfat, mkfs_vfat, BB_DIR_SBIN, BB_SUID_DROP, mkfs_vfat)) 220IF_MKFS_VFAT(APPLET_ODDNAME(mkfs.vfat, mkfs_vfat, BB_DIR_SBIN, BB_SUID_DROP, mkfs_vfat))
242IF_MKNOD(APPLET_NOEXEC(mknod, mknod, BB_DIR_BIN, BB_SUID_DROP, mknod)) 221IF_MKNOD(APPLET_NOEXEC(mknod, mknod, BB_DIR_BIN, BB_SUID_DROP, mknod))
243IF_CRYPTPW(APPLET_ODDNAME(mkpasswd, cryptpw, BB_DIR_USR_BIN, BB_SUID_DROP, mkpasswd))
244IF_MKSWAP(APPLET(mkswap, BB_DIR_SBIN, BB_SUID_DROP)) 222IF_MKSWAP(APPLET(mkswap, BB_DIR_SBIN, BB_SUID_DROP))
245IF_MKTEMP(APPLET(mktemp, BB_DIR_BIN, BB_SUID_DROP))
246IF_MORE(APPLET(more, BB_DIR_BIN, BB_SUID_DROP)) 223IF_MORE(APPLET(more, BB_DIR_BIN, BB_SUID_DROP))
247/* On full-blown systems, requires suid for user mounts. 224/* On full-blown systems, requires suid for user mounts.
248 * But it's not unthinkable to have it available in non-suid flavor on some systems, 225 * But it's not unthinkable to have it available in non-suid flavor on some systems,
@@ -262,11 +239,8 @@ IF_NTPD(APPLET(ntpd, BB_DIR_USR_SBIN, BB_SUID_DROP))
262IF_OD(APPLET(od, BB_DIR_USR_BIN, BB_SUID_DROP)) 239IF_OD(APPLET(od, BB_DIR_USR_BIN, BB_SUID_DROP))
263IF_OPENVT(APPLET(openvt, BB_DIR_USR_BIN, BB_SUID_DROP)) 240IF_OPENVT(APPLET(openvt, BB_DIR_USR_BIN, BB_SUID_DROP))
264//IF_PARSE(APPLET(parse, BB_DIR_USR_BIN, BB_SUID_DROP)) 241//IF_PARSE(APPLET(parse, BB_DIR_USR_BIN, BB_SUID_DROP))
265/* Needs to be run by root or be suid root - needs to change /etc/{passwd,shadow}: */
266IF_PASSWD(APPLET(passwd, BB_DIR_USR_BIN, BB_SUID_REQUIRE))
267IF_PGREP(APPLET(pgrep, BB_DIR_USR_BIN, BB_SUID_DROP)) 242IF_PGREP(APPLET(pgrep, BB_DIR_USR_BIN, BB_SUID_DROP))
268IF_PIDOF(APPLET(pidof, BB_DIR_BIN, BB_SUID_DROP)) 243IF_PIDOF(APPLET(pidof, BB_DIR_BIN, BB_SUID_DROP))
269IF_PIPE_PROGRESS(APPLET(pipe_progress, BB_DIR_BIN, BB_SUID_DROP))
270IF_PIVOT_ROOT(APPLET(pivot_root, BB_DIR_SBIN, BB_SUID_DROP)) 244IF_PIVOT_ROOT(APPLET(pivot_root, BB_DIR_SBIN, BB_SUID_DROP))
271IF_PKILL(APPLET_ODDNAME(pkill, pgrep, BB_DIR_USR_BIN, BB_SUID_DROP, pkill)) 245IF_PKILL(APPLET_ODDNAME(pkill, pgrep, BB_DIR_USR_BIN, BB_SUID_DROP, pkill))
272IF_POPMAILDIR(APPLET(popmaildir, BB_DIR_USR_SBIN, BB_SUID_DROP)) 246IF_POPMAILDIR(APPLET(popmaildir, BB_DIR_USR_SBIN, BB_SUID_DROP))
@@ -291,11 +265,8 @@ IF_RM(APPLET_NOFORK(rm, rm, BB_DIR_BIN, BB_SUID_DROP, rm))
291IF_RMDIR(APPLET_NOFORK(rmdir, rmdir, BB_DIR_BIN, BB_SUID_DROP, rmdir)) 265IF_RMDIR(APPLET_NOFORK(rmdir, rmdir, BB_DIR_BIN, BB_SUID_DROP, rmdir))
292IF_ROUTE(APPLET(route, BB_DIR_SBIN, BB_SUID_DROP)) 266IF_ROUTE(APPLET(route, BB_DIR_SBIN, BB_SUID_DROP))
293IF_RTCWAKE(APPLET(rtcwake, BB_DIR_USR_SBIN, BB_SUID_DROP)) 267IF_RTCWAKE(APPLET(rtcwake, BB_DIR_USR_SBIN, BB_SUID_DROP))
294IF_RUN_PARTS(APPLET_ODDNAME(run-parts, run_parts, BB_DIR_BIN, BB_SUID_DROP, run_parts))
295IF_RUNCON(APPLET(runcon, BB_DIR_USR_BIN, BB_SUID_DROP)) 268IF_RUNCON(APPLET(runcon, BB_DIR_USR_BIN, BB_SUID_DROP))
296IF_RUNLEVEL(APPLET(runlevel, BB_DIR_SBIN, BB_SUID_DROP)) 269IF_RUNLEVEL(APPLET(runlevel, BB_DIR_SBIN, BB_SUID_DROP))
297IF_RUNSV(APPLET(runsv, BB_DIR_USR_BIN, BB_SUID_DROP))
298IF_RUNSVDIR(APPLET(runsvdir, BB_DIR_USR_BIN, BB_SUID_DROP))
299IF_RX(APPLET(rx, BB_DIR_USR_BIN, BB_SUID_DROP)) 270IF_RX(APPLET(rx, BB_DIR_USR_BIN, BB_SUID_DROP))
300IF_SCRIPT(APPLET(script, BB_DIR_USR_BIN, BB_SUID_DROP)) 271IF_SCRIPT(APPLET(script, BB_DIR_USR_BIN, BB_SUID_DROP))
301IF_SCRIPTREPLAY(APPLET(scriptreplay, BB_DIR_BIN, BB_SUID_DROP)) 272IF_SCRIPTREPLAY(APPLET(scriptreplay, BB_DIR_BIN, BB_SUID_DROP))
@@ -312,7 +283,6 @@ IF_SETKEYCODES(APPLET(setkeycodes, BB_DIR_USR_BIN, BB_SUID_DROP))
312IF_SETLOGCONS(APPLET(setlogcons, BB_DIR_USR_SBIN, BB_SUID_DROP)) 283IF_SETLOGCONS(APPLET(setlogcons, BB_DIR_USR_SBIN, BB_SUID_DROP))
313IF_SETSEBOOL(APPLET(setsebool, BB_DIR_USR_SBIN, BB_SUID_DROP)) 284IF_SETSEBOOL(APPLET(setsebool, BB_DIR_USR_SBIN, BB_SUID_DROP))
314IF_SETSID(APPLET(setsid, BB_DIR_USR_BIN, BB_SUID_DROP)) 285IF_SETSID(APPLET(setsid, BB_DIR_USR_BIN, BB_SUID_DROP))
315IF_SETUIDGID(APPLET_ODDNAME(setuidgid, chpst, BB_DIR_USR_BIN, BB_SUID_DROP, setuidgid))
316IF_SHA1SUM(APPLET_NOEXEC(sha1sum, md5_sha1_sum, BB_DIR_USR_BIN, BB_SUID_DROP, sha1sum)) 286IF_SHA1SUM(APPLET_NOEXEC(sha1sum, md5_sha1_sum, BB_DIR_USR_BIN, BB_SUID_DROP, sha1sum))
317IF_SHA3SUM(APPLET_NOEXEC(sha3sum, md5_sha1_sum, BB_DIR_USR_BIN, BB_SUID_DROP, sha3sum)) 287IF_SHA3SUM(APPLET_NOEXEC(sha3sum, md5_sha1_sum, BB_DIR_USR_BIN, BB_SUID_DROP, sha3sum))
318IF_SHA256SUM(APPLET_NOEXEC(sha256sum, md5_sha1_sum, BB_DIR_USR_BIN, BB_SUID_DROP, sha256sum)) 288IF_SHA256SUM(APPLET_NOEXEC(sha256sum, md5_sha1_sum, BB_DIR_USR_BIN, BB_SUID_DROP, sha256sum))
@@ -321,24 +291,16 @@ IF_SHOWKEY(APPLET(showkey, BB_DIR_USR_BIN, BB_SUID_DROP))
321IF_SLATTACH(APPLET(slattach, BB_DIR_SBIN, BB_SUID_DROP)) 291IF_SLATTACH(APPLET(slattach, BB_DIR_SBIN, BB_SUID_DROP))
322/* Do not make this applet NOFORK. It breaks ^C-ing of pauses in shells: */ 292/* Do not make this applet NOFORK. It breaks ^C-ing of pauses in shells: */
323IF_SLEEP(APPLET(sleep, BB_DIR_BIN, BB_SUID_DROP)) 293IF_SLEEP(APPLET(sleep, BB_DIR_BIN, BB_SUID_DROP))
324IF_SOFTLIMIT(APPLET_ODDNAME(softlimit, chpst, BB_DIR_USR_BIN, BB_SUID_DROP, softlimit))
325IF_SORT(APPLET_NOEXEC(sort, sort, BB_DIR_USR_BIN, BB_SUID_DROP, sort)) 294IF_SORT(APPLET_NOEXEC(sort, sort, BB_DIR_USR_BIN, BB_SUID_DROP, sort))
326IF_SPLIT(APPLET(split, BB_DIR_USR_BIN, BB_SUID_DROP)) 295IF_SPLIT(APPLET(split, BB_DIR_USR_BIN, BB_SUID_DROP))
327IF_START_STOP_DAEMON(APPLET_ODDNAME(start-stop-daemon, start_stop_daemon, BB_DIR_SBIN, BB_SUID_DROP, start_stop_daemon))
328IF_STAT(APPLET(stat, BB_DIR_BIN, BB_SUID_DROP)) 296IF_STAT(APPLET(stat, BB_DIR_BIN, BB_SUID_DROP))
329IF_STRINGS(APPLET(strings, BB_DIR_USR_BIN, BB_SUID_DROP)) 297IF_STRINGS(APPLET(strings, BB_DIR_USR_BIN, BB_SUID_DROP))
330IF_STTY(APPLET(stty, BB_DIR_BIN, BB_SUID_DROP)) 298IF_STTY(APPLET(stty, BB_DIR_BIN, BB_SUID_DROP))
331/* Needs to be run by root or be suid root - needs to change uid and gid: */
332IF_SU(APPLET(su, BB_DIR_BIN, BB_SUID_REQUIRE))
333IF_SULOGIN(APPLET(sulogin, BB_DIR_SBIN, BB_SUID_DROP))
334IF_SUM(APPLET(sum, BB_DIR_USR_BIN, BB_SUID_DROP)) 299IF_SUM(APPLET(sum, BB_DIR_USR_BIN, BB_SUID_DROP))
335IF_SV(APPLET(sv, BB_DIR_USR_BIN, BB_SUID_DROP))
336IF_SVLOGD(APPLET(svlogd, BB_DIR_USR_SBIN, BB_SUID_DROP))
337IF_SWAPONOFF(APPLET_ODDNAME(swapoff, swap_on_off, BB_DIR_SBIN, BB_SUID_DROP, swapoff)) 300IF_SWAPONOFF(APPLET_ODDNAME(swapoff, swap_on_off, BB_DIR_SBIN, BB_SUID_DROP, swapoff))
338IF_SWAPONOFF(APPLET_ODDNAME(swapon, swap_on_off, BB_DIR_SBIN, BB_SUID_DROP, swapon)) 301IF_SWAPONOFF(APPLET_ODDNAME(swapon, swap_on_off, BB_DIR_SBIN, BB_SUID_DROP, swapon))
339IF_SWITCH_ROOT(APPLET(switch_root, BB_DIR_SBIN, BB_SUID_DROP)) 302IF_SWITCH_ROOT(APPLET(switch_root, BB_DIR_SBIN, BB_SUID_DROP))
340IF_BB_SYSCTL(APPLET(sysctl, BB_DIR_SBIN, BB_SUID_DROP)) 303IF_BB_SYSCTL(APPLET(sysctl, BB_DIR_SBIN, BB_SUID_DROP))
341IF_SYSLOGD(APPLET(syslogd, BB_DIR_SBIN, BB_SUID_DROP))
342IF_TAC(APPLET_NOEXEC(tac, tac, BB_DIR_USR_BIN, BB_SUID_DROP, tac)) 304IF_TAC(APPLET_NOEXEC(tac, tac, BB_DIR_USR_BIN, BB_SUID_DROP, tac))
343IF_TAIL(APPLET(tail, BB_DIR_USR_BIN, BB_SUID_DROP)) 305IF_TAIL(APPLET(tail, BB_DIR_USR_BIN, BB_SUID_DROP))
344/* IF_TC(APPLET(tc, BB_DIR_SBIN, BB_SUID_DROP)) */ 306/* IF_TC(APPLET(tc, BB_DIR_SBIN, BB_SUID_DROP)) */
@@ -362,7 +324,6 @@ IF_TRUE(APPLET_NOFORK(true, true, BB_DIR_BIN, BB_SUID_DROP, true))
362IF_TTY(APPLET(tty, BB_DIR_USR_BIN, BB_SUID_DROP)) 324IF_TTY(APPLET(tty, BB_DIR_USR_BIN, BB_SUID_DROP))
363IF_TTYSIZE(APPLET(ttysize, BB_DIR_USR_BIN, BB_SUID_DROP)) 325IF_TTYSIZE(APPLET(ttysize, BB_DIR_USR_BIN, BB_SUID_DROP))
364IF_TUNCTL(APPLET(tunctl, BB_DIR_SBIN, BB_SUID_DROP)) 326IF_TUNCTL(APPLET(tunctl, BB_DIR_SBIN, BB_SUID_DROP))
365IF_TUNE2FS(APPLET(tune2fs, BB_DIR_SBIN, BB_SUID_DROP))
366IF_UDHCPC(APPLET(udhcpc, BB_DIR_SBIN, BB_SUID_DROP)) 327IF_UDHCPC(APPLET(udhcpc, BB_DIR_SBIN, BB_SUID_DROP))
367IF_UDHCPD(APPLET(udhcpd, BB_DIR_USR_SBIN, BB_SUID_DROP)) 328IF_UDHCPD(APPLET(udhcpd, BB_DIR_USR_SBIN, BB_SUID_DROP))
368IF_UDPSVD(APPLET_ODDNAME(udpsvd, tcpudpsvd, BB_DIR_USR_BIN, BB_SUID_DROP, udpsvd)) 329IF_UDPSVD(APPLET_ODDNAME(udpsvd, tcpudpsvd, BB_DIR_USR_BIN, BB_SUID_DROP, udpsvd))
@@ -376,13 +337,10 @@ IF_USLEEP(APPLET_NOFORK(usleep, usleep, BB_DIR_BIN, BB_SUID_DROP, usleep))
376IF_UUDECODE(APPLET(uudecode, BB_DIR_USR_BIN, BB_SUID_DROP)) 337IF_UUDECODE(APPLET(uudecode, BB_DIR_USR_BIN, BB_SUID_DROP))
377IF_UUENCODE(APPLET(uuencode, BB_DIR_USR_BIN, BB_SUID_DROP)) 338IF_UUENCODE(APPLET(uuencode, BB_DIR_USR_BIN, BB_SUID_DROP))
378IF_VCONFIG(APPLET(vconfig, BB_DIR_SBIN, BB_SUID_DROP)) 339IF_VCONFIG(APPLET(vconfig, BB_DIR_SBIN, BB_SUID_DROP))
379/* Needs to be run by root or be suid root - needs to change uid and gid: */
380IF_VLOCK(APPLET(vlock, BB_DIR_USR_BIN, BB_SUID_REQUIRE))
381IF_VOLNAME(APPLET(volname, BB_DIR_USR_BIN, BB_SUID_DROP)) 340IF_VOLNAME(APPLET(volname, BB_DIR_USR_BIN, BB_SUID_DROP))
382IF_WATCH(APPLET(watch, BB_DIR_BIN, BB_SUID_DROP)) 341IF_WATCH(APPLET(watch, BB_DIR_BIN, BB_SUID_DROP))
383IF_WATCHDOG(APPLET(watchdog, BB_DIR_SBIN, BB_SUID_DROP)) 342IF_WATCHDOG(APPLET(watchdog, BB_DIR_SBIN, BB_SUID_DROP))
384IF_WC(APPLET(wc, BB_DIR_USR_BIN, BB_SUID_DROP)) 343IF_WC(APPLET(wc, BB_DIR_USR_BIN, BB_SUID_DROP))
385IF_WHICH(APPLET(which, BB_DIR_USR_BIN, BB_SUID_DROP))
386IF_WHOAMI(APPLET_NOFORK(whoami, whoami, BB_DIR_USR_BIN, BB_SUID_DROP, whoami)) 344IF_WHOAMI(APPLET_NOFORK(whoami, whoami, BB_DIR_USR_BIN, BB_SUID_DROP, whoami))
387IF_YES(APPLET_NOFORK(yes, yes, BB_DIR_USR_BIN, BB_SUID_DROP, yes)) 345IF_YES(APPLET_NOFORK(yes, yes, BB_DIR_USR_BIN, BB_SUID_DROP, yes))
388IF_ZCIP(APPLET(zcip, BB_DIR_SBIN, BB_SUID_DROP)) 346IF_ZCIP(APPLET(zcip, BB_DIR_SBIN, BB_SUID_DROP))
diff --git a/include/bb_archive.h b/include/bb_archive.h
index d94169627..e2c8aede4 100644
--- a/include/bb_archive.h
+++ b/include/bb_archive.h
@@ -105,6 +105,7 @@ typedef struct archive_handle_t {
105#endif 105#endif
106#if ENABLE_CPIO || ENABLE_RPM2CPIO || ENABLE_RPM 106#if ENABLE_CPIO || ENABLE_RPM2CPIO || ENABLE_RPM
107 uoff_t cpio__blocks; 107 uoff_t cpio__blocks;
108 struct bb_uidgid_t cpio__owner;
108 struct hardlinks_t *cpio__hardlinks_to_create; 109 struct hardlinks_t *cpio__hardlinks_to_create;
109 struct hardlinks_t *cpio__created_hardlinks; 110 struct hardlinks_t *cpio__created_hardlinks;
110#endif 111#endif
@@ -169,6 +170,8 @@ struct BUG_tar_header {
169}; 170};
170 171
171 172
173extern const char cpio_TRAILER[];
174
172 175
173archive_handle_t *init_handle(void) FAST_FUNC; 176archive_handle_t *init_handle(void) FAST_FUNC;
174 177
diff --git a/include/libbb.h b/include/libbb.h
index 2f90b35f7..de00abe7f 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -934,14 +934,13 @@ long xuname2uid(const char *name) FAST_FUNC;
934long xgroup2gid(const char *name) FAST_FUNC; 934long xgroup2gid(const char *name) FAST_FUNC;
935/* wrapper: allows string to contain numeric uid or gid */ 935/* wrapper: allows string to contain numeric uid or gid */
936unsigned long get_ug_id(const char *s, long FAST_FUNC (*xname2id)(const char *)) FAST_FUNC; 936unsigned long get_ug_id(const char *s, long FAST_FUNC (*xname2id)(const char *)) FAST_FUNC;
937/* from chpst. Does not die, returns 0 on failure */
938struct bb_uidgid_t { 937struct bb_uidgid_t {
939 uid_t uid; 938 uid_t uid;
940 gid_t gid; 939 gid_t gid;
941}; 940};
942/* always sets uid and gid */ 941/* always sets uid and gid; returns 0 on failure */
943int get_uidgid(struct bb_uidgid_t*, const char*, int numeric_ok) FAST_FUNC; 942int get_uidgid(struct bb_uidgid_t*, const char*) FAST_FUNC;
944/* always sets uid and gid, allows numeric; exits on failure */ 943/* always sets uid and gid; exits on failure */
945void xget_uidgid(struct bb_uidgid_t*, const char*) FAST_FUNC; 944void xget_uidgid(struct bb_uidgid_t*, const char*) FAST_FUNC;
946/* chown-like handling of "user[:[group]" */ 945/* chown-like handling of "user[:[group]" */
947void parse_chown_usergroup_or_die(struct bb_uidgid_t *u, char *user_group) FAST_FUNC; 946void parse_chown_usergroup_or_die(struct bb_uidgid_t *u, char *user_group) FAST_FUNC;
@@ -1807,7 +1806,7 @@ extern const char bb_msg_can_not_create_raw_socket[] ALIGN1;
1807extern const char bb_msg_perm_denied_are_you_root[] ALIGN1; 1806extern const char bb_msg_perm_denied_are_you_root[] ALIGN1;
1808extern const char bb_msg_you_must_be_root[] ALIGN1; 1807extern const char bb_msg_you_must_be_root[] ALIGN1;
1809extern const char bb_msg_requires_arg[] ALIGN1; 1808extern const char bb_msg_requires_arg[] ALIGN1;
1810extern const char bb_msg_invalid_arg[] ALIGN1; 1809extern const char bb_msg_invalid_arg_to[] ALIGN1;
1811extern const char bb_msg_standard_input[] ALIGN1; 1810extern const char bb_msg_standard_input[] ALIGN1;
1812extern const char bb_msg_standard_output[] ALIGN1; 1811extern const char bb_msg_standard_output[] ALIGN1;
1813 1812