-/* $OpenBSD: chpass.c,v 1.7 1997/01/15 23:42:18 millert Exp $ */
+/* $OpenBSD: chpass.c,v 1.8 1997/02/13 17:28:39 deraadt Exp $ */
/* $NetBSD: chpass.c,v 1.8 1996/05/15 21:50:43 jtc Exp $ */
/*-
#if 0
static char sccsid[] = "@(#)chpass.c 8.4 (Berkeley) 4/2/94";
#else
-static char rcsid[] = "$OpenBSD: chpass.c,v 1.7 1997/01/15 23:42:18 millert Exp $";
+static char rcsid[] = "$OpenBSD: chpass.c,v 1.8 1997/02/13 17:28:39 deraadt Exp $";
#endif
#endif /* not lint */
}
} else
#endif /* YP */
+ {
+ /* Copy the passwd file to the lock file, updating pw. */
+ pw_copy(pfd, tfd, pw);
- /* Copy the passwd file to the lock file, updating pw. */
- pw_copy(pfd, tfd, pw);
-
- /* Now finish the passwd file update. */
- if (pw_mkdb() < 0)
- pw_error((char *)NULL, 0, 1);
+ /* Now finish the passwd file update. */
+ if (pw_mkdb() < 0)
+ pw_error((char *)NULL, 0, 1);
+ }
exit(0);
}
-/* $OpenBSD: pw_yp.c,v 1.5 1996/08/31 13:50:19 deraadt Exp $ */
+/* $OpenBSD: pw_yp.c,v 1.6 1997/02/13 17:28:40 deraadt Exp $ */
/* $NetBSD: pw_yp.c,v 1.5 1995/03/26 04:55:33 glass Exp $ */
/*
#if 0
static char sccsid[] = "@(#)pw_yp.c 1.0 2/2/93";
#else
-static char rcsid[] = "$OpenBSD: pw_yp.c,v 1.5 1996/08/31 13:50:19 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: pw_yp.c,v 1.6 1997/02/13 17:28:40 deraadt Exp $";
#endif
#endif /* not lint */
if (client==NULL) {
fprintf(stderr, "can't contact yppasswdd on %s: Reason: %s\n",
master, yperr_string(YPERR_YPBIND));
- return(0);
+ return(1);
}
client->cl_auth = authunix_create_default();
tv.tv_sec = 5;
if (r) {
fprintf(stderr, "%s: rpc to yppasswdd failed. %d\n", progname, r);
clnt_destroy(client);
- return(0);
+ return(1);
} else if (status) {
printf("Couldn't change YP password information.\n");
clnt_destroy(client);
- return(0);
+ return(1);
}
printf("The YP password information has been changed on %s, the master YP passwd server.\n", master);
clnt_destroy(client);
- return(1);
+ return(0);
}
static char *