diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/applets.src.h | 42 | ||||
-rw-r--r-- | include/bb_archive.h | 3 | ||||
-rw-r--r-- | include/libbb.h | 9 |
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 | |||
76 | IF_TEST(APPLET_NOFORK([, test, BB_DIR_USR_BIN, BB_SUID_DROP, test)) | 76 | IF_TEST(APPLET_NOFORK([, test, BB_DIR_USR_BIN, BB_SUID_DROP, test)) |
77 | IF_TEST(APPLET_NOFORK([[, test, BB_DIR_USR_BIN, BB_SUID_DROP, test)) | 77 | IF_TEST(APPLET_NOFORK([[, test, BB_DIR_USR_BIN, BB_SUID_DROP, test)) |
78 | IF_ACPID(APPLET(acpid, BB_DIR_SBIN, BB_SUID_DROP)) | 78 | IF_ACPID(APPLET(acpid, BB_DIR_SBIN, BB_SUID_DROP)) |
79 | IF_ADDGROUP(APPLET(addgroup, BB_DIR_USR_SBIN, BB_SUID_DROP)) | ||
80 | IF_ADDUSER(APPLET(adduser, BB_DIR_USR_SBIN, BB_SUID_DROP)) | ||
81 | IF_ADJTIMEX(APPLET(adjtimex, BB_DIR_SBIN, BB_SUID_DROP)) | 79 | IF_ADJTIMEX(APPLET(adjtimex, BB_DIR_SBIN, BB_SUID_DROP)) |
82 | IF_ARP(APPLET(arp, BB_DIR_SBIN, BB_SUID_DROP)) | 80 | IF_ARP(APPLET(arp, BB_DIR_SBIN, BB_SUID_DROP)) |
83 | IF_ARPING(APPLET(arping, BB_DIR_USR_SBIN, BB_SUID_DROP)) | 81 | IF_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)) | |||
90 | IF_CAT(APPLET_NOFORK(cat, cat, BB_DIR_BIN, BB_SUID_DROP, cat)) | 88 | IF_CAT(APPLET_NOFORK(cat, cat, BB_DIR_BIN, BB_SUID_DROP, cat)) |
91 | IF_CATV(APPLET(catv, BB_DIR_BIN, BB_SUID_DROP)) | 89 | IF_CATV(APPLET(catv, BB_DIR_BIN, BB_SUID_DROP)) |
92 | IF_CHAT(APPLET(chat, BB_DIR_USR_SBIN, BB_SUID_DROP)) | 90 | IF_CHAT(APPLET(chat, BB_DIR_USR_SBIN, BB_SUID_DROP)) |
93 | IF_CHATTR(APPLET(chattr, BB_DIR_BIN, BB_SUID_DROP)) | ||
94 | IF_CHCON(APPLET(chcon, BB_DIR_USR_BIN, BB_SUID_DROP)) | 91 | IF_CHCON(APPLET(chcon, BB_DIR_USR_BIN, BB_SUID_DROP)) |
95 | IF_CHGRP(APPLET_NOEXEC(chgrp, chgrp, BB_DIR_BIN, BB_SUID_DROP, chgrp)) | 92 | IF_CHGRP(APPLET_NOEXEC(chgrp, chgrp, BB_DIR_BIN, BB_SUID_DROP, chgrp)) |
96 | IF_CHMOD(APPLET_NOEXEC(chmod, chmod, BB_DIR_BIN, BB_SUID_DROP, chmod)) | 93 | IF_CHMOD(APPLET_NOEXEC(chmod, chmod, BB_DIR_BIN, BB_SUID_DROP, chmod)) |
97 | IF_CHOWN(APPLET_NOEXEC(chown, chown, BB_DIR_BIN, BB_SUID_DROP, chown)) | 94 | IF_CHOWN(APPLET_NOEXEC(chown, chown, BB_DIR_BIN, BB_SUID_DROP, chown)) |
98 | IF_CHPASSWD(APPLET(chpasswd, BB_DIR_USR_SBIN, BB_SUID_DROP)) | ||
99 | IF_CHPST(APPLET(chpst, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
100 | IF_CHROOT(APPLET(chroot, BB_DIR_USR_SBIN, BB_SUID_DROP)) | 95 | IF_CHROOT(APPLET(chroot, BB_DIR_USR_SBIN, BB_SUID_DROP)) |
101 | IF_CHRT(APPLET(chrt, BB_DIR_USR_BIN, BB_SUID_DROP)) | 96 | IF_CHRT(APPLET(chrt, BB_DIR_USR_BIN, BB_SUID_DROP)) |
102 | IF_CHVT(APPLET(chvt, BB_DIR_USR_BIN, BB_SUID_DROP)) | 97 | IF_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)) | |||
106 | IF_CP(APPLET_NOEXEC(cp, cp, BB_DIR_BIN, BB_SUID_DROP, cp)) | 101 | IF_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: */ |
108 | IF_CRONTAB(APPLET(crontab, BB_DIR_USR_BIN, BB_SUID_REQUIRE)) | 103 | IF_CRONTAB(APPLET(crontab, BB_DIR_USR_BIN, BB_SUID_REQUIRE)) |
109 | IF_CRYPTPW(APPLET(cryptpw, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
110 | IF_CUT(APPLET_NOEXEC(cut, cut, BB_DIR_USR_BIN, BB_SUID_DROP, cut)) | 104 | IF_CUT(APPLET_NOEXEC(cut, cut, BB_DIR_USR_BIN, BB_SUID_DROP, cut)) |
111 | IF_DC(APPLET(dc, BB_DIR_USR_BIN, BB_SUID_DROP)) | 105 | IF_DC(APPLET(dc, BB_DIR_USR_BIN, BB_SUID_DROP)) |
112 | IF_DD(APPLET_NOEXEC(dd, dd, BB_DIR_BIN, BB_SUID_DROP, dd)) | 106 | IF_DD(APPLET_NOEXEC(dd, dd, BB_DIR_BIN, BB_SUID_DROP, dd)) |
113 | IF_DEALLOCVT(APPLET(deallocvt, BB_DIR_USR_BIN, BB_SUID_DROP)) | 107 | IF_DEALLOCVT(APPLET(deallocvt, BB_DIR_USR_BIN, BB_SUID_DROP)) |
114 | IF_DELGROUP(APPLET_ODDNAME(delgroup, deluser, BB_DIR_USR_SBIN, BB_SUID_DROP, delgroup)) | ||
115 | IF_DELUSER(APPLET(deluser, BB_DIR_USR_SBIN, BB_SUID_DROP)) | ||
116 | IF_DEVFSD(APPLET(devfsd, BB_DIR_SBIN, BB_SUID_DROP)) | 108 | IF_DEVFSD(APPLET(devfsd, BB_DIR_SBIN, BB_SUID_DROP)) |
117 | IF_DEVMEM(APPLET(devmem, BB_DIR_SBIN, BB_SUID_DROP)) | 109 | IF_DEVMEM(APPLET(devmem, BB_DIR_SBIN, BB_SUID_DROP)) |
118 | IF_DF(APPLET(df, BB_DIR_BIN, BB_SUID_DROP)) | 110 | IF_DF(APPLET(df, BB_DIR_BIN, BB_SUID_DROP)) |
@@ -130,8 +122,6 @@ IF_DUMPLEASES(APPLET(dumpleases, BB_DIR_USR_BIN, BB_SUID_DROP)) | |||
130 | IF_ECHO(APPLET_NOFORK(echo, echo, BB_DIR_BIN, BB_SUID_DROP, echo)) | 122 | IF_ECHO(APPLET_NOFORK(echo, echo, BB_DIR_BIN, BB_SUID_DROP, echo)) |
131 | IF_EJECT(APPLET(eject, BB_DIR_USR_BIN, BB_SUID_DROP)) | 123 | IF_EJECT(APPLET(eject, BB_DIR_USR_BIN, BB_SUID_DROP)) |
132 | IF_ENV(APPLET_NOEXEC(env, env, BB_DIR_USR_BIN, BB_SUID_DROP, env)) | 124 | IF_ENV(APPLET_NOEXEC(env, env, BB_DIR_USR_BIN, BB_SUID_DROP, env)) |
133 | IF_ENVDIR(APPLET_ODDNAME(envdir, chpst, BB_DIR_USR_BIN, BB_SUID_DROP, envdir)) | ||
134 | IF_ENVUIDGID(APPLET_ODDNAME(envuidgid, chpst, BB_DIR_USR_BIN, BB_SUID_DROP, envuidgid)) | ||
135 | IF_ETHER_WAKE(APPLET_ODDNAME(ether-wake, ether_wake, BB_DIR_USR_SBIN, BB_SUID_DROP, ether_wake)) | 125 | IF_ETHER_WAKE(APPLET_ODDNAME(ether-wake, ether_wake, BB_DIR_USR_SBIN, BB_SUID_DROP, ether_wake)) |
136 | IF_EXPAND(APPLET(expand, BB_DIR_USR_BIN, BB_SUID_DROP)) | 126 | IF_EXPAND(APPLET(expand, BB_DIR_USR_BIN, BB_SUID_DROP)) |
137 | IF_EXPR(APPLET(expr, BB_DIR_USR_BIN, BB_SUID_DROP)) | 127 | IF_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)) | |||
153 | IF_FOLD(APPLET_NOEXEC(fold, fold, BB_DIR_USR_BIN, BB_SUID_DROP, fold)) | 143 | IF_FOLD(APPLET_NOEXEC(fold, fold, BB_DIR_USR_BIN, BB_SUID_DROP, fold)) |
154 | IF_FREE(APPLET(free, BB_DIR_USR_BIN, BB_SUID_DROP)) | 144 | IF_FREE(APPLET(free, BB_DIR_USR_BIN, BB_SUID_DROP)) |
155 | IF_FREERAMDISK(APPLET(freeramdisk, BB_DIR_SBIN, BB_SUID_DROP)) | 145 | IF_FREERAMDISK(APPLET(freeramdisk, BB_DIR_SBIN, BB_SUID_DROP)) |
156 | IF_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)) |
159 | IF_FSCK_MINIX(APPLET_ODDNAME(fsck.minix, fsck_minix, BB_DIR_SBIN, BB_SUID_DROP, fsck_minix)) | 148 | IF_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)) | |||
165 | IF_GETENFORCE(APPLET(getenforce, BB_DIR_USR_SBIN, BB_SUID_DROP)) | 154 | IF_GETENFORCE(APPLET(getenforce, BB_DIR_USR_SBIN, BB_SUID_DROP)) |
166 | IF_GETOPT(APPLET(getopt, BB_DIR_BIN, BB_SUID_DROP)) | 155 | IF_GETOPT(APPLET(getopt, BB_DIR_BIN, BB_SUID_DROP)) |
167 | IF_GETSEBOOL(APPLET(getsebool, BB_DIR_USR_SBIN, BB_SUID_DROP)) | 156 | IF_GETSEBOOL(APPLET(getsebool, BB_DIR_USR_SBIN, BB_SUID_DROP)) |
168 | IF_GETTY(APPLET(getty, BB_DIR_SBIN, BB_SUID_DROP)) | ||
169 | IF_HD(APPLET_NOEXEC(hd, hexdump, BB_DIR_USR_BIN, BB_SUID_DROP, hd)) | 157 | IF_HD(APPLET_NOEXEC(hd, hexdump, BB_DIR_USR_BIN, BB_SUID_DROP, hd)) |
170 | IF_HDPARM(APPLET(hdparm, BB_DIR_SBIN, BB_SUID_DROP)) | 158 | IF_HDPARM(APPLET(hdparm, BB_DIR_SBIN, BB_SUID_DROP)) |
171 | IF_HEAD(APPLET_NOEXEC(head, head, BB_DIR_USR_BIN, BB_SUID_DROP, head)) | 159 | IF_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)) | |||
201 | IF_KILL(APPLET(kill, BB_DIR_BIN, BB_SUID_DROP)) | 189 | IF_KILL(APPLET(kill, BB_DIR_BIN, BB_SUID_DROP)) |
202 | IF_KILLALL(APPLET_ODDNAME(killall, kill, BB_DIR_USR_BIN, BB_SUID_DROP, killall)) | 190 | IF_KILLALL(APPLET_ODDNAME(killall, kill, BB_DIR_USR_BIN, BB_SUID_DROP, killall)) |
203 | IF_KILLALL5(APPLET_ODDNAME(killall5, kill, BB_DIR_USR_SBIN, BB_SUID_DROP, killall5)) | 191 | IF_KILLALL5(APPLET_ODDNAME(killall5, kill, BB_DIR_USR_SBIN, BB_SUID_DROP, killall5)) |
204 | IF_KLOGD(APPLET(klogd, BB_DIR_SBIN, BB_SUID_DROP)) | ||
205 | IF_LAST(APPLET(last, BB_DIR_USR_BIN, BB_SUID_DROP)) | 192 | IF_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)) |
207 | IF_LESS(APPLET(less, BB_DIR_USR_BIN, BB_SUID_DROP)) | 194 | IF_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)) | |||
211 | IF_LOAD_POLICY(APPLET(load_policy, BB_DIR_USR_SBIN, BB_SUID_DROP)) | 198 | IF_LOAD_POLICY(APPLET(load_policy, BB_DIR_USR_SBIN, BB_SUID_DROP)) |
212 | IF_LOADFONT(APPLET(loadfont, BB_DIR_USR_SBIN, BB_SUID_DROP)) | 199 | IF_LOADFONT(APPLET(loadfont, BB_DIR_USR_SBIN, BB_SUID_DROP)) |
213 | IF_LOADKMAP(APPLET(loadkmap, BB_DIR_SBIN, BB_SUID_DROP)) | 200 | IF_LOADKMAP(APPLET(loadkmap, BB_DIR_SBIN, BB_SUID_DROP)) |
214 | IF_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: */ | ||
216 | IF_LOGIN(APPLET(login, BB_DIR_BIN, BB_SUID_REQUIRE)) | ||
217 | IF_LOGNAME(APPLET_NOFORK(logname, logname, BB_DIR_USR_BIN, BB_SUID_DROP, logname)) | 201 | IF_LOGNAME(APPLET_NOFORK(logname, logname, BB_DIR_USR_BIN, BB_SUID_DROP, logname)) |
218 | IF_LOGREAD(APPLET(logread, BB_DIR_SBIN, BB_SUID_DROP)) | ||
219 | IF_LOSETUP(APPLET(losetup, BB_DIR_SBIN, BB_SUID_DROP)) | 202 | IF_LOSETUP(APPLET(losetup, BB_DIR_SBIN, BB_SUID_DROP)) |
220 | IF_LPD(APPLET(lpd, BB_DIR_USR_SBIN, BB_SUID_DROP)) | ||
221 | IF_LPQ(APPLET_ODDNAME(lpq, lpqr, BB_DIR_USR_BIN, BB_SUID_DROP, lpq)) | ||
222 | IF_LPR(APPLET_ODDNAME(lpr, lpqr, BB_DIR_USR_BIN, BB_SUID_DROP, lpr)) | ||
223 | IF_LS(APPLET_NOEXEC(ls, ls, BB_DIR_BIN, BB_SUID_DROP, ls)) | 203 | IF_LS(APPLET_NOEXEC(ls, ls, BB_DIR_BIN, BB_SUID_DROP, ls)) |
224 | IF_LSATTR(APPLET(lsattr, BB_DIR_BIN, BB_SUID_DROP)) | ||
225 | IF_LSPCI(APPLET(lspci, BB_DIR_USR_BIN, BB_SUID_DROP)) | 204 | IF_LSPCI(APPLET(lspci, BB_DIR_USR_BIN, BB_SUID_DROP)) |
226 | IF_LSUSB(APPLET(lsusb, BB_DIR_USR_BIN, BB_SUID_DROP)) | 205 | IF_LSUSB(APPLET(lsusb, BB_DIR_USR_BIN, BB_SUID_DROP)) |
227 | IF_MAKEDEVS(APPLET(makedevs, BB_DIR_SBIN, BB_SUID_DROP)) | 206 | IF_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, | |||
240 | IF_MKFS_REISER(APPLET_ODDNAME(mkfs.reiser, mkfs_reiser, BB_DIR_SBIN, BB_SUID_DROP, mkfs_reiser)) | 219 | IF_MKFS_REISER(APPLET_ODDNAME(mkfs.reiser, mkfs_reiser, BB_DIR_SBIN, BB_SUID_DROP, mkfs_reiser)) |
241 | IF_MKFS_VFAT(APPLET_ODDNAME(mkfs.vfat, mkfs_vfat, BB_DIR_SBIN, BB_SUID_DROP, mkfs_vfat)) | 220 | IF_MKFS_VFAT(APPLET_ODDNAME(mkfs.vfat, mkfs_vfat, BB_DIR_SBIN, BB_SUID_DROP, mkfs_vfat)) |
242 | IF_MKNOD(APPLET_NOEXEC(mknod, mknod, BB_DIR_BIN, BB_SUID_DROP, mknod)) | 221 | IF_MKNOD(APPLET_NOEXEC(mknod, mknod, BB_DIR_BIN, BB_SUID_DROP, mknod)) |
243 | IF_CRYPTPW(APPLET_ODDNAME(mkpasswd, cryptpw, BB_DIR_USR_BIN, BB_SUID_DROP, mkpasswd)) | ||
244 | IF_MKSWAP(APPLET(mkswap, BB_DIR_SBIN, BB_SUID_DROP)) | 222 | IF_MKSWAP(APPLET(mkswap, BB_DIR_SBIN, BB_SUID_DROP)) |
245 | IF_MKTEMP(APPLET(mktemp, BB_DIR_BIN, BB_SUID_DROP)) | ||
246 | IF_MORE(APPLET(more, BB_DIR_BIN, BB_SUID_DROP)) | 223 | IF_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)) | |||
262 | IF_OD(APPLET(od, BB_DIR_USR_BIN, BB_SUID_DROP)) | 239 | IF_OD(APPLET(od, BB_DIR_USR_BIN, BB_SUID_DROP)) |
263 | IF_OPENVT(APPLET(openvt, BB_DIR_USR_BIN, BB_SUID_DROP)) | 240 | IF_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}: */ | ||
266 | IF_PASSWD(APPLET(passwd, BB_DIR_USR_BIN, BB_SUID_REQUIRE)) | ||
267 | IF_PGREP(APPLET(pgrep, BB_DIR_USR_BIN, BB_SUID_DROP)) | 242 | IF_PGREP(APPLET(pgrep, BB_DIR_USR_BIN, BB_SUID_DROP)) |
268 | IF_PIDOF(APPLET(pidof, BB_DIR_BIN, BB_SUID_DROP)) | 243 | IF_PIDOF(APPLET(pidof, BB_DIR_BIN, BB_SUID_DROP)) |
269 | IF_PIPE_PROGRESS(APPLET(pipe_progress, BB_DIR_BIN, BB_SUID_DROP)) | ||
270 | IF_PIVOT_ROOT(APPLET(pivot_root, BB_DIR_SBIN, BB_SUID_DROP)) | 244 | IF_PIVOT_ROOT(APPLET(pivot_root, BB_DIR_SBIN, BB_SUID_DROP)) |
271 | IF_PKILL(APPLET_ODDNAME(pkill, pgrep, BB_DIR_USR_BIN, BB_SUID_DROP, pkill)) | 245 | IF_PKILL(APPLET_ODDNAME(pkill, pgrep, BB_DIR_USR_BIN, BB_SUID_DROP, pkill)) |
272 | IF_POPMAILDIR(APPLET(popmaildir, BB_DIR_USR_SBIN, BB_SUID_DROP)) | 246 | IF_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)) | |||
291 | IF_RMDIR(APPLET_NOFORK(rmdir, rmdir, BB_DIR_BIN, BB_SUID_DROP, rmdir)) | 265 | IF_RMDIR(APPLET_NOFORK(rmdir, rmdir, BB_DIR_BIN, BB_SUID_DROP, rmdir)) |
292 | IF_ROUTE(APPLET(route, BB_DIR_SBIN, BB_SUID_DROP)) | 266 | IF_ROUTE(APPLET(route, BB_DIR_SBIN, BB_SUID_DROP)) |
293 | IF_RTCWAKE(APPLET(rtcwake, BB_DIR_USR_SBIN, BB_SUID_DROP)) | 267 | IF_RTCWAKE(APPLET(rtcwake, BB_DIR_USR_SBIN, BB_SUID_DROP)) |
294 | IF_RUN_PARTS(APPLET_ODDNAME(run-parts, run_parts, BB_DIR_BIN, BB_SUID_DROP, run_parts)) | ||
295 | IF_RUNCON(APPLET(runcon, BB_DIR_USR_BIN, BB_SUID_DROP)) | 268 | IF_RUNCON(APPLET(runcon, BB_DIR_USR_BIN, BB_SUID_DROP)) |
296 | IF_RUNLEVEL(APPLET(runlevel, BB_DIR_SBIN, BB_SUID_DROP)) | 269 | IF_RUNLEVEL(APPLET(runlevel, BB_DIR_SBIN, BB_SUID_DROP)) |
297 | IF_RUNSV(APPLET(runsv, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
298 | IF_RUNSVDIR(APPLET(runsvdir, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
299 | IF_RX(APPLET(rx, BB_DIR_USR_BIN, BB_SUID_DROP)) | 270 | IF_RX(APPLET(rx, BB_DIR_USR_BIN, BB_SUID_DROP)) |
300 | IF_SCRIPT(APPLET(script, BB_DIR_USR_BIN, BB_SUID_DROP)) | 271 | IF_SCRIPT(APPLET(script, BB_DIR_USR_BIN, BB_SUID_DROP)) |
301 | IF_SCRIPTREPLAY(APPLET(scriptreplay, BB_DIR_BIN, BB_SUID_DROP)) | 272 | IF_SCRIPTREPLAY(APPLET(scriptreplay, BB_DIR_BIN, BB_SUID_DROP)) |
@@ -312,7 +283,6 @@ IF_SETKEYCODES(APPLET(setkeycodes, BB_DIR_USR_BIN, BB_SUID_DROP)) | |||
312 | IF_SETLOGCONS(APPLET(setlogcons, BB_DIR_USR_SBIN, BB_SUID_DROP)) | 283 | IF_SETLOGCONS(APPLET(setlogcons, BB_DIR_USR_SBIN, BB_SUID_DROP)) |
313 | IF_SETSEBOOL(APPLET(setsebool, BB_DIR_USR_SBIN, BB_SUID_DROP)) | 284 | IF_SETSEBOOL(APPLET(setsebool, BB_DIR_USR_SBIN, BB_SUID_DROP)) |
314 | IF_SETSID(APPLET(setsid, BB_DIR_USR_BIN, BB_SUID_DROP)) | 285 | IF_SETSID(APPLET(setsid, BB_DIR_USR_BIN, BB_SUID_DROP)) |
315 | IF_SETUIDGID(APPLET_ODDNAME(setuidgid, chpst, BB_DIR_USR_BIN, BB_SUID_DROP, setuidgid)) | ||
316 | IF_SHA1SUM(APPLET_NOEXEC(sha1sum, md5_sha1_sum, BB_DIR_USR_BIN, BB_SUID_DROP, sha1sum)) | 286 | IF_SHA1SUM(APPLET_NOEXEC(sha1sum, md5_sha1_sum, BB_DIR_USR_BIN, BB_SUID_DROP, sha1sum)) |
317 | IF_SHA3SUM(APPLET_NOEXEC(sha3sum, md5_sha1_sum, BB_DIR_USR_BIN, BB_SUID_DROP, sha3sum)) | 287 | IF_SHA3SUM(APPLET_NOEXEC(sha3sum, md5_sha1_sum, BB_DIR_USR_BIN, BB_SUID_DROP, sha3sum)) |
318 | IF_SHA256SUM(APPLET_NOEXEC(sha256sum, md5_sha1_sum, BB_DIR_USR_BIN, BB_SUID_DROP, sha256sum)) | 288 | IF_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)) | |||
321 | IF_SLATTACH(APPLET(slattach, BB_DIR_SBIN, BB_SUID_DROP)) | 291 | IF_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: */ |
323 | IF_SLEEP(APPLET(sleep, BB_DIR_BIN, BB_SUID_DROP)) | 293 | IF_SLEEP(APPLET(sleep, BB_DIR_BIN, BB_SUID_DROP)) |
324 | IF_SOFTLIMIT(APPLET_ODDNAME(softlimit, chpst, BB_DIR_USR_BIN, BB_SUID_DROP, softlimit)) | ||
325 | IF_SORT(APPLET_NOEXEC(sort, sort, BB_DIR_USR_BIN, BB_SUID_DROP, sort)) | 294 | IF_SORT(APPLET_NOEXEC(sort, sort, BB_DIR_USR_BIN, BB_SUID_DROP, sort)) |
326 | IF_SPLIT(APPLET(split, BB_DIR_USR_BIN, BB_SUID_DROP)) | 295 | IF_SPLIT(APPLET(split, BB_DIR_USR_BIN, BB_SUID_DROP)) |
327 | IF_START_STOP_DAEMON(APPLET_ODDNAME(start-stop-daemon, start_stop_daemon, BB_DIR_SBIN, BB_SUID_DROP, start_stop_daemon)) | ||
328 | IF_STAT(APPLET(stat, BB_DIR_BIN, BB_SUID_DROP)) | 296 | IF_STAT(APPLET(stat, BB_DIR_BIN, BB_SUID_DROP)) |
329 | IF_STRINGS(APPLET(strings, BB_DIR_USR_BIN, BB_SUID_DROP)) | 297 | IF_STRINGS(APPLET(strings, BB_DIR_USR_BIN, BB_SUID_DROP)) |
330 | IF_STTY(APPLET(stty, BB_DIR_BIN, BB_SUID_DROP)) | 298 | IF_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: */ | ||
332 | IF_SU(APPLET(su, BB_DIR_BIN, BB_SUID_REQUIRE)) | ||
333 | IF_SULOGIN(APPLET(sulogin, BB_DIR_SBIN, BB_SUID_DROP)) | ||
334 | IF_SUM(APPLET(sum, BB_DIR_USR_BIN, BB_SUID_DROP)) | 299 | IF_SUM(APPLET(sum, BB_DIR_USR_BIN, BB_SUID_DROP)) |
335 | IF_SV(APPLET(sv, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
336 | IF_SVLOGD(APPLET(svlogd, BB_DIR_USR_SBIN, BB_SUID_DROP)) | ||
337 | IF_SWAPONOFF(APPLET_ODDNAME(swapoff, swap_on_off, BB_DIR_SBIN, BB_SUID_DROP, swapoff)) | 300 | IF_SWAPONOFF(APPLET_ODDNAME(swapoff, swap_on_off, BB_DIR_SBIN, BB_SUID_DROP, swapoff)) |
338 | IF_SWAPONOFF(APPLET_ODDNAME(swapon, swap_on_off, BB_DIR_SBIN, BB_SUID_DROP, swapon)) | 301 | IF_SWAPONOFF(APPLET_ODDNAME(swapon, swap_on_off, BB_DIR_SBIN, BB_SUID_DROP, swapon)) |
339 | IF_SWITCH_ROOT(APPLET(switch_root, BB_DIR_SBIN, BB_SUID_DROP)) | 302 | IF_SWITCH_ROOT(APPLET(switch_root, BB_DIR_SBIN, BB_SUID_DROP)) |
340 | IF_BB_SYSCTL(APPLET(sysctl, BB_DIR_SBIN, BB_SUID_DROP)) | 303 | IF_BB_SYSCTL(APPLET(sysctl, BB_DIR_SBIN, BB_SUID_DROP)) |
341 | IF_SYSLOGD(APPLET(syslogd, BB_DIR_SBIN, BB_SUID_DROP)) | ||
342 | IF_TAC(APPLET_NOEXEC(tac, tac, BB_DIR_USR_BIN, BB_SUID_DROP, tac)) | 304 | IF_TAC(APPLET_NOEXEC(tac, tac, BB_DIR_USR_BIN, BB_SUID_DROP, tac)) |
343 | IF_TAIL(APPLET(tail, BB_DIR_USR_BIN, BB_SUID_DROP)) | 305 | IF_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)) | |||
362 | IF_TTY(APPLET(tty, BB_DIR_USR_BIN, BB_SUID_DROP)) | 324 | IF_TTY(APPLET(tty, BB_DIR_USR_BIN, BB_SUID_DROP)) |
363 | IF_TTYSIZE(APPLET(ttysize, BB_DIR_USR_BIN, BB_SUID_DROP)) | 325 | IF_TTYSIZE(APPLET(ttysize, BB_DIR_USR_BIN, BB_SUID_DROP)) |
364 | IF_TUNCTL(APPLET(tunctl, BB_DIR_SBIN, BB_SUID_DROP)) | 326 | IF_TUNCTL(APPLET(tunctl, BB_DIR_SBIN, BB_SUID_DROP)) |
365 | IF_TUNE2FS(APPLET(tune2fs, BB_DIR_SBIN, BB_SUID_DROP)) | ||
366 | IF_UDHCPC(APPLET(udhcpc, BB_DIR_SBIN, BB_SUID_DROP)) | 327 | IF_UDHCPC(APPLET(udhcpc, BB_DIR_SBIN, BB_SUID_DROP)) |
367 | IF_UDHCPD(APPLET(udhcpd, BB_DIR_USR_SBIN, BB_SUID_DROP)) | 328 | IF_UDHCPD(APPLET(udhcpd, BB_DIR_USR_SBIN, BB_SUID_DROP)) |
368 | IF_UDPSVD(APPLET_ODDNAME(udpsvd, tcpudpsvd, BB_DIR_USR_BIN, BB_SUID_DROP, udpsvd)) | 329 | IF_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)) | |||
376 | IF_UUDECODE(APPLET(uudecode, BB_DIR_USR_BIN, BB_SUID_DROP)) | 337 | IF_UUDECODE(APPLET(uudecode, BB_DIR_USR_BIN, BB_SUID_DROP)) |
377 | IF_UUENCODE(APPLET(uuencode, BB_DIR_USR_BIN, BB_SUID_DROP)) | 338 | IF_UUENCODE(APPLET(uuencode, BB_DIR_USR_BIN, BB_SUID_DROP)) |
378 | IF_VCONFIG(APPLET(vconfig, BB_DIR_SBIN, BB_SUID_DROP)) | 339 | IF_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: */ | ||
380 | IF_VLOCK(APPLET(vlock, BB_DIR_USR_BIN, BB_SUID_REQUIRE)) | ||
381 | IF_VOLNAME(APPLET(volname, BB_DIR_USR_BIN, BB_SUID_DROP)) | 340 | IF_VOLNAME(APPLET(volname, BB_DIR_USR_BIN, BB_SUID_DROP)) |
382 | IF_WATCH(APPLET(watch, BB_DIR_BIN, BB_SUID_DROP)) | 341 | IF_WATCH(APPLET(watch, BB_DIR_BIN, BB_SUID_DROP)) |
383 | IF_WATCHDOG(APPLET(watchdog, BB_DIR_SBIN, BB_SUID_DROP)) | 342 | IF_WATCHDOG(APPLET(watchdog, BB_DIR_SBIN, BB_SUID_DROP)) |
384 | IF_WC(APPLET(wc, BB_DIR_USR_BIN, BB_SUID_DROP)) | 343 | IF_WC(APPLET(wc, BB_DIR_USR_BIN, BB_SUID_DROP)) |
385 | IF_WHICH(APPLET(which, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
386 | IF_WHOAMI(APPLET_NOFORK(whoami, whoami, BB_DIR_USR_BIN, BB_SUID_DROP, whoami)) | 344 | IF_WHOAMI(APPLET_NOFORK(whoami, whoami, BB_DIR_USR_BIN, BB_SUID_DROP, whoami)) |
387 | IF_YES(APPLET_NOFORK(yes, yes, BB_DIR_USR_BIN, BB_SUID_DROP, yes)) | 345 | IF_YES(APPLET_NOFORK(yes, yes, BB_DIR_USR_BIN, BB_SUID_DROP, yes)) |
388 | IF_ZCIP(APPLET(zcip, BB_DIR_SBIN, BB_SUID_DROP)) | 346 | IF_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 | ||
173 | extern const char cpio_TRAILER[]; | ||
174 | |||
172 | 175 | ||
173 | archive_handle_t *init_handle(void) FAST_FUNC; | 176 | archive_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; | |||
934 | long xgroup2gid(const char *name) FAST_FUNC; | 934 | long 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 */ |
936 | unsigned long get_ug_id(const char *s, long FAST_FUNC (*xname2id)(const char *)) FAST_FUNC; | 936 | unsigned 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 */ | ||
938 | struct bb_uidgid_t { | 937 | struct 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 */ |
943 | int get_uidgid(struct bb_uidgid_t*, const char*, int numeric_ok) FAST_FUNC; | 942 | int 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 */ |
945 | void xget_uidgid(struct bb_uidgid_t*, const char*) FAST_FUNC; | 944 | void xget_uidgid(struct bb_uidgid_t*, const char*) FAST_FUNC; |
946 | /* chown-like handling of "user[:[group]" */ | 945 | /* chown-like handling of "user[:[group]" */ |
947 | void parse_chown_usergroup_or_die(struct bb_uidgid_t *u, char *user_group) FAST_FUNC; | 946 | void 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; | |||
1807 | extern const char bb_msg_perm_denied_are_you_root[] ALIGN1; | 1806 | extern const char bb_msg_perm_denied_are_you_root[] ALIGN1; |
1808 | extern const char bb_msg_you_must_be_root[] ALIGN1; | 1807 | extern const char bb_msg_you_must_be_root[] ALIGN1; |
1809 | extern const char bb_msg_requires_arg[] ALIGN1; | 1808 | extern const char bb_msg_requires_arg[] ALIGN1; |
1810 | extern const char bb_msg_invalid_arg[] ALIGN1; | 1809 | extern const char bb_msg_invalid_arg_to[] ALIGN1; |
1811 | extern const char bb_msg_standard_input[] ALIGN1; | 1810 | extern const char bb_msg_standard_input[] ALIGN1; |
1812 | extern const char bb_msg_standard_output[] ALIGN1; | 1811 | extern const char bb_msg_standard_output[] ALIGN1; |
1813 | 1812 | ||