diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/applets.src.h | 29 | ||||
-rw-r--r-- | include/archive.h (renamed from include/unarchive.h) | 4 | ||||
-rw-r--r-- | include/grp_.h | 2 | ||||
-rw-r--r-- | include/libbb.h | 1 | ||||
-rw-r--r-- | include/liblzo_interface.h | 71 | ||||
-rw-r--r-- | include/platform.h | 2 | ||||
-rw-r--r-- | include/pwd_.h | 2 | ||||
-rw-r--r-- | include/rtc_.h | 4 | ||||
-rw-r--r-- | include/usage.src.h | 255 | ||||
-rw-r--r-- | include/volume_id.h | 1 |
10 files changed, 106 insertions, 265 deletions
diff --git a/include/applets.src.h b/include/applets.src.h index 879dbf760..261ef2333 100644 --- a/include/applets.src.h +++ b/include/applets.src.h | |||
@@ -16,6 +16,8 @@ s - suid type: | |||
16 | and is run by non-root (applet_main() will not be called at all) | 16 | and is run by non-root (applet_main() will not be called at all) |
17 | _BB_SUID_DROP: will drop suid prior to applet_main() | 17 | _BB_SUID_DROP: will drop suid prior to applet_main() |
18 | _BB_SUID_MAYBE: neither of the above | 18 | _BB_SUID_MAYBE: neither of the above |
19 | (every instance of _BB_SUID_REQUIRE and _BB_SUID_MAYBE | ||
20 | needs to be justified in comment) | ||
19 | */ | 21 | */ |
20 | 22 | ||
21 | #if defined(PROTOTYPES) | 23 | #if defined(PROTOTYPES) |
@@ -56,6 +58,11 @@ s - suid type: | |||
56 | # define APPLET_NOFORK(name,main,l,s,name2) { #name, #main, l, s, 1, 1 }, | 58 | # define APPLET_NOFORK(name,main,l,s,name2) { #name, #main, l, s, 1, 1 }, |
57 | #endif | 59 | #endif |
58 | 60 | ||
61 | #if ENABLE_INSTALL_NO_USR | ||
62 | # define _BB_DIR_USR_BIN _BB_DIR_BIN | ||
63 | # define _BB_DIR_USR_SBIN _BB_DIR_SBIN | ||
64 | #endif | ||
65 | |||
59 | 66 | ||
60 | INSERT | 67 | INSERT |
61 | IF_TEST(APPLET_NOFORK([, test, _BB_DIR_USR_BIN, _BB_SUID_DROP, test)) | 68 | IF_TEST(APPLET_NOFORK([, test, _BB_DIR_USR_BIN, _BB_SUID_DROP, test)) |
@@ -95,6 +102,7 @@ IF_COMM(APPLET(comm, _BB_DIR_USR_BIN, _BB_SUID_DROP)) | |||
95 | IF_CP(APPLET_NOEXEC(cp, cp, _BB_DIR_BIN, _BB_SUID_DROP, cp)) | 102 | IF_CP(APPLET_NOEXEC(cp, cp, _BB_DIR_BIN, _BB_SUID_DROP, cp)) |
96 | IF_CPIO(APPLET(cpio, _BB_DIR_BIN, _BB_SUID_DROP)) | 103 | IF_CPIO(APPLET(cpio, _BB_DIR_BIN, _BB_SUID_DROP)) |
97 | IF_CROND(APPLET(crond, _BB_DIR_USR_SBIN, _BB_SUID_DROP)) | 104 | IF_CROND(APPLET(crond, _BB_DIR_USR_SBIN, _BB_SUID_DROP)) |
105 | /* Needs to be run by root or be suid root - needs to change /var/spool/cron* files: */ | ||
98 | IF_CRONTAB(APPLET(crontab, _BB_DIR_USR_BIN, _BB_SUID_REQUIRE)) | 106 | IF_CRONTAB(APPLET(crontab, _BB_DIR_USR_BIN, _BB_SUID_REQUIRE)) |
99 | IF_CRYPTPW(APPLET(cryptpw, _BB_DIR_USR_BIN, _BB_SUID_DROP)) | 107 | IF_CRYPTPW(APPLET(cryptpw, _BB_DIR_USR_BIN, _BB_SUID_DROP)) |
100 | IF_CUT(APPLET_NOEXEC(cut, cut, _BB_DIR_USR_BIN, _BB_SUID_DROP, cut)) | 108 | IF_CUT(APPLET_NOEXEC(cut, cut, _BB_DIR_USR_BIN, _BB_SUID_DROP, cut)) |
@@ -110,6 +118,7 @@ IF_DHCPRELAY(APPLET(dhcprelay, _BB_DIR_USR_SBIN, _BB_SUID_DROP)) | |||
110 | IF_DIFF(APPLET(diff, _BB_DIR_USR_BIN, _BB_SUID_DROP)) | 118 | IF_DIFF(APPLET(diff, _BB_DIR_USR_BIN, _BB_SUID_DROP)) |
111 | IF_DIRNAME(APPLET_NOFORK(dirname, dirname, _BB_DIR_USR_BIN, _BB_SUID_DROP, dirname)) | 119 | IF_DIRNAME(APPLET_NOFORK(dirname, dirname, _BB_DIR_USR_BIN, _BB_SUID_DROP, dirname)) |
112 | IF_DMESG(APPLET(dmesg, _BB_DIR_BIN, _BB_SUID_DROP)) | 120 | IF_DMESG(APPLET(dmesg, _BB_DIR_BIN, _BB_SUID_DROP)) |
121 | /* Why _BB_SUID_REQUIRE? */ | ||
113 | IF_DNSD(APPLET(dnsd, _BB_DIR_USR_SBIN, _BB_SUID_REQUIRE)) | 122 | IF_DNSD(APPLET(dnsd, _BB_DIR_USR_SBIN, _BB_SUID_REQUIRE)) |
114 | IF_HOSTNAME(APPLET_ODDNAME(dnsdomainname, hostname, _BB_DIR_BIN, _BB_SUID_DROP, dnsdomainname)) | 123 | IF_HOSTNAME(APPLET_ODDNAME(dnsdomainname, hostname, _BB_DIR_BIN, _BB_SUID_DROP, dnsdomainname)) |
115 | IF_DOS2UNIX(APPLET_NOEXEC(dos2unix, dos2unix, _BB_DIR_USR_BIN, _BB_SUID_DROP, dos2unix)) | 124 | IF_DOS2UNIX(APPLET_NOEXEC(dos2unix, dos2unix, _BB_DIR_USR_BIN, _BB_SUID_DROP, dos2unix)) |
@@ -137,6 +146,7 @@ IF_FDFLUSH(APPLET_ODDNAME(fdflush, freeramdisk, _BB_DIR_BIN, _BB_SUID_DROP, fdfl | |||
137 | IF_FDFORMAT(APPLET(fdformat, _BB_DIR_USR_BIN, _BB_SUID_DROP)) | 146 | IF_FDFORMAT(APPLET(fdformat, _BB_DIR_USR_BIN, _BB_SUID_DROP)) |
138 | IF_FDISK(APPLET(fdisk, _BB_DIR_SBIN, _BB_SUID_DROP)) | 147 | IF_FDISK(APPLET(fdisk, _BB_DIR_SBIN, _BB_SUID_DROP)) |
139 | IF_FGCONSOLE(APPLET(fgconsole, _BB_DIR_USR_BIN, _BB_SUID_DROP)) | 148 | IF_FGCONSOLE(APPLET(fgconsole, _BB_DIR_USR_BIN, _BB_SUID_DROP)) |
149 | /* Benefits from suid root: better access to /dev/BLOCKDEVs: */ | ||
140 | IF_FINDFS(APPLET(findfs, _BB_DIR_SBIN, _BB_SUID_MAYBE)) | 150 | IF_FINDFS(APPLET(findfs, _BB_DIR_SBIN, _BB_SUID_MAYBE)) |
141 | IF_FLASH_ERASEALL(APPLET(flash_eraseall, _BB_DIR_USR_SBIN, _BB_SUID_DROP)) | 151 | IF_FLASH_ERASEALL(APPLET(flash_eraseall, _BB_DIR_USR_SBIN, _BB_SUID_DROP)) |
142 | IF_FLASH_LOCK(APPLET_ODDNAME(flash_lock, flash_lock_unlock, _BB_DIR_USR_SBIN, _BB_SUID_DROP, flash_lock)) | 152 | IF_FLASH_LOCK(APPLET_ODDNAME(flash_lock, flash_lock_unlock, _BB_DIR_USR_SBIN, _BB_SUID_DROP, flash_lock)) |
@@ -188,7 +198,9 @@ IF_IP(APPLET(ip, _BB_DIR_BIN, _BB_SUID_DROP)) | |||
188 | #endif | 198 | #endif |
189 | IF_IPADDR(APPLET(ipaddr, _BB_DIR_BIN, _BB_SUID_DROP)) | 199 | IF_IPADDR(APPLET(ipaddr, _BB_DIR_BIN, _BB_SUID_DROP)) |
190 | IF_IPCALC(APPLET(ipcalc, _BB_DIR_BIN, _BB_SUID_DROP)) | 200 | IF_IPCALC(APPLET(ipcalc, _BB_DIR_BIN, _BB_SUID_DROP)) |
201 | /* Why _BB_SUID_REQUIRE? On Fedora, it isn't suid root */ | ||
191 | IF_IPCRM(APPLET(ipcrm, _BB_DIR_USR_BIN, _BB_SUID_REQUIRE)) | 202 | IF_IPCRM(APPLET(ipcrm, _BB_DIR_USR_BIN, _BB_SUID_REQUIRE)) |
203 | /* Why _BB_SUID_REQUIRE? On Fedora, it isn't suid root */ | ||
192 | IF_IPCS(APPLET(ipcs, _BB_DIR_USR_BIN, _BB_SUID_REQUIRE)) | 204 | IF_IPCS(APPLET(ipcs, _BB_DIR_USR_BIN, _BB_SUID_REQUIRE)) |
193 | IF_IPLINK(APPLET(iplink, _BB_DIR_BIN, _BB_SUID_DROP)) | 205 | IF_IPLINK(APPLET(iplink, _BB_DIR_BIN, _BB_SUID_DROP)) |
194 | IF_IPROUTE(APPLET(iproute, _BB_DIR_BIN, _BB_SUID_DROP)) | 206 | IF_IPROUTE(APPLET(iproute, _BB_DIR_BIN, _BB_SUID_DROP)) |
@@ -209,6 +221,7 @@ IF_LOAD_POLICY(APPLET(load_policy, _BB_DIR_USR_SBIN, _BB_SUID_DROP)) | |||
209 | IF_LOADFONT(APPLET(loadfont, _BB_DIR_USR_SBIN, _BB_SUID_DROP)) | 221 | IF_LOADFONT(APPLET(loadfont, _BB_DIR_USR_SBIN, _BB_SUID_DROP)) |
210 | IF_LOADKMAP(APPLET(loadkmap, _BB_DIR_SBIN, _BB_SUID_DROP)) | 222 | IF_LOADKMAP(APPLET(loadkmap, _BB_DIR_SBIN, _BB_SUID_DROP)) |
211 | IF_LOGGER(APPLET(logger, _BB_DIR_USR_BIN, _BB_SUID_DROP)) | 223 | IF_LOGGER(APPLET(logger, _BB_DIR_USR_BIN, _BB_SUID_DROP)) |
224 | /* Needs to be run by root or be suid root - needs to change uid and gid: */ | ||
212 | IF_LOGIN(APPLET(login, _BB_DIR_BIN, _BB_SUID_REQUIRE)) | 225 | IF_LOGIN(APPLET(login, _BB_DIR_BIN, _BB_SUID_REQUIRE)) |
213 | IF_LOGNAME(APPLET_NOFORK(logname, logname, _BB_DIR_USR_BIN, _BB_SUID_DROP, logname)) | 226 | IF_LOGNAME(APPLET_NOFORK(logname, logname, _BB_DIR_USR_BIN, _BB_SUID_DROP, logname)) |
214 | IF_LOGREAD(APPLET(logread, _BB_DIR_SBIN, _BB_SUID_DROP)) | 227 | IF_LOGREAD(APPLET(logread, _BB_DIR_SBIN, _BB_SUID_DROP)) |
@@ -245,6 +258,10 @@ IF_CRYPTPW(APPLET_ODDNAME(mkpasswd, cryptpw, _BB_DIR_USR_BIN, _BB_SUID_DROP, mkp | |||
245 | IF_MKSWAP(APPLET(mkswap, _BB_DIR_SBIN, _BB_SUID_DROP)) | 258 | IF_MKSWAP(APPLET(mkswap, _BB_DIR_SBIN, _BB_SUID_DROP)) |
246 | IF_MKTEMP(APPLET(mktemp, _BB_DIR_BIN, _BB_SUID_DROP)) | 259 | IF_MKTEMP(APPLET(mktemp, _BB_DIR_BIN, _BB_SUID_DROP)) |
247 | IF_MORE(APPLET(more, _BB_DIR_BIN, _BB_SUID_DROP)) | 260 | IF_MORE(APPLET(more, _BB_DIR_BIN, _BB_SUID_DROP)) |
261 | /* On full-blown systems, requires suid for user mounts. | ||
262 | * But it's not unthinkable to have it available in non-suid flavor on some systems, | ||
263 | * for viewing mount table. | ||
264 | * Therefore we use _BB_SUID_MAYBE instead of _BB_SUID_REQUIRE: */ | ||
248 | IF_MOUNT(APPLET(mount, _BB_DIR_BIN, IF_DESKTOP(_BB_SUID_MAYBE) IF_NOT_DESKTOP(_BB_SUID_DROP))) | 265 | IF_MOUNT(APPLET(mount, _BB_DIR_BIN, IF_DESKTOP(_BB_SUID_MAYBE) IF_NOT_DESKTOP(_BB_SUID_DROP))) |
249 | IF_MOUNTPOINT(APPLET(mountpoint, _BB_DIR_BIN, _BB_SUID_DROP)) | 266 | IF_MOUNTPOINT(APPLET(mountpoint, _BB_DIR_BIN, _BB_SUID_DROP)) |
250 | IF_MT(APPLET(mt, _BB_DIR_BIN, _BB_SUID_DROP)) | 267 | IF_MT(APPLET(mt, _BB_DIR_BIN, _BB_SUID_DROP)) |
@@ -253,19 +270,16 @@ IF_NAMEIF(APPLET(nameif, _BB_DIR_SBIN, _BB_SUID_DROP)) | |||
253 | IF_NC(APPLET(nc, _BB_DIR_USR_BIN, _BB_SUID_DROP)) | 270 | IF_NC(APPLET(nc, _BB_DIR_USR_BIN, _BB_SUID_DROP)) |
254 | IF_NETSTAT(APPLET(netstat, _BB_DIR_BIN, _BB_SUID_DROP)) | 271 | IF_NETSTAT(APPLET(netstat, _BB_DIR_BIN, _BB_SUID_DROP)) |
255 | IF_NICE(APPLET(nice, _BB_DIR_BIN, _BB_SUID_DROP)) | 272 | IF_NICE(APPLET(nice, _BB_DIR_BIN, _BB_SUID_DROP)) |
256 | IF_NMETER(APPLET(nmeter, _BB_DIR_USR_BIN, _BB_SUID_DROP)) | ||
257 | IF_NOHUP(APPLET(nohup, _BB_DIR_USR_BIN, _BB_SUID_DROP)) | 273 | IF_NOHUP(APPLET(nohup, _BB_DIR_USR_BIN, _BB_SUID_DROP)) |
258 | IF_NSLOOKUP(APPLET(nslookup, _BB_DIR_USR_BIN, _BB_SUID_DROP)) | 274 | IF_NSLOOKUP(APPLET(nslookup, _BB_DIR_USR_BIN, _BB_SUID_DROP)) |
259 | IF_NTPD(APPLET(ntpd, _BB_DIR_USR_SBIN, _BB_SUID_DROP)) | 275 | IF_NTPD(APPLET(ntpd, _BB_DIR_USR_SBIN, _BB_SUID_DROP)) |
260 | IF_OD(APPLET(od, _BB_DIR_USR_BIN, _BB_SUID_DROP)) | 276 | IF_OD(APPLET(od, _BB_DIR_USR_BIN, _BB_SUID_DROP)) |
261 | IF_OPENVT(APPLET(openvt, _BB_DIR_USR_BIN, _BB_SUID_DROP)) | 277 | IF_OPENVT(APPLET(openvt, _BB_DIR_USR_BIN, _BB_SUID_DROP)) |
262 | //IF_PARSE(APPLET(parse, _BB_DIR_USR_BIN, _BB_SUID_DROP)) | 278 | //IF_PARSE(APPLET(parse, _BB_DIR_USR_BIN, _BB_SUID_DROP)) |
279 | /* Needs to be run by root or be suid root - needs to change /etc/{passwd,shadow}: */ | ||
263 | IF_PASSWD(APPLET(passwd, _BB_DIR_USR_BIN, _BB_SUID_REQUIRE)) | 280 | IF_PASSWD(APPLET(passwd, _BB_DIR_USR_BIN, _BB_SUID_REQUIRE)) |
264 | IF_PATCH(APPLET(patch, _BB_DIR_USR_BIN, _BB_SUID_DROP)) | ||
265 | IF_PGREP(APPLET(pgrep, _BB_DIR_USR_BIN, _BB_SUID_DROP)) | 281 | IF_PGREP(APPLET(pgrep, _BB_DIR_USR_BIN, _BB_SUID_DROP)) |
266 | IF_PIDOF(APPLET(pidof, _BB_DIR_BIN, _BB_SUID_DROP)) | 282 | IF_PIDOF(APPLET(pidof, _BB_DIR_BIN, _BB_SUID_DROP)) |
267 | IF_PING(APPLET(ping, _BB_DIR_BIN, _BB_SUID_MAYBE)) | ||
268 | IF_PING6(APPLET(ping6, _BB_DIR_BIN, _BB_SUID_MAYBE)) | ||
269 | IF_PIPE_PROGRESS(APPLET(pipe_progress, _BB_DIR_BIN, _BB_SUID_DROP)) | 283 | 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)) | 284 | 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)) | 285 | IF_PKILL(APPLET_ODDNAME(pkill, pgrep, _BB_DIR_USR_BIN, _BB_SUID_DROP, pkill)) |
@@ -322,7 +336,7 @@ IF_SHA256SUM(APPLET_NOEXEC(sha256sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_DR | |||
322 | IF_SHA512SUM(APPLET_NOEXEC(sha512sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_DROP, sha512sum)) | 336 | IF_SHA512SUM(APPLET_NOEXEC(sha512sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_DROP, sha512sum)) |
323 | IF_SHOWKEY(APPLET(showkey, _BB_DIR_USR_BIN, _BB_SUID_DROP)) | 337 | IF_SHOWKEY(APPLET(showkey, _BB_DIR_USR_BIN, _BB_SUID_DROP)) |
324 | IF_SLATTACH(APPLET(slattach, _BB_DIR_SBIN, _BB_SUID_DROP)) | 338 | IF_SLATTACH(APPLET(slattach, _BB_DIR_SBIN, _BB_SUID_DROP)) |
325 | /* Do not make this applet NOFORK. It breaks ^C-ing of pauses in shells */ | 339 | /* Do not make this applet NOFORK. It breaks ^C-ing of pauses in shells: */ |
326 | IF_SLEEP(APPLET(sleep, _BB_DIR_BIN, _BB_SUID_DROP)) | 340 | IF_SLEEP(APPLET(sleep, _BB_DIR_BIN, _BB_SUID_DROP)) |
327 | IF_SOFTLIMIT(APPLET_ODDNAME(softlimit, chpst, _BB_DIR_USR_BIN, _BB_SUID_DROP, softlimit)) | 341 | IF_SOFTLIMIT(APPLET_ODDNAME(softlimit, chpst, _BB_DIR_USR_BIN, _BB_SUID_DROP, softlimit)) |
328 | IF_SORT(APPLET_NOEXEC(sort, sort, _BB_DIR_USR_BIN, _BB_SUID_DROP, sort)) | 342 | IF_SORT(APPLET_NOEXEC(sort, sort, _BB_DIR_USR_BIN, _BB_SUID_DROP, sort)) |
@@ -331,6 +345,7 @@ IF_START_STOP_DAEMON(APPLET_ODDNAME(start-stop-daemon, start_stop_daemon, _BB_DI | |||
331 | IF_STAT(APPLET(stat, _BB_DIR_BIN, _BB_SUID_DROP)) | 345 | IF_STAT(APPLET(stat, _BB_DIR_BIN, _BB_SUID_DROP)) |
332 | IF_STRINGS(APPLET(strings, _BB_DIR_USR_BIN, _BB_SUID_DROP)) | 346 | IF_STRINGS(APPLET(strings, _BB_DIR_USR_BIN, _BB_SUID_DROP)) |
333 | IF_STTY(APPLET(stty, _BB_DIR_BIN, _BB_SUID_DROP)) | 347 | IF_STTY(APPLET(stty, _BB_DIR_BIN, _BB_SUID_DROP)) |
348 | /* Needs to be run by root or be suid root - needs to change uid and gid: */ | ||
334 | IF_SU(APPLET(su, _BB_DIR_BIN, _BB_SUID_REQUIRE)) | 349 | IF_SU(APPLET(su, _BB_DIR_BIN, _BB_SUID_REQUIRE)) |
335 | IF_SULOGIN(APPLET(sulogin, _BB_DIR_SBIN, _BB_SUID_DROP)) | 350 | IF_SULOGIN(APPLET(sulogin, _BB_DIR_SBIN, _BB_SUID_DROP)) |
336 | IF_SUM(APPLET(sum, _BB_DIR_USR_BIN, _BB_SUID_DROP)) | 351 | IF_SUM(APPLET(sum, _BB_DIR_USR_BIN, _BB_SUID_DROP)) |
@@ -359,8 +374,8 @@ IF_TFTPD(APPLET(tftpd, _BB_DIR_USR_BIN, _BB_SUID_DROP)) | |||
359 | IF_TIME(APPLET(time, _BB_DIR_USR_BIN, _BB_SUID_DROP)) | 374 | IF_TIME(APPLET(time, _BB_DIR_USR_BIN, _BB_SUID_DROP)) |
360 | IF_TIMEOUT(APPLET(timeout, _BB_DIR_USR_BIN, _BB_SUID_DROP)) | 375 | IF_TIMEOUT(APPLET(timeout, _BB_DIR_USR_BIN, _BB_SUID_DROP)) |
361 | IF_TOP(APPLET(top, _BB_DIR_USR_BIN, _BB_SUID_DROP)) | 376 | IF_TOP(APPLET(top, _BB_DIR_USR_BIN, _BB_SUID_DROP)) |
362 | IF_TOUCH(APPLET_NOFORK(touch, touch, _BB_DIR_BIN, _BB_SUID_DROP, touch)) | ||
363 | IF_TR(APPLET(tr, _BB_DIR_USR_BIN, _BB_SUID_DROP)) | 377 | IF_TR(APPLET(tr, _BB_DIR_USR_BIN, _BB_SUID_DROP)) |
378 | /* Needs socket(AF_INET, SOCK_RAW, IPPROTO_ICMP), therefore _BB_SUID_MAYBE: */ | ||
364 | IF_TRACEROUTE(APPLET(traceroute, _BB_DIR_USR_BIN, _BB_SUID_MAYBE)) | 379 | IF_TRACEROUTE(APPLET(traceroute, _BB_DIR_USR_BIN, _BB_SUID_MAYBE)) |
365 | IF_TRACEROUTE6(APPLET(traceroute6, _BB_DIR_USR_BIN, _BB_SUID_MAYBE)) | 380 | IF_TRACEROUTE6(APPLET(traceroute6, _BB_DIR_USR_BIN, _BB_SUID_MAYBE)) |
366 | IF_TRUE(APPLET_NOFORK(true, true, _BB_DIR_BIN, _BB_SUID_DROP, true)) | 381 | IF_TRUE(APPLET_NOFORK(true, true, _BB_DIR_BIN, _BB_SUID_DROP, true)) |
@@ -387,8 +402,10 @@ IF_UUDECODE(APPLET(uudecode, _BB_DIR_USR_BIN, _BB_SUID_DROP)) | |||
387 | IF_UUENCODE(APPLET(uuencode, _BB_DIR_USR_BIN, _BB_SUID_DROP)) | 402 | IF_UUENCODE(APPLET(uuencode, _BB_DIR_USR_BIN, _BB_SUID_DROP)) |
388 | IF_VCONFIG(APPLET(vconfig, _BB_DIR_SBIN, _BB_SUID_DROP)) | 403 | IF_VCONFIG(APPLET(vconfig, _BB_DIR_SBIN, _BB_SUID_DROP)) |
389 | IF_VI(APPLET(vi, _BB_DIR_BIN, _BB_SUID_DROP)) | 404 | IF_VI(APPLET(vi, _BB_DIR_BIN, _BB_SUID_DROP)) |
405 | /* Needs to be run by root or be suid root - needs to change uid and gid: */ | ||
390 | IF_VLOCK(APPLET(vlock, _BB_DIR_USR_BIN, _BB_SUID_REQUIRE)) | 406 | IF_VLOCK(APPLET(vlock, _BB_DIR_USR_BIN, _BB_SUID_REQUIRE)) |
391 | IF_VOLNAME(APPLET(volname, _BB_DIR_USR_BIN, _BB_SUID_DROP)) | 407 | IF_VOLNAME(APPLET(volname, _BB_DIR_USR_BIN, _BB_SUID_DROP)) |
408 | /* Needs to be run by root or be suid root - needs to write to /dev/TTY: */ | ||
392 | IF_WALL(APPLET(wall, _BB_DIR_USR_BIN, _BB_SUID_REQUIRE)) | 409 | IF_WALL(APPLET(wall, _BB_DIR_USR_BIN, _BB_SUID_REQUIRE)) |
393 | IF_WATCH(APPLET(watch, _BB_DIR_BIN, _BB_SUID_DROP)) | 410 | IF_WATCH(APPLET(watch, _BB_DIR_BIN, _BB_SUID_DROP)) |
394 | IF_WATCHDOG(APPLET(watchdog, _BB_DIR_SBIN, _BB_SUID_DROP)) | 411 | IF_WATCHDOG(APPLET(watchdog, _BB_DIR_SBIN, _BB_SUID_DROP)) |
diff --git a/include/unarchive.h b/include/archive.h index b55af6d9d..ba6d323e0 100644 --- a/include/unarchive.h +++ b/include/archive.h | |||
@@ -193,7 +193,9 @@ extern const llist_t *find_list_entry2(const llist_t *list, const char *filename | |||
193 | 193 | ||
194 | /* A bit of bunzip2 internals are exposed for compressed help support: */ | 194 | /* A bit of bunzip2 internals are exposed for compressed help support: */ |
195 | typedef struct bunzip_data bunzip_data; | 195 | typedef struct bunzip_data bunzip_data; |
196 | int start_bunzip(bunzip_data **bdp, int in_fd, const unsigned char *inbuf, int len) FAST_FUNC; | 196 | int start_bunzip(bunzip_data **bdp, int in_fd, const void *inbuf, int len) FAST_FUNC; |
197 | /* NB: read_bunzip returns < 0 on error, or the number of *unfilled* bytes | ||
198 | * in outbuf. IOW: on EOF returns len ("all bytes are not filled"), not 0: */ | ||
197 | int read_bunzip(bunzip_data *bd, char *outbuf, int len) FAST_FUNC; | 199 | int read_bunzip(bunzip_data *bd, char *outbuf, int len) FAST_FUNC; |
198 | void dealloc_bunzip(bunzip_data *bd) FAST_FUNC; | 200 | void dealloc_bunzip(bunzip_data *bd) FAST_FUNC; |
199 | 201 | ||
diff --git a/include/grp_.h b/include/grp_.h index 7a95f88a6..5c24d558a 100644 --- a/include/grp_.h +++ b/include/grp_.h | |||
@@ -18,7 +18,7 @@ | |||
18 | 02111-1307 USA. | 18 | 02111-1307 USA. |
19 | */ | 19 | */ |
20 | /* | 20 | /* |
21 | * POSIX Standard: 9.2.1 Group Database Access <grp.h> | 21 | * POSIX Standard: 9.2.1 Group Database Access <grp.h> |
22 | */ | 22 | */ |
23 | #ifndef BB_GRP_H | 23 | #ifndef BB_GRP_H |
24 | #define BB_GRP_H 1 | 24 | #define BB_GRP_H 1 |
diff --git a/include/libbb.h b/include/libbb.h index 715f1e102..fdd920f3c 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -1440,6 +1440,7 @@ typedef struct procps_status_t { | |||
1440 | char *argv0; | 1440 | char *argv0; |
1441 | char *exe; | 1441 | char *exe; |
1442 | IF_SELINUX(char *context;) | 1442 | IF_SELINUX(char *context;) |
1443 | IF_FEATURE_SHOW_THREADS(unsigned main_thread_pid;) | ||
1443 | /* Everything below must contain no ptrs to malloc'ed data: | 1444 | /* Everything below must contain no ptrs to malloc'ed data: |
1444 | * it is memset(0) for each process in procps_scan() */ | 1445 | * it is memset(0) for each process in procps_scan() */ |
1445 | unsigned long vsz, rss; /* we round it to kbytes */ | 1446 | unsigned long vsz, rss; /* we round it to kbytes */ |
diff --git a/include/liblzo_interface.h b/include/liblzo_interface.h new file mode 100644 index 000000000..9a84c0b6b --- /dev/null +++ b/include/liblzo_interface.h | |||
@@ -0,0 +1,71 @@ | |||
1 | /* | ||
2 | This file is part of the LZO real-time data compression library. | ||
3 | |||
4 | Copyright (C) 1996..2008 Markus Franz Xaver Johannes Oberhumer | ||
5 | All Rights Reserved. | ||
6 | |||
7 | Markus F.X.J. Oberhumer <markus@oberhumer.com> | ||
8 | http://www.oberhumer.com/opensource/lzo/ | ||
9 | |||
10 | The LZO library is free software; you can redistribute it and/or | ||
11 | modify it under the terms of the GNU General Public License as | ||
12 | published by the Free Software Foundation; either version 2 of | ||
13 | the License, or (at your option) any later version. | ||
14 | |||
15 | The LZO library is distributed in the hope that it will be useful, | ||
16 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | GNU General Public License for more details. | ||
19 | |||
20 | You should have received a copy of the GNU General Public License | ||
21 | along with the LZO library; see the file COPYING. | ||
22 | If not, write to the Free Software Foundation, Inc., | ||
23 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
24 | */ | ||
25 | |||
26 | #define LZO1X | ||
27 | #undef LZO1Y | ||
28 | |||
29 | #undef assert | ||
30 | /* | ||
31 | static void die_at(int line) | ||
32 | { | ||
33 | bb_error_msg_and_die("internal error at %d", line); | ||
34 | } | ||
35 | #define assert(v) if (!(v)) die_at(__LINE__) | ||
36 | */ | ||
37 | #define assert(v) ((void)0) | ||
38 | |||
39 | int lzo1x_1_compress(const uint8_t* src, unsigned src_len, | ||
40 | uint8_t* dst, unsigned* dst_len, | ||
41 | void* wrkmem); | ||
42 | int lzo1x_1_15_compress(const uint8_t* src, unsigned src_len, | ||
43 | uint8_t* dst, unsigned* dst_len, | ||
44 | void* wrkmem); | ||
45 | int lzo1x_999_compress_level(const uint8_t* in, unsigned in_len, | ||
46 | uint8_t* out, unsigned* out_len, | ||
47 | void* wrkmem, | ||
48 | int compression_level); | ||
49 | |||
50 | /* decompression */ | ||
51 | //int lzo1x_decompress(const uint8_t* src, unsigned src_len, | ||
52 | // uint8_t* dst, unsigned* dst_len, | ||
53 | // void* wrkmem /* NOT USED */); | ||
54 | /* safe decompression with overrun testing */ | ||
55 | int lzo1x_decompress_safe(const uint8_t* src, unsigned src_len, | ||
56 | uint8_t* dst, unsigned* dst_len, | ||
57 | void* wrkmem /* NOT USED */); | ||
58 | |||
59 | #define LZO_E_OK 0 | ||
60 | #define LZO_E_ERROR (-1) | ||
61 | #define LZO_E_OUT_OF_MEMORY (-2) /* [not used right now] */ | ||
62 | #define LZO_E_NOT_COMPRESSIBLE (-3) /* [not used right now] */ | ||
63 | #define LZO_E_INPUT_OVERRUN (-4) | ||
64 | #define LZO_E_OUTPUT_OVERRUN (-5) | ||
65 | #define LZO_E_LOOKBEHIND_OVERRUN (-6) | ||
66 | #define LZO_E_EOF_NOT_FOUND (-7) | ||
67 | #define LZO_E_INPUT_NOT_CONSUMED (-8) | ||
68 | #define LZO_E_NOT_YET_IMPLEMENTED (-9) /* [not used right now] */ | ||
69 | |||
70 | /* lzo-2.03/include/lzo/lzoconf.h */ | ||
71 | #define LZO_VERSION 0x2030 | ||
diff --git a/include/platform.h b/include/platform.h index 04fee8d03..5f49deb41 100644 --- a/include/platform.h +++ b/include/platform.h | |||
@@ -165,7 +165,7 @@ | |||
165 | # include <sex.h> | 165 | # include <sex.h> |
166 | #elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) \ | 166 | #elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) \ |
167 | || defined(__APPLE__) | 167 | || defined(__APPLE__) |
168 | # include <sys/resource.h> /* rlimit */ | 168 | # include <sys/resource.h> /* rlimit */ |
169 | # include <machine/endian.h> | 169 | # include <machine/endian.h> |
170 | # define bswap_64 __bswap64 | 170 | # define bswap_64 __bswap64 |
171 | # define bswap_32 __bswap32 | 171 | # define bswap_32 __bswap32 |
diff --git a/include/pwd_.h b/include/pwd_.h index aa63ac940..e40b71dab 100644 --- a/include/pwd_.h +++ b/include/pwd_.h | |||
@@ -18,7 +18,7 @@ | |||
18 | 02111-1307 USA. */ | 18 | 02111-1307 USA. */ |
19 | 19 | ||
20 | /* | 20 | /* |
21 | * POSIX Standard: 9.2.2 User Database Access <pwd.h> | 21 | * POSIX Standard: 9.2.2 User Database Access <pwd.h> |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #ifndef BB_PWD_H | 24 | #ifndef BB_PWD_H |
diff --git a/include/rtc_.h b/include/rtc_.h index bd322c940..750fc20ec 100644 --- a/include/rtc_.h +++ b/include/rtc_.h | |||
@@ -35,9 +35,9 @@ struct linux_rtc_time { | |||
35 | }; | 35 | }; |
36 | 36 | ||
37 | struct linux_rtc_wkalrm { | 37 | struct linux_rtc_wkalrm { |
38 | unsigned char enabled; /* 0 = alarm disabled, 1 = alarm enabled */ | 38 | unsigned char enabled; /* 0 = alarm disabled, 1 = alarm enabled */ |
39 | unsigned char pending; /* 0 = alarm not pending, 1 = alarm pending */ | 39 | unsigned char pending; /* 0 = alarm not pending, 1 = alarm pending */ |
40 | struct linux_rtc_time time; /* time the alarm is set to */ | 40 | struct linux_rtc_time time; /* time the alarm is set to */ |
41 | }; | 41 | }; |
42 | 42 | ||
43 | /* | 43 | /* |
diff --git a/include/usage.src.h b/include/usage.src.h index 6973c93ef..ea0e6a452 100644 --- a/include/usage.src.h +++ b/include/usage.src.h | |||
@@ -592,35 +592,6 @@ INSERT | |||
592 | "\n -i Prompt before overwrite" \ | 592 | "\n -i Prompt before overwrite" \ |
593 | "\n -l,-s Create (sym)links" \ | 593 | "\n -l,-s Create (sym)links" \ |
594 | 594 | ||
595 | #define cpio_trivial_usage \ | ||
596 | "[-dmvu] [-F FILE]" IF_FEATURE_CPIO_O(" [-H newc]") \ | ||
597 | " [-ti"IF_FEATURE_CPIO_O("o")"]" IF_FEATURE_CPIO_P(" [-p DIR]") | ||
598 | #define cpio_full_usage "\n\n" \ | ||
599 | "Extract or list files from a cpio archive" \ | ||
600 | IF_FEATURE_CPIO_O(", or" \ | ||
601 | "\ncreate an archive" IF_FEATURE_CPIO_P(" (-o) or copy files (-p)") \ | ||
602 | " using file list on stdin" \ | ||
603 | ) \ | ||
604 | "\n" \ | ||
605 | "\nMain operation mode:" \ | ||
606 | "\n -t List" \ | ||
607 | "\n -i Extract" \ | ||
608 | IF_FEATURE_CPIO_O( \ | ||
609 | "\n -o Create (requires -H newc)" \ | ||
610 | ) \ | ||
611 | IF_FEATURE_CPIO_P( \ | ||
612 | "\n -p DIR Copy files to DIR" \ | ||
613 | ) \ | ||
614 | "\nOptions:" \ | ||
615 | "\n -d Make leading directories" \ | ||
616 | "\n -m Preserve mtime" \ | ||
617 | "\n -v Verbose" \ | ||
618 | "\n -u Overwrite" \ | ||
619 | "\n -F FILE Input (-t,-i,-p) or output (-o) file" \ | ||
620 | IF_FEATURE_CPIO_O( \ | ||
621 | "\n -H newc Archive format" \ | ||
622 | ) \ | ||
623 | |||
624 | #define crond_trivial_usage \ | 595 | #define crond_trivial_usage \ |
625 | "-fbS -l N " IF_FEATURE_CROND_D("-d N ") "-L LOGFILE -c DIR" | 596 | "-fbS -l N " IF_FEATURE_CROND_D("-d N ") "-L LOGFILE -c DIR" |
626 | #define crond_full_usage "\n\n" \ | 597 | #define crond_full_usage "\n\n" \ |
@@ -1577,8 +1548,8 @@ INSERT | |||
1577 | "\n -c One-byte character display" \ | 1548 | "\n -c One-byte character display" \ |
1578 | "\n -C Canonical hex+ASCII, 16 bytes per line" \ | 1549 | "\n -C Canonical hex+ASCII, 16 bytes per line" \ |
1579 | "\n -d Two-byte decimal display" \ | 1550 | "\n -d Two-byte decimal display" \ |
1580 | "\n -e FORMAT STRING" \ | 1551 | "\n -e FORMAT_STRING" \ |
1581 | "\n -f FORMAT FILE" \ | 1552 | "\n -f FORMAT_FILE" \ |
1582 | "\n -n LENGTH Interpret only LENGTH bytes of input" \ | 1553 | "\n -n LENGTH Interpret only LENGTH bytes of input" \ |
1583 | "\n -o Two-byte octal display" \ | 1554 | "\n -o Two-byte octal display" \ |
1584 | "\n -s OFFSET Skip OFFSET bytes" \ | 1555 | "\n -s OFFSET Skip OFFSET bytes" \ |
@@ -2044,9 +2015,6 @@ INSERT | |||
2044 | #define linux64_trivial_usage NOUSAGE_STR | 2015 | #define linux64_trivial_usage NOUSAGE_STR |
2045 | #define linux64_full_usage "" | 2016 | #define linux64_full_usage "" |
2046 | 2017 | ||
2047 | #define linuxrc_trivial_usage NOUSAGE_STR | ||
2048 | #define linuxrc_full_usage "" | ||
2049 | |||
2050 | #define setarch_trivial_usage \ | 2018 | #define setarch_trivial_usage \ |
2051 | "personality PROG ARGS" | 2019 | "personality PROG ARGS" |
2052 | #define setarch_full_usage "\n\n" \ | 2020 | #define setarch_full_usage "\n\n" \ |
@@ -2176,67 +2144,6 @@ INSERT | |||
2176 | "\n -h Print banner page too" \ | 2144 | "\n -h Print banner page too" \ |
2177 | "\n -V Verbose" \ | 2145 | "\n -V Verbose" \ |
2178 | 2146 | ||
2179 | #define ls_trivial_usage \ | ||
2180 | "[-1Aa" IF_FEATURE_LS_TIMESTAMPS("c") "Cd" \ | ||
2181 | IF_FEATURE_LS_TIMESTAMPS("e") IF_FEATURE_LS_FILETYPES("F") "iln" \ | ||
2182 | IF_FEATURE_LS_FILETYPES("p") IF_FEATURE_LS_FOLLOWLINKS("L") \ | ||
2183 | IF_FEATURE_LS_RECURSIVE("R") IF_FEATURE_LS_SORTFILES("rS") "s" \ | ||
2184 | IF_FEATURE_AUTOWIDTH("T") IF_FEATURE_LS_TIMESTAMPS("tu") \ | ||
2185 | IF_FEATURE_LS_SORTFILES("v") IF_FEATURE_AUTOWIDTH("w") "x" \ | ||
2186 | IF_FEATURE_LS_SORTFILES("X") IF_FEATURE_HUMAN_READABLE("h") "k" \ | ||
2187 | IF_SELINUX("K") "] [FILE]..." | ||
2188 | #define ls_full_usage "\n\n" \ | ||
2189 | "List directory contents\n" \ | ||
2190 | "\nOptions:" \ | ||
2191 | "\n -1 List in a single column" \ | ||
2192 | "\n -A Don't list . and .." \ | ||
2193 | "\n -a Don't hide entries starting with ." \ | ||
2194 | "\n -C List by columns" \ | ||
2195 | IF_FEATURE_LS_TIMESTAMPS( \ | ||
2196 | "\n -c With -l: sort by ctime") \ | ||
2197 | IF_FEATURE_LS_COLOR( \ | ||
2198 | "\n --color[={always,never,auto}] Control coloring") \ | ||
2199 | "\n -d List directory entries instead of contents" \ | ||
2200 | IF_FEATURE_LS_TIMESTAMPS( \ | ||
2201 | "\n -e List full date and time") \ | ||
2202 | IF_FEATURE_LS_FILETYPES( \ | ||
2203 | "\n -F Append indicator (one of */=@|) to entries") \ | ||
2204 | "\n -i List inode numbers" \ | ||
2205 | "\n -l Long listing format" \ | ||
2206 | "\n -n List numeric UIDs and GIDs instead of names" \ | ||
2207 | IF_FEATURE_LS_FILETYPES( \ | ||
2208 | "\n -p Append indicator (one of /=@|) to entries") \ | ||
2209 | IF_FEATURE_LS_FOLLOWLINKS( \ | ||
2210 | "\n -L List entries pointed to by symlinks") \ | ||
2211 | IF_FEATURE_LS_RECURSIVE( \ | ||
2212 | "\n -R Recurse") \ | ||
2213 | IF_FEATURE_LS_SORTFILES( \ | ||
2214 | "\n -r Sort in reverse order") \ | ||
2215 | IF_FEATURE_LS_SORTFILES( \ | ||
2216 | "\n -S Sort by file size") \ | ||
2217 | "\n -s List the size of each file, in blocks" \ | ||
2218 | IF_FEATURE_AUTOWIDTH( \ | ||
2219 | "\n -T N Assume tabstop every N columns") \ | ||
2220 | IF_FEATURE_LS_TIMESTAMPS( \ | ||
2221 | "\n -t With -l: sort by modification time") \ | ||
2222 | IF_FEATURE_LS_TIMESTAMPS( \ | ||
2223 | "\n -u With -l: sort by access time") \ | ||
2224 | IF_FEATURE_LS_SORTFILES( \ | ||
2225 | "\n -v Sort by version") \ | ||
2226 | IF_FEATURE_AUTOWIDTH( \ | ||
2227 | "\n -w N Assume the terminal is N columns wide") \ | ||
2228 | "\n -x List by lines" \ | ||
2229 | IF_FEATURE_LS_SORTFILES( \ | ||
2230 | "\n -X Sort by extension") \ | ||
2231 | IF_FEATURE_HUMAN_READABLE( \ | ||
2232 | "\n -h List sizes in human readable format (1K 243M 2G)") \ | ||
2233 | IF_SELINUX( \ | ||
2234 | "\n -k List security context") \ | ||
2235 | IF_SELINUX( \ | ||
2236 | "\n -K List security context in long format") \ | ||
2237 | IF_SELINUX( \ | ||
2238 | "\n -Z List security context and permission") \ | ||
2239 | |||
2240 | #define lsattr_trivial_usage \ | 2147 | #define lsattr_trivial_usage \ |
2241 | "[-Radlv] [FILE]..." | 2148 | "[-Radlv] [FILE]..." |
2242 | #define lsattr_full_usage "\n\n" \ | 2149 | #define lsattr_full_usage "\n\n" \ |
@@ -2709,31 +2616,6 @@ INSERT | |||
2709 | " or\n" \ | 2616 | " or\n" \ |
2710 | "$ nameif -c /etc/my_mactab_file\n" \ | 2617 | "$ nameif -c /etc/my_mactab_file\n" \ |
2711 | 2618 | ||
2712 | #define nmeter_trivial_usage \ | ||
2713 | "format_string" | ||
2714 | #define nmeter_full_usage "\n\n" \ | ||
2715 | "Monitor system in real time\n\n" \ | ||
2716 | "Format specifiers:\n" \ | ||
2717 | " %Nc or %[cN] Monitor CPU. N - bar size, default 10\n" \ | ||
2718 | " (displays: S:system U:user N:niced D:iowait I:irq i:softirq)\n" \ | ||
2719 | " %[niface] Monitor network interface 'iface'\n" \ | ||
2720 | " %m Monitor allocated memory\n" \ | ||
2721 | " %[mf] Monitor free memory\n" \ | ||
2722 | " %[mt] Monitor total memory\n" \ | ||
2723 | " %s Monitor allocated swap\n" \ | ||
2724 | " %f Monitor number of used file descriptors\n" \ | ||
2725 | " %Ni Monitor total/specific IRQ rate\n" \ | ||
2726 | " %x Monitor context switch rate\n" \ | ||
2727 | " %p Monitor forks\n" \ | ||
2728 | " %[pn] Monitor # of processes\n" \ | ||
2729 | " %b Monitor block io\n" \ | ||
2730 | " %Nt Show time (with N decimal points)\n" \ | ||
2731 | " %Nd Milliseconds between updates (default:1000)\n" \ | ||
2732 | " %r Print <cr> instead of <lf> at EOL" \ | ||
2733 | |||
2734 | #define nmeter_example_usage \ | ||
2735 | "nmeter '%250d%t %20c int %i bio %b mem %m forks%p'" | ||
2736 | |||
2737 | #define nohup_trivial_usage \ | 2619 | #define nohup_trivial_usage \ |
2738 | "PROG ARGS" | 2620 | "PROG ARGS" |
2739 | #define nohup_full_usage "\n\n" \ | 2621 | #define nohup_full_usage "\n\n" \ |
@@ -2820,29 +2702,6 @@ INSERT | |||
2820 | "\n -m Use MD5 encryption instead of DES" \ | 2702 | "\n -m Use MD5 encryption instead of DES" \ |
2821 | ) | 2703 | ) |
2822 | 2704 | ||
2823 | #define patch_trivial_usage \ | ||
2824 | "[OPTIONS] [ORIGFILE [PATCHFILE]]" | ||
2825 | #define patch_full_usage "\n\n" \ | ||
2826 | IF_LONG_OPTS( \ | ||
2827 | " -p,--strip N Strip N leading components from file names" \ | ||
2828 | "\n -i,--input DIFF Read DIFF instead of stdin" \ | ||
2829 | "\n -R,--reverse Reverse patch" \ | ||
2830 | "\n -N,--forward Ignore already applied patches" \ | ||
2831 | "\n --dry-run Don't actually change files" \ | ||
2832 | "\n -E,--remove-empty-files Remove output files if they become empty" \ | ||
2833 | ) \ | ||
2834 | IF_NOT_LONG_OPTS( \ | ||
2835 | " -p N Strip N leading components from file names" \ | ||
2836 | "\n -i DIFF Read DIFF instead of stdin" \ | ||
2837 | "\n -R Reverse patch" \ | ||
2838 | "\n -N Ignore already applied patches" \ | ||
2839 | "\n -E Remove output files if they become empty" \ | ||
2840 | ) | ||
2841 | |||
2842 | #define patch_example_usage \ | ||
2843 | "$ patch -p1 < example.diff\n" \ | ||
2844 | "$ patch -p0 -i example.diff" | ||
2845 | |||
2846 | #define pgrep_trivial_usage \ | 2705 | #define pgrep_trivial_usage \ |
2847 | "[-flnovx] [-s SID|-P PPID|PATTERN]" | 2706 | "[-flnovx] [-s SID|-P PPID|PATTERN]" |
2848 | #define pgrep_full_usage "\n\n" \ | 2707 | #define pgrep_full_usage "\n\n" \ |
@@ -2885,61 +2744,6 @@ INSERT | |||
2885 | IF_FEATURE_PIDOF_OMIT( \ | 2744 | IF_FEATURE_PIDOF_OMIT( \ |
2886 | "$ pidof /bin/sh -o %PPID\n20351 5950") | 2745 | "$ pidof /bin/sh -o %PPID\n20351 5950") |
2887 | 2746 | ||
2888 | #if !ENABLE_FEATURE_FANCY_PING | ||
2889 | #define ping_trivial_usage \ | ||
2890 | "host" | ||
2891 | #define ping_full_usage "\n\n" \ | ||
2892 | "Send ICMP ECHO_REQUEST packets to network hosts" | ||
2893 | #define ping6_trivial_usage \ | ||
2894 | "host" | ||
2895 | #define ping6_full_usage "\n\n" \ | ||
2896 | "Send ICMP ECHO_REQUEST packets to network hosts" | ||
2897 | #else | ||
2898 | #define ping_trivial_usage \ | ||
2899 | "[OPTIONS] HOST" | ||
2900 | #define ping_full_usage "\n\n" \ | ||
2901 | "Send ICMP ECHO_REQUEST packets to network hosts\n" \ | ||
2902 | "\nOptions:" \ | ||
2903 | "\n -4,-6 Force IP or IPv6 name resolution" \ | ||
2904 | "\n -c CNT Send only CNT pings" \ | ||
2905 | "\n -s SIZE Send SIZE data bytes in packets (default:56)" \ | ||
2906 | "\n -I IFACE/IP Use interface or IP address as source" \ | ||
2907 | "\n -W SEC Seconds to wait for the first response (default:10)" \ | ||
2908 | "\n (after all -c CNT packets are sent)" \ | ||
2909 | "\n -w SEC Seconds until ping exits (default:infinite)" \ | ||
2910 | "\n (can exit earlier with -c CNT)" \ | ||
2911 | "\n -q Quiet, only displays output at start" \ | ||
2912 | "\n and when finished" \ | ||
2913 | |||
2914 | #define ping6_trivial_usage \ | ||
2915 | "[OPTIONS] HOST" | ||
2916 | #define ping6_full_usage "\n\n" \ | ||
2917 | "Send ICMP ECHO_REQUEST packets to network hosts\n" \ | ||
2918 | "\nOptions:" \ | ||
2919 | "\n -c CNT Send only CNT pings" \ | ||
2920 | "\n -s SIZE Send SIZE data bytes in packets (default:56)" \ | ||
2921 | "\n -I IFACE/IP Use interface or IP address as source" \ | ||
2922 | "\n -q Quiet, only displays output at start" \ | ||
2923 | "\n and when finished" \ | ||
2924 | |||
2925 | #endif | ||
2926 | #define ping_example_usage \ | ||
2927 | "$ ping localhost\n" \ | ||
2928 | "PING slag (127.0.0.1): 56 data bytes\n" \ | ||
2929 | "64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=20.1 ms\n" \ | ||
2930 | "\n" \ | ||
2931 | "--- debian ping statistics ---\n" \ | ||
2932 | "1 packets transmitted, 1 packets received, 0% packet loss\n" \ | ||
2933 | "round-trip min/avg/max = 20.1/20.1/20.1 ms\n" | ||
2934 | #define ping6_example_usage \ | ||
2935 | "$ ping6 ip6-localhost\n" \ | ||
2936 | "PING ip6-localhost (::1): 56 data bytes\n" \ | ||
2937 | "64 bytes from ::1: icmp6_seq=0 ttl=64 time=20.1 ms\n" \ | ||
2938 | "\n" \ | ||
2939 | "--- ip6-localhost ping statistics ---\n" \ | ||
2940 | "1 packets transmitted, 1 packets received, 0% packet loss\n" \ | ||
2941 | "round-trip min/avg/max = 20.1/20.1/20.1 ms\n" | ||
2942 | |||
2943 | #define pipe_progress_trivial_usage NOUSAGE_STR | 2747 | #define pipe_progress_trivial_usage NOUSAGE_STR |
2944 | #define pipe_progress_full_usage "" | 2748 | #define pipe_progress_full_usage "" |
2945 | 2749 | ||
@@ -3378,36 +3182,6 @@ INSERT | |||
3378 | #define selinuxenabled_trivial_usage NOUSAGE_STR | 3182 | #define selinuxenabled_trivial_usage NOUSAGE_STR |
3379 | #define selinuxenabled_full_usage "" | 3183 | #define selinuxenabled_full_usage "" |
3380 | 3184 | ||
3381 | #define sendmail_trivial_usage \ | ||
3382 | "[OPTIONS] [RECIPIENT_EMAIL]..." | ||
3383 | #define sendmail_full_usage "\n\n" \ | ||
3384 | "Read email from stdin and send it\n" \ | ||
3385 | "\nStandard options:" \ | ||
3386 | "\n -t Read additional recipients from message body" \ | ||
3387 | "\n -f sender Sender (required)" \ | ||
3388 | "\n -o options Various options. -oi implied, others are ignored" \ | ||
3389 | "\n -i -oi synonym. implied and ignored" \ | ||
3390 | "\n" \ | ||
3391 | "\nBusybox specific options:" \ | ||
3392 | "\n -w seconds Network timeout" \ | ||
3393 | "\n -H 'PROG ARGS' Run connection helper" \ | ||
3394 | "\n Examples:" \ | ||
3395 | "\n -H 'exec openssl s_client -quiet -tls1 -starttls smtp" \ | ||
3396 | "\n -connect smtp.gmail.com:25' <email.txt" \ | ||
3397 | "\n [4<username_and_passwd.txt | -au<username> -ap<password>]" \ | ||
3398 | "\n -H 'exec openssl s_client -quiet -tls1" \ | ||
3399 | "\n -connect smtp.gmail.com:465' <email.txt" \ | ||
3400 | "\n [4<username_and_passwd.txt | -au<username> -ap<password>]" \ | ||
3401 | "\n -S server[:port] Server" \ | ||
3402 | "\n -au<username> Username for AUTH LOGIN" \ | ||
3403 | "\n -ap<password> Password for AUTH LOGIN" \ | ||
3404 | "\n -am<method> Authentication method. Ignored. LOGIN is implied" \ | ||
3405 | "\n" \ | ||
3406 | "\nOther options are silently ignored; -oi -t is implied" \ | ||
3407 | IF_MAKEMIME( \ | ||
3408 | "\nUse makemime applet to create message with attachments" \ | ||
3409 | ) | ||
3410 | |||
3411 | #define seq_trivial_usage \ | 3185 | #define seq_trivial_usage \ |
3412 | "[-w] [-s SEP] [FIRST [INC]] LAST" | 3186 | "[-w] [-s SEP] [FIRST [INC]] LAST" |
3413 | #define seq_full_usage "\n\n" \ | 3187 | #define seq_full_usage "\n\n" \ |
@@ -3750,15 +3524,6 @@ INSERT | |||
3750 | "\n -g Print in stty-readable form" \ | 3524 | "\n -g Print in stty-readable form" \ |
3751 | "\n [SETTING] See manpage" \ | 3525 | "\n [SETTING] See manpage" \ |
3752 | 3526 | ||
3753 | #define su_trivial_usage \ | ||
3754 | "[OPTIONS] [-] [USERNAME]" | ||
3755 | #define su_full_usage "\n\n" \ | ||
3756 | "Change user id or become root\n" \ | ||
3757 | "\nOptions:" \ | ||
3758 | "\n -p,-m Preserve environment" \ | ||
3759 | "\n -c CMD Command to pass to 'sh -c'" \ | ||
3760 | "\n -s SH Shell to use instead of default shell" \ | ||
3761 | |||
3762 | #define sulogin_trivial_usage \ | 3527 | #define sulogin_trivial_usage \ |
3763 | "[-t N] [TTY]" | 3528 | "[-t N] [TTY]" |
3764 | #define sulogin_full_usage "\n\n" \ | 3529 | #define sulogin_full_usage "\n\n" \ |
@@ -4086,22 +3851,6 @@ INSERT | |||
4086 | "and display a screenful of them." \ | 3851 | "and display a screenful of them." \ |
4087 | //TODO: add options and keyboard commands | 3852 | //TODO: add options and keyboard commands |
4088 | 3853 | ||
4089 | #define touch_trivial_usage \ | ||
4090 | "[-c] [-d DATE] [-r FILE] FILE [FILE]..." | ||
4091 | #define touch_full_usage "\n\n" \ | ||
4092 | "Update the last-modified date on the given FILE[s]\n" \ | ||
4093 | "\nOptions:" \ | ||
4094 | "\n -c Don't create files" \ | ||
4095 | "\n -d DT Date/time to use" \ | ||
4096 | "\n -r FILE Use FILE's date/time" \ | ||
4097 | |||
4098 | #define touch_example_usage \ | ||
4099 | "$ ls -l /tmp/foo\n" \ | ||
4100 | "/bin/ls: /tmp/foo: No such file or directory\n" \ | ||
4101 | "$ touch /tmp/foo\n" \ | ||
4102 | "$ ls -l /tmp/foo\n" \ | ||
4103 | "-rw-rw-r-- 1 andersen andersen 0 Apr 15 01:11 /tmp/foo\n" | ||
4104 | |||
4105 | #define tr_trivial_usage \ | 3854 | #define tr_trivial_usage \ |
4106 | "[-cds] STRING1 [STRING2]" | 3855 | "[-cds] STRING1 [STRING2]" |
4107 | #define tr_full_usage "\n\n" \ | 3856 | #define tr_full_usage "\n\n" \ |
diff --git a/include/volume_id.h b/include/volume_id.h index 77e874d40..4a78cd1e4 100644 --- a/include/volume_id.h +++ b/include/volume_id.h | |||
@@ -28,3 +28,4 @@ void display_uuid_cache(void); | |||
28 | * *fsname is replaced if device with such UUID or LABEL is found | 28 | * *fsname is replaced if device with such UUID or LABEL is found |
29 | */ | 29 | */ |
30 | int resolve_mount_spec(char **fsname); | 30 | int resolve_mount_spec(char **fsname); |
31 | int add_to_uuid_cache(const char *device); | ||