Cleaned up usage() -- removed bogus references to opassfile, which isn't

used anymore (/var/yp/Makefile creates a new /var/yp/passwd file from
/var/yp/master.passwd using awk, so yppasswdd doesn't have to make it
anymore).
This commit is contained in:
Bill Paul 1995-02-01 23:27:46 +00:00
parent 770f05c102
commit e26ae5b13a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=6107
2 changed files with 3 additions and 8 deletions

View File

@ -26,8 +26,7 @@
#include <rpc/pmap_clnt.h>
#include "yppasswd.h"
char *tempname;
extern char *passfile, *opassfile;
char *tempname, *passfile;
extern int *allow_chfn, *allow_chsh;
#define xprt_addr(xprt) (svc_getcaller(xprt)->sin_addr)

View File

@ -30,7 +30,6 @@ extern char *optarg;
static char *program_name = "";
static char *version = "yppsswdd " VERSION;
char *passfile = _PATH_MASTERPASSWD;
char *opassfile = NULL;
int allow_chfn = 0, allow_chsh = 0;
#define xprt_addr(xprt) (svc_getcaller(xprt)->sin_addr)
@ -84,7 +83,7 @@ yppasswdprog_1(struct svc_req *rqstp, SVCXPRT *transp)
static void
usage(FILE *fp, int n)
{
fprintf (fp, "usage: %s [-m master password file] [-o password file]\n [-h] [-f] [-s] [-v]\n", program_name );
fprintf (fp, "usage: %s [-m master password file] [-f] [-s] [-h] [-v]\n", program_name );
exit(n);
}
@ -121,14 +120,11 @@ main(int argc, char **argv)
/* Parse the command line options and arguments. */
opterr = 0;
while ((c = getopt(argc, argv, "m:o:fshv")) != EOF)
while ((c = getopt(argc, argv, "m:fshv")) != EOF)
switch (c) {
case 'm':
passfile = strdup(optarg);
break;
case 'o':
opassfile = strdup(optarg);
break;
case 'f':
allow_chfn = 1;
break;