projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
99b4083
)
envdir: fix "envdir with no params" case
author
Denis Vlasenko
<vda.linux@googlemail.com>
Wed, 20 Aug 2008 22:19:27 +0000
(22:19 -0000)
committer
Denis Vlasenko
<vda.linux@googlemail.com>
Wed, 20 Aug 2008 22:19:27 +0000
(22:19 -0000)
runit/chpst.c
patch
|
blob
|
history
diff --git
a/runit/chpst.c
b/runit/chpst.c
index 43e8d5f3e5534e5333cc8138c4465fd8939d2c1f..82a81f5492235a15da76adb5af7c76f2425d32bc 100644
(file)
--- a/
runit/chpst.c
+++ b/
runit/chpst.c
@@
-213,6
+213,8
@@
int chpst_main(int argc UNUSED_PARAM, char **argv)
} else {
option_mask32 = opt = 0;
argv++;
+ if (!*argv)
+ bb_show_usage();
}
// envdir?
@@
-222,7
+224,7
@@
int chpst_main(int argc UNUSED_PARAM, char **argv)
}
// setuidgid?
- if (ENABLE_SETUIDGID && applet_name[
0] == 's
') {
+ if (ENABLE_SETUIDGID && applet_name[
1] == 'e
') {
set_user = *argv++;
opt |= OPT_u;
}