audit small applets and mark some of them as NOFORK.
Put big scary warnings in relevant places.
This commit is contained in:
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user