summaryrefslogtreecommitdiffstats
path: root/usr.bin/passwd/passwd.c
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1995-08-13 16:07:36 +0000
committerwpaul <wpaul@FreeBSD.org>1995-08-13 16:07:36 +0000
commita5c24b2ab93f41e6817b6790c7aec2f58b2e3f8a (patch)
tree6fc5f7d93bcb0b386c0162d066ee327dc5227dd6 /usr.bin/passwd/passwd.c
parent0d181a55dc1c0f2d7802a9841743d9f6e9843424 (diff)
downloadFreeBSD-src-a5c24b2ab93f41e6817b6790c7aec2f58b2e3f8a.zip
FreeBSD-src-a5c24b2ab93f41e6817b6790c7aec2f58b2e3f8a.tar.gz
Remove the ypchfn/ypchsh stuff from passwd and leave just the
yppasswd support. The rest is moving into chpass.
Diffstat (limited to 'usr.bin/passwd/passwd.c')
-rw-r--r--usr.bin/passwd/passwd.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/usr.bin/passwd/passwd.c b/usr.bin/passwd/passwd.c
index 54f7dc0..aee2e6e 100644
--- a/usr.bin/passwd/passwd.c
+++ b/usr.bin/passwd/passwd.c
@@ -40,7 +40,7 @@ static char copyright[] =
#ifndef lint
static char sccsid[] = "From: @(#)passwd.c 8.3 (Berkeley) 4/2/94";
static const char rcsid[] =
- "$Id: passwd.c,v 1.3 1995/01/31 08:34:05 wpaul Exp $";
+ "$Id: passwd.c,v 1.4 1995/06/16 03:33:10 wpaul Exp $";
#endif /* not lint */
#include <err.h>
@@ -72,7 +72,7 @@ int use_local_passwd = 0;
#ifdef YP
#define PERM_SECURE (S_IRUSR|S_IWUSR)
-int use_yp_passwd = 0, opt_shell = 0, opt_fullname = 0;
+int _use_yp = 0;
char *prog_name;
HASHINFO openinfo = {
4096, /* bsize */
@@ -114,11 +114,7 @@ main(argc, argv)
DBT key,data;
char bf[UT_NAMESIZE + 2];
- if (strstr(argv[0], (prog_name = "ypchpass")))
- use_yp_passwd = opt_shell = opt_fullname = 1;
- if (strstr(argv[0], (prog_name = "ypchsh"))) opt_shell = 1;
- if (strstr(argv[0], (prog_name = "ypchfn"))) opt_fullname = 1;
- if (strstr(argv[0], (prog_name = "yppasswd"))) use_yp_passwd = 1;
+ if (strstr(argv[0], (prog_name = "yppasswd"))) _use_yp = 1;
#endif
while ((ch = getopt(argc, argv, OPTIONS)) != EOF) {
@@ -139,13 +135,7 @@ main(argc, argv)
#endif /* KERBEROS */
#ifdef YP
case 'y': /* Change NIS password */
- use_yp_passwd = 1;
- break;
- case 's': /* Change NIS shell field */
- opt_shell = 1;
- break;
- case 'f': /* Change NIS GECOS field */
- opt_fullname = 1;
+ _use_yp = 1;
break;
#endif
default:
@@ -231,9 +221,9 @@ usage()
fprintf(stderr,
"usage: passwd [-l] [-i instance] [-r realm] [-u fullname]\n");
fprintf(stderr,
- " [-l] [-y] [-f] [-s] [user]\n");
+ " [-l] [-y] [user]\n");
#else
- (void)fprintf(stderr, "usage: passwd [-l] [-y] [-f] [-s] [user] \n");
+ (void)fprintf(stderr, "usage: passwd [-l] [-y] [user] \n");
#endif
#else
#ifdef KERBEROS
OpenPOWER on IntegriCloud