Unifdef -DPASSWD_IGNORE_COMMENTS. This wasn't really optional and

we have enough pseudo-options already.
This commit is contained in:
Peter Wemm 1999-09-06 17:30:03 +00:00
parent 406bc24462
commit 0c2b3c31aa
5 changed files with 4 additions and 11 deletions

View File

@ -1,7 +1,7 @@
# @(#)Makefile 8.2 (Berkeley) 4/2/94
PROG= chpass
CFLAGS+=-Wall -DPASSWD_IGNORE_COMMENTS
CFLAGS+=-Wall
SRCS= chpass.c edit.c field.c pw_copy.c pw_scan.c pw_util.c pw_yp.c \
table.c util.c ypxfr_misc.c ${GENSRCS}
GENSRCS=yp.h yp_clnt.c yppasswd.h yppasswd_clnt.c yppasswd_private.h \

View File

@ -85,7 +85,6 @@ pw_copy(ffd, tfd, pw)
goto err;
continue;
}
#ifdef PASSWD_IGNORE_COMMENTS
for (p = buf; *p != '\n'; p++)
if (*p != ' ' && *p != '\t')
break;
@ -95,7 +94,6 @@ pw_copy(ffd, tfd, pw)
goto err;
continue;
}
#endif
if (!(p = strchr(buf, ':'))) {
warnx("%s: corrupted entry", _PATH_MASTERPASSWD);
pw_error(NULL, 0, 1);

View File

@ -6,7 +6,7 @@ SRCS= local_passwd.c passwd.c pw_copy.c pw_util.c pw_yp.c \
yp_passwd.c ypxfr_misc.c ${GENSRCS}
GENSRCS=yp.h yp_clnt.c yppasswd.h yppasswd_clnt.c \
yppasswd_private.h yppasswd_private_clnt.c yppasswd_private_xdr.c
CFLAGS+=-Wall -DPASSWD_IGNORE_COMMENTS
CFLAGS+=-Wall
DPADD= ${LIBCRYPT} ${LIBRPCSVC} ${LIBUTIL}
LDADD= -lcrypt -lrpcsvc -lutil

View File

@ -3,6 +3,5 @@
PROG= pwd_mkdb
SRCS= pw_scan.c pwd_mkdb.c
MAN8= pwd_mkdb.8
CFLAGS+= -DPASSWD_IGNORE_COMMENTS
.include <bsd.prog.mk>

View File

@ -311,11 +311,9 @@ main(argc, argv)
if (!is_comment &&
(pwd.pw_name[0] == '+' || pwd.pw_name[0] == '-'))
yp_enabled = 1;
if (is_comment)
--cnt;
#define COMPACT(e) t = e; while ((*p++ = *t++));
#ifdef PASSWD_IGNORE_COMMENTS
if(is_comment)
--cnt;
#endif
if (!is_comment &&
(!username || (strcmp(username, pwd.pw_name) == 0))) {
/* Create insecure data. */
@ -510,7 +508,6 @@ scan(fp, pw)
}
*p = '\0';
#ifdef PASSWD_IGNORE_COMMENTS
/*
* Ignore comments: ^[ \t]*#
*/
@ -522,7 +519,6 @@ scan(fp, pw)
return(1);
} else
is_comment = 0;
#endif
if (!pw_scan(line, pw)) {
warnx("at line #%d", lcnt);