diff options
author | Denis Vlasenko | 2007-04-10 15:43:37 +0000 |
---|---|---|
committer | Denis Vlasenko | 2007-04-10 15:43:37 +0000 |
commit | 99912ca733dd960f5589227fd999c86e73c8e894 (patch) | |
tree | 9df947fc08884d498cf76a02204d74b121064134 /coreutils/rm.c | |
parent | ff131b980d524a33d8a43cefe65e14f64a43f2da (diff) | |
download | busybox-99912ca733dd960f5589227fd999c86e73c8e894.zip busybox-99912ca733dd960f5589227fd999c86e73c8e894.tar.gz |
audit small applets and mark some of them as NOFORK.
Put big scary warnings in relevant places.
Diffstat (limited to 'coreutils/rm.c')
-rw-r--r-- | coreutils/rm.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/coreutils/rm.c b/coreutils/rm.c index 1883fee..6f32e7d 100644 --- a/coreutils/rm.c +++ b/coreutils/rm.c @@ -15,9 +15,10 @@ * Size reduction. */ -#include <unistd.h> #include "busybox.h" +/* This is a NOFORK applet. Be very careful! */ + int rm_main(int argc, char **argv); int rm_main(int argc, char **argv) { @@ -27,14 +28,15 @@ int rm_main(int argc, char **argv) opt_complementary = "f-i:i-f"; opt = getopt32(argc, argv, "fiRr"); + argv += optind; if(opt & 1) - flags |= FILEUTILS_FORCE; + flags |= FILEUTILS_FORCE; if(opt & 2) flags |= FILEUTILS_INTERACTIVE; if(opt & 12) flags |= FILEUTILS_RECUR; - if (*(argv += optind) != NULL) { + if (*argv != NULL) { do { const char *base = bb_get_last_path_component(*argv); |