Don't set user info unless stated.

This commit is contained in:
Roy Marples 2008-11-11 19:47:30 +00:00
parent eafbed0366
commit 937b1b2abf

View File

@ -1072,9 +1072,9 @@ int start_stop_daemon(int argc, char **argv)
eerrorx("%s: unable to set groupid to %d", applet, gid);
if (changeuser && initgroups(changeuser, gid))
eerrorx("%s: initgroups (%s, %d)", applet, changeuser, gid);
if (uid && setuid(uid))
eerrorx ("%s: unable to set userid to %d", applet, uid);
else {
if (uid) {
if (setuid(uid))
eerrorx ("%s: unable to set userid to %d", applet, uid);
pw = getpwuid(uid);
if (pw) {
if (!sethome) {