-/* $OpenBSD: chpass.c,v 1.3 1996/06/26 05:31:54 deraadt Exp $ */
+/* $OpenBSD: chpass.c,v 1.4 1996/08/31 01:55:32 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.3 1996/06/26 05:31:54 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: chpass.c,v 1.4 1996/08/31 01:55:32 deraadt Exp $";
#endif
#endif /* not lint */
#ifdef YP
if (use_yp) {
- if (pw_yp(pw, uid))
+ if (pw_yp(pw, uid)) {
pw_error((char *)NULL, 0, 1);
- else
+ exit(1);
+ } else
exit(0);
- }
- else
+ } else
#endif /* YP */
/* Copy the passwd file to the lock file, updating pw. */
-/* $OpenBSD: edit.c,v 1.7 1996/08/30 13:29:47 deraadt Exp $ */
+/* $OpenBSD: edit.c,v 1.8 1996/08/31 01:55:33 deraadt Exp $ */
/* $NetBSD: edit.c,v 1.6 1996/05/15 21:50:45 jtc Exp $ */
/*-
#if 0
static char sccsid[] = "@(#)edit.c 8.3 (Berkeley) 4/2/94";
#else
-static char rcsid[] = "$OpenBSD: edit.c,v 1.7 1996/08/30 13:29:47 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: edit.c,v 1.8 1996/08/31 01:55:33 deraadt Exp $";
#endif
#endif /* not lint */
warnx("entries too long");
return (0);
}
- free(p);
+ /* must leave p allocated */
return (pw_scan(buf, pw, (int *)NULL));
}
-/* $OpenBSD: pw_yp.c,v 1.3 1996/08/30 13:09:41 deraadt Exp $ */
+/* $OpenBSD: pw_yp.c,v 1.4 1996/08/31 01:55:33 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.3 1996/08/30 13:09:41 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: pw_yp.c,v 1.4 1996/08/31 01:55:33 deraadt Exp $";
#endif
#endif /* not lint */
xdr_yppasswd, &yppasswd, xdr_int, &status, tv);
if (r) {
fprintf(stderr, "%s: rpc to yppasswdd failed. %d\n", progname, r);
+ clnt_destroy(client);
return(0);
} else if (status) {
printf("Couldn't change YP password information.\n");
+ clnt_destroy(client);
return(0);
}
printf("The YP password information has been changed on %s, the master YP passwd server.\n", master);
+ clnt_destroy(client);
return(1);
}