No point in having to lots of get the user code.

This commit is contained in:
Roy Marples 2007-08-20 09:08:06 +00:00
parent 0963e06766
commit 9ea8afb200

View File

@ -565,6 +565,7 @@ int start_stop_daemon (int argc, char **argv)
background = true; background = true;
break; break;
case 'u': /* --user <username>|<uid> */
case 'c': /* --chuid <username>|<uid> */ case 'c': /* --chuid <username>|<uid> */
{ {
char *p = optarg; char *p = optarg;
@ -646,16 +647,6 @@ int start_stop_daemon (int argc, char **argv)
test = true; test = true;
break; break;
case 'u': /* --user <username>|<uid> */
if (sscanf (optarg, "%d", &tid) != 1) {
struct passwd *pw = getpwnam (optarg);
if (! pw)
eerrorx ("%s: user `%s' not found", applet, optarg);
uid = pw->pw_uid;
} else
uid = tid;
break;
case 'r': /* --chroot /new/root */ case 'r': /* --chroot /new/root */
ch_root = optarg; ch_root = optarg;
break; break;