Ticket #139: start-stop-daemon-user-root.patch
File start-stop-daemon-user-root.patch, 650 bytes (added by ulm@gentoo.org, 20 months ago) |
---|
-
src/rc/start-stop-daemon.c
old new int start_stop_daemon(int argc, char **a 1087 1087 1088 1088 if (gid && setgid(gid)) 1089 1089 eerrorx("%s: unable to set groupid to %d", applet, gid); 1090 if (changeuser && initgroups(changeuser, gid))1091 eerrorx("%s: initgroups (%s, %d)", applet, changeuser, gid);1092 if (uid) {1093 if ( setuid(uid))1090 if (changeuser) { 1091 if (initgroups(changeuser, gid)) 1092 eerrorx("%s: initgroups (%s, %d)", applet, changeuser, gid); 1093 if (uid && setuid(uid)) 1094 1094 eerrorx ("%s: unable to set userid to %d", applet, uid); 1095 1095 pw = getpwuid(uid); 1096 1096 if (pw) {