Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 84851 | Differences between
and this patch

Collapse All | Expand All

(-)src/yppasswd.c (-3 / +7 lines)
Lines 117-122 Link Here
117
  fputs (_("  -f             Change GECOS field information\n"), stdout);
117
  fputs (_("  -f             Change GECOS field information\n"), stdout);
118
  fputs (_("  -l             Change the login shell\n"), stdout);
118
  fputs (_("  -l             Change the login shell\n"), stdout);
119
  fputs (_("  -p             Change the password\n"), stdout);
119
  fputs (_("  -p             Change the password\n"), stdout);
120
  fputs (_("  -b             Enable support for *BSD rpc.yppasswd daemon\n"), stdout);
120
  fputs (_("  -?, --help     Give this help list\n"), stdout);
121
  fputs (_("  -?, --help     Give this help list\n"), stdout);
121
  fputs (_("      --usage    Give a short usage message\n"), stdout);
122
  fputs (_("      --usage    Give a short usage message\n"), stdout);
122
  fputs (_("      --version  Print program version\n"), stdout);
123
  fputs (_("      --version  Print program version\n"), stdout);
Lines 440-446 Link Here
440
main (int argc, char **argv)
441
main (int argc, char **argv)
441
{
442
{
442
  char *s, *progname, *domainname = NULL, *user = NULL, *master = NULL;
443
  char *s, *progname, *domainname = NULL, *user = NULL, *master = NULL;
443
  int f_flag = 0, l_flag = 0, p_flag = 0, error, status;
444
  int f_flag = 0, l_flag = 0, p_flag = 0, error, status, bsd_flag = 0;
444
  struct yppasswd yppwd;
445
  struct yppasswd yppwd;
445
  struct passwd *pwd;
446
  struct passwd *pwd;
446
  CLIENT *clnt;
447
  CLIENT *clnt;
Lines 476-482 Link Here
476
      };
477
      };
477
478
478
      c = getopt_long (argc, argv,
479
      c = getopt_long (argc, argv,
479
		       (l_flag == 0 && f_flag == 0) ? "flp?" : "?",
480
		       (l_flag == 0 && f_flag == 0) ? "flpb?" : "?",
480
		       long_options, &option_index);
481
		       long_options, &option_index);
481
      if (c == (-1))
482
      if (c == (-1))
482
        break;
483
        break;
Lines 491-496 Link Here
491
	case 'p':
492
	case 'p':
492
	  p_flag = 1;
493
	  p_flag = 1;
493
	  break;
494
	  break;
495
	case 'b':
496
	  bsd_flag = 1;
497
	  break;
494
	case '?':
498
	case '?':
495
	  if (l_flag)
499
	  if (l_flag)
496
	    print_help_chsh ();
500
	    print_help_chsh ();
Lines 645-651 Link Here
645
      /* We can't check the password with shadow passwords enabled. We
649
      /* We can't check the password with shadow passwords enabled. We
646
       * leave the checking to yppasswdd */
650
       * leave the checking to yppasswdd */
647
      if (uid != 0 && strcmp (pwd->pw_passwd, "x") != 0 &&
651
      if (uid != 0 && strcmp (pwd->pw_passwd, "x") != 0 &&
648
	  strcmp (pwd->pw_passwd, hashpass ) != 0)
652
	  strcmp (pwd->pw_passwd, hashpass ) != 0 && !bsd_flag)
649
	{
653
	{
650
	  int passwdlen;
654
	  int passwdlen;
651
	  char *sane_passwd;
655
	  char *sane_passwd;

Return to bug 84851