KNF
This commit is contained in:
parent
2b27474301
commit
c9987f1692
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: chpass.c,v 1.14 1997/10/18 12:48:47 lukem Exp $ */
|
||||
/* $NetBSD: chpass.c,v 1.15 1998/07/05 14:26:06 mrg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1988, 1993, 1994
|
||||
|
@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1993, 1994\n\
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)chpass.c 8.4 (Berkeley) 4/2/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: chpass.c,v 1.14 1997/10/18 12:48:47 lukem Exp $");
|
||||
__RCSID("$NetBSD: chpass.c,v 1.15 1998/07/05 14:26:06 mrg Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -232,9 +232,8 @@ main(argc, argv)
|
|||
/* Edit the user passwd information if requested. */
|
||||
if (op == EDITENTRY) {
|
||||
dfd = mkstemp(tempname);
|
||||
if (dfd < 0) {
|
||||
(*Pw_error)(tempname, 1, 1);
|
||||
}
|
||||
if (dfd < 0)
|
||||
(*Pw_error)(tempname, 1, 1);
|
||||
display(tempname, dfd, pw);
|
||||
edit(tempname, pw);
|
||||
(void)unlink(tempname);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: field.c,v 1.4 1997/10/18 12:49:00 lukem Exp $ */
|
||||
/* $NetBSD: field.c,v 1.5 1998/07/05 14:26:06 mrg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1993, 1994
|
||||
|
@ -38,7 +38,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)field.c 8.4 (Berkeley) 4/2/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: field.c,v 1.4 1997/10/18 12:49:00 lukem Exp $");
|
||||
__RCSID("$NetBSD: field.c,v 1.5 1998/07/05 14:26:06 mrg Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -64,6 +64,7 @@ p_login(p, pw, ep)
|
|||
struct passwd *pw;
|
||||
ENTRY *ep;
|
||||
{
|
||||
|
||||
if (!*p) {
|
||||
warnx("empty login field");
|
||||
return (1);
|
||||
|
@ -93,6 +94,7 @@ p_passwd(p, pw, ep)
|
|||
struct passwd *pw;
|
||||
ENTRY *ep;
|
||||
{
|
||||
|
||||
if (!*p)
|
||||
pw->pw_passwd = ""; /* "NOLOGIN"; */
|
||||
else if (!(pw->pw_passwd = strdup(p))) {
|
||||
|
@ -171,6 +173,7 @@ p_class(p, pw, ep)
|
|||
struct passwd *pw;
|
||||
ENTRY *ep;
|
||||
{
|
||||
|
||||
if (!*p)
|
||||
pw->pw_class = "";
|
||||
else if (!(pw->pw_class = strdup(p))) {
|
||||
|
@ -188,6 +191,7 @@ p_change(p, pw, ep)
|
|||
struct passwd *pw;
|
||||
ENTRY *ep;
|
||||
{
|
||||
|
||||
if (!atot(p, &pw->pw_change))
|
||||
return (0);
|
||||
warnx("illegal date for change field");
|
||||
|
@ -201,6 +205,7 @@ p_expire(p, pw, ep)
|
|||
struct passwd *pw;
|
||||
ENTRY *ep;
|
||||
{
|
||||
|
||||
if (!atot(p, &pw->pw_expire))
|
||||
return (0);
|
||||
warnx("illegal date for expire field");
|
||||
|
@ -214,6 +219,7 @@ p_gecos(p, pw, ep)
|
|||
struct passwd *pw;
|
||||
ENTRY *ep;
|
||||
{
|
||||
|
||||
if (!*p)
|
||||
ep->save = "";
|
||||
else if (!(ep->save = strdup(p))) {
|
||||
|
@ -230,6 +236,7 @@ p_hdir(p, pw, ep)
|
|||
struct passwd *pw;
|
||||
ENTRY *ep;
|
||||
{
|
||||
|
||||
if (!*p) {
|
||||
warnx("empty home directory field");
|
||||
return (1);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pw_yp.c,v 1.12 1997/10/18 12:49:05 lukem Exp $ */
|
||||
/* $NetBSD: pw_yp.c,v 1.13 1998/07/05 14:26:06 mrg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 The Regents of the University of California.
|
||||
|
@ -37,7 +37,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)pw_yp.c 1.0 2/2/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: pw_yp.c,v 1.12 1997/10/18 12:49:05 lukem Exp $");
|
||||
__RCSID("$NetBSD: pw_yp.c,v 1.13 1998/07/05 14:26:06 mrg Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -177,7 +177,7 @@ pw_yp(pw, uid)
|
|||
yppasswd.newpw.pw_shell = pw->pw_shell;
|
||||
|
||||
client = clnt_create(master, YPPASSWDPROG, YPPASSWDVERS, "udp");
|
||||
if (client==NULL) {
|
||||
if (client == NULL) {
|
||||
warnx("cannot contact yppasswdd on %s: Reason: %s",
|
||||
master, yperr_string(YPERR_YPBIND));
|
||||
return (1);
|
||||
|
|
Loading…
Reference in New Issue