aboutsummaryrefslogtreecommitdiff
path: root/runit
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2013-11-29 16:39:28 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2013-11-29 16:39:28 +0100
commit1a7256ac38284caffd2a0de2250364369059be69 (patch)
tree0e97ac73f8709563c82424b96c5f9d8fceacd902 /runit
parent72745632a13ccd12232127b31e1656f2f7ebcaff (diff)
downloadbusybox-1a7256ac38284caffd2a0de2250364369059be69.tar.gz
chpst: fix a bug where -U USER was using wrong USER (one from -u USER)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'runit')
-rw-r--r--runit/chpst.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/runit/chpst.c b/runit/chpst.c
index ed72c8b8c..71af29f66 100644
--- a/runit/chpst.c
+++ b/runit/chpst.c
@@ -236,7 +236,6 @@ int chpst_main(int argc UNUSED_PARAM, char **argv)
{
struct bb_uidgid_t ugid;
char *set_user = set_user; /* for compiler */
- char *env_user = env_user;
char *env_dir = env_dir;
char *root;
char *nicestr;
@@ -264,7 +263,7 @@ int chpst_main(int argc UNUSED_PARAM, char **argv)
IF_CHPST("/:n:vP012"),
&limita, &limitc, &limitd, &limitf, &limitl,
&limitm, &limito, &limitp, &limitr, &limits, &limitt,
- &set_user, &env_user, &env_dir
+ &set_user, &set_user, &env_dir
IF_CHPST(, &root, &nicestr));
argv += optind;
if (opt & OPT_m) { // -m means -asld
@@ -292,7 +291,7 @@ int chpst_main(int argc UNUSED_PARAM, char **argv)
// envuidgid?
if (ENABLE_ENVUIDGID && applet_name[0] == 'e' && applet_name[3] == 'u') {
- env_user = *argv++;
+ set_user = *argv++;
opt |= OPT_U;
}