/[baselayout]/trunk/src/start-stop-daemon.c
Gentoo

Diff of /trunk/src/start-stop-daemon.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 2842 Revision 2843
563 563
564 case 'b': /* --background */ 564 case 'b': /* --background */
565 background = true; 565 background = true;
566 break; 566 break;
567 567
568 case 'u': /* --user <username>|<uid> */
568 case 'c': /* --chuid <username>|<uid> */ 569 case 'c': /* --chuid <username>|<uid> */
569 { 570 {
570 char *p = optarg; 571 char *p = optarg;
571 char *cu = strsep (&p, ":"); 572 char *cu = strsep (&p, ":");
572 struct passwd *pw = NULL; 573 struct passwd *pw = NULL;
642 sig = parse_signal (optarg); 643 sig = parse_signal (optarg);
643 break; 644 break;
644 645
645 case 't': /* --test */ 646 case 't': /* --test */
646 test = true; 647 test = true;
647 break;
648
649 case 'u': /* --user <username>|<uid> */
650 if (sscanf (optarg, "%d", &tid) != 1) {
651 struct passwd *pw = getpwnam (optarg);
652 if (! pw)
653 eerrorx ("%s: user `%s' not found", applet, optarg);
654 uid = pw->pw_uid;
655 } else
656 uid = tid;
657 break; 648 break;
658 649
659 case 'r': /* --chroot /new/root */ 650 case 'r': /* --chroot /new/root */
660 ch_root = optarg; 651 ch_root = optarg;
661 break; 652 break;

Legend:
Removed from v.2842  
changed lines
  Added in v.2843

  ViewVC Help
Powered by ViewVC 1.1.20