diff options
author | Eric Andersen | 2000-06-04 05:17:35 +0000 |
---|---|---|
committer | Eric Andersen | 2000-06-04 05:17:35 +0000 |
commit | 46a38dbb9b1a5ecec99dda2eb42b456e5ac76c26 (patch) | |
tree | 69a3a8a92331a87aa25ed311321b87fbd656eca4 /coreutils | |
parent | ef4268efa7474ba84dc02ffc29030ad6407fedcb (diff) | |
download | busybox-46a38dbb9b1a5ecec99dda2eb42b456e5ac76c26.zip busybox-46a38dbb9b1a5ecec99dda2eb42b456e5ac76c26.tar.gz |
Don't allow mkfifo to create files such as "--help"
This patch checks if the name of FIFO to be created begins with "-" and
calls usage() if it does.
Regards,
Pavel Roskin
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/mkfifo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/coreutils/mkfifo.c b/coreutils/mkfifo.c index ef3d667..46b1343 100644 --- a/coreutils/mkfifo.c +++ b/coreutils/mkfifo.c @@ -60,7 +60,7 @@ extern int mkfifo_main(int argc, char **argv) argc--; argv++; } - if (argc < 1) + if (argc < 1 || *argv[0] == '-') usage(mkfifo_usage); if (mkfifo(*argv, mode) < 0) { perror("mkfifo"); |