version 1.9, 2000/12/12 02:19:58 |
version 1.10, 2001/06/26 20:16:43 |
|
|
extern int local_passwd(char *, int); |
extern int local_passwd(char *, int); |
extern int yp_passwd(char *); |
extern int yp_passwd(char *); |
extern int krb_passwd(int, char **); |
extern int krb_passwd(int, char **); |
|
extern int krb5_passwd(int, char **); |
void usage(int value); |
void usage(int value); |
|
|
|
|
|
|
#endif |
#endif |
|
|
/* Process args and options */ |
/* Process args and options */ |
while ((ch = getopt(argc, argv, "lyk")) != -1) |
while ((ch = getopt(argc, argv, "lykK")) != -1) |
switch (ch) { |
switch (ch) { |
case 'l': /* change local password file */ |
case 'l': /* change local password file */ |
use_kerberos = 0; |
use_kerberos = 0; |
use_yp = 0; |
use_yp = 0; |
break; |
break; |
case 'k': /* change Kerberos password */ |
case 'k': /* change Kerberos password */ |
#if defined(KERBEROS) || defined(KERBEROS5) |
#if defined(KERBEROS) |
use_kerberos = 1; |
use_kerberos = 1; |
use_yp = 0; |
use_yp = 0; |
exit(krb_passwd(argc, argv)); |
exit(krb_passwd(argc, argv)); |
|
|
#else |
#else |
fprintf(stderr, "passwd: Kerberos not compiled in\n"); |
fprintf(stderr, "passwd: Kerberos not compiled in\n"); |
exit(1); |
exit(1); |
|
#endif |
|
case 'K': |
|
#ifdef KRB5 |
|
/* Skip programname and '-K' option */ |
|
argc-=2; |
|
argv+=2; |
|
exit(krb5_passwd(argc, argv)); |
|
#else |
|
errx(1, "KerberosV support not enabled"); |
|
break; |
#endif |
#endif |
case 'y': /* change YP password */ |
case 'y': /* change YP password */ |
#ifdef YP |
#ifdef YP |