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;
break;
case 'u': /* --user <username>|<uid> */
case 'c': /* --chuid <username>|<uid> */
{
char *p = optarg;
@ -646,16 +647,6 @@ int start_stop_daemon (int argc, char **argv)
test = true;
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 */
ch_root = optarg;
break;