aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-08-20 22:19:27 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-08-20 22:19:27 +0000
commitb9c262b0296de501c387539abd67d324e33ddcea (patch)
tree0213286f49adb83f08f14d0075daa94018cba4b0
parent99b4083647618e88f50110d83bf5b9063076c655 (diff)
downloadbusybox-w32-b9c262b0296de501c387539abd67d324e33ddcea.tar.gz
busybox-w32-b9c262b0296de501c387539abd67d324e33ddcea.tar.bz2
busybox-w32-b9c262b0296de501c387539abd67d324e33ddcea.zip
envdir: fix "envdir with no params" case
-rw-r--r--runit/chpst.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/runit/chpst.c b/runit/chpst.c
index 43e8d5f3e..82a81f549 100644
--- a/runit/chpst.c
+++ b/runit/chpst.c
@@ -213,6 +213,8 @@ int chpst_main(int argc UNUSED_PARAM, char **argv)
213 } else { 213 } else {
214 option_mask32 = opt = 0; 214 option_mask32 = opt = 0;
215 argv++; 215 argv++;
216 if (!*argv)
217 bb_show_usage();
216 } 218 }
217 219
218 // envdir? 220 // envdir?
@@ -222,7 +224,7 @@ int chpst_main(int argc UNUSED_PARAM, char **argv)
222 } 224 }
223 225
224 // setuidgid? 226 // setuidgid?
225 if (ENABLE_SETUIDGID && applet_name[0] == 's') { 227 if (ENABLE_SETUIDGID && applet_name[1] == 'e') {
226 set_user = *argv++; 228 set_user = *argv++;
227 opt |= OPT_u; 229 opt |= OPT_u;
228 } 230 }