aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2013-12-19 21:38:12 -0600
committerRob Landley <rob@landley.net>2013-12-19 21:38:12 -0600
commit6db8529a785e2cab142e840b6e3fbdcc2c02dd1f (patch)
treee22a0b2025f7848f05bcd4f5ed22b57956ef84ea /main.c
parentbb5cfb270f924390c2163573cc5ed8fba9f638b8 (diff)
downloadtoybox-6db8529a785e2cab142e840b6e3fbdcc2c02dd1f.tar.gz
Don't permute toys.optargs, cleanup code (xexec()) can free it.
Diffstat (limited to 'main.c')
-rw-r--r--main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.c b/main.c
index 53f670d2..7355f0a2 100644
--- a/main.c
+++ b/main.c
@@ -92,7 +92,7 @@ void toy_init(struct toy_list *which, char *argv[])
uid_t uid = getuid(), euid = geteuid();
if (!(which->flags & TOYFLAG_STAYROOT)) {
- if (uid != euid) xsetuid(euid=uid);
+ if (uid != euid) xsetuid(euid=uid); // drop root
} else if (CFG_TOYBOX_DEBUG && uid && which != toy_list)
error_msg("Not installed suid root");