aboutsummaryrefslogtreecommitdiff
path: root/coreutils/realpath.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2017-08-03 19:00:01 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2017-08-03 19:03:32 +0200
commit39194f030918b87eeb3e11e94cfa05f575fb47b4 (patch)
tree97ea35e2c5984c5c6757ff9a540630ada4b234d5 /coreutils/realpath.c
parent663ae52676eae3b0fdc6bb968ff6497279a034a4 (diff)
downloadbusybox-39194f030918b87eeb3e11e94cfa05f575fb47b4.tar.gz
new NOFORKs: pwdx,kill[all5],ttysize,realpath,readlink NOEXECs: date,resize
function old new delta run_nofork_applet 258 280 +22 readlink_main 112 123 +11 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 33/0) Total: 33 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils/realpath.c')
-rw-r--r--coreutils/realpath.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/coreutils/realpath.c b/coreutils/realpath.c
index 6a61c3dc8..f9c630135 100644
--- a/coreutils/realpath.c
+++ b/coreutils/realpath.c
@@ -13,7 +13,7 @@
//config: Return the canonicalized absolute pathname.
//config: This isn't provided by GNU shellutils, but where else does it belong.
-//applet:IF_REALPATH(APPLET(realpath, BB_DIR_USR_BIN, BB_SUID_DROP))
+//applet:IF_REALPATH(APPLET_NOFORK(realpath, realpath, BB_DIR_USR_BIN, BB_SUID_DROP, realpath))
//kbuild:lib-$(CONFIG_REALPATH) += realpath.o
@@ -36,6 +36,7 @@ int realpath_main(int argc UNUSED_PARAM, char **argv)
}
do {
+ /* NOFORK: only one alloc is allowed; must free */
char *resolved_path = xmalloc_realpath(*argv);
if (resolved_path != NULL) {
puts(resolved_path);