--- yp-tools-2.8/src/yppasswd.c 2002-12-05 14:49:20.000000000 +0100 +++ yp-tools-2.8/src/yppasswd.c 2005-03-11 13:13:45.700315296 +0100 @@ -117,6 +117,7 @@ fputs (_(" -f Change GECOS field information\n"), stdout); fputs (_(" -l Change the login shell\n"), stdout); fputs (_(" -p Change the password\n"), stdout); + fputs (_(" -b Enable support for *BSD rpc.yppasswd daemon\n"), stdout); fputs (_(" -?, --help Give this help list\n"), stdout); fputs (_(" --usage Give a short usage message\n"), stdout); fputs (_(" --version Print program version\n"), stdout); @@ -440,7 +441,7 @@ main (int argc, char **argv) { char *s, *progname, *domainname = NULL, *user = NULL, *master = NULL; - int f_flag = 0, l_flag = 0, p_flag = 0, error, status; + int f_flag = 0, l_flag = 0, p_flag = 0, error, status, bsd_flag = 0; struct yppasswd yppwd; struct passwd *pwd; CLIENT *clnt; @@ -476,7 +477,7 @@ }; c = getopt_long (argc, argv, - (l_flag == 0 && f_flag == 0) ? "flp?" : "?", + (l_flag == 0 && f_flag == 0) ? "flpb?" : "?", long_options, &option_index); if (c == (-1)) break; @@ -491,6 +492,9 @@ case 'p': p_flag = 1; break; + case 'b': + bsd_flag = 1; + break; case '?': if (l_flag) print_help_chsh (); @@ -645,7 +649,7 @@ /* We can't check the password with shadow passwords enabled. We * leave the checking to yppasswdd */ if (uid != 0 && strcmp (pwd->pw_passwd, "x") != 0 && - strcmp (pwd->pw_passwd, hashpass ) != 0) + strcmp (pwd->pw_passwd, hashpass ) != 0 && !bsd_flag) { int passwdlen; char *sane_passwd; --- yp-tools-2.8/man/yppasswd.1.in 2001-12-08 22:34:43.000000000 +0100 +++ yp-tools-2.8/man/yppasswd.1.in 2005-03-11 13:19:45.024689688 +0100 @@ -20,7 +20,7 @@ .SH NAME yppasswd, ypchfn, ypchsh \- change your password in the NIS database .SH SYNOPSIS -.B "yppasswd [-f] [-l] [-p] [user]" +.B "yppasswd [-f] [-l] [-p] [-b] [user]" .br .B "ypchfn [user]" .br @@ -48,6 +48,8 @@ .BR \-l , or your GECOS field .BR \-f , +interact with *BSD Server +.BR \-b , or a combination of them. .B yppasswd implies the