diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2004-04-20 23:21:24 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2004-04-20 23:21:24 +0000 |
commit | 8db2b678974619797ec0d47670dc966ac139aad7 (patch) | |
tree | 79d137f6b429a414544d16fd2766f9ded60886ed /lib/libutil | |
parent | a4ccbe5bc7e8df106f798254306616fb80e6922f (diff) |
Adapt to new pw_copy() API, closes PR 3698.
Diffstat (limited to 'lib/libutil')
-rw-r--r-- | lib/libutil/check_expire.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/lib/libutil/check_expire.c b/lib/libutil/check_expire.c index f1d1e438aa3..72c789b0be5 100644 --- a/lib/libutil/check_expire.c +++ b/lib/libutil/check_expire.c @@ -1,4 +1,4 @@ -/* $OpenBSD: check_expire.c,v 1.7 2003/09/02 16:55:32 markus Exp $ */ +/* $OpenBSD: check_expire.c,v 1.8 2004/04/20 23:21:23 millert Exp $ */ /* * Copyright (c) 1997 Berkeley Software Design, Inc. All rights reserved. @@ -51,14 +51,10 @@ #include "util.h" -static char *pwd_update(struct passwd *); +static char *pwd_update(const struct passwd *, const struct passwd *); int -login_check_expire(back, pwd, class, lastchance) - FILE *back; - struct passwd *pwd; - char *class; - int lastchance; +login_check_expire(FILE *back, struct passwd *pwd, char *class, int lastchance) { auth_session_t *as; login_cap_t *lc; @@ -132,7 +128,7 @@ login_check_expire(back, pwd, class, lastchance) */ npwd = pw_dup(pwd); npwd->pw_change = 1; - p = pwd_update(npwd); + p = pwd_update(npwd, pwd); memset(npwd->pw_passwd, 0, strlen(npwd->pw_passwd)); free(npwd); @@ -164,8 +160,7 @@ login_check_expire(back, pwd, class, lastchance) } static char * -pwd_update(pwd) - struct passwd *pwd; +pwd_update(const struct passwd *pwd, const struct passwd *opwd) { int tfd, pfd; @@ -184,7 +179,7 @@ pwd_update(pwd) return(strerror(errno)); } - pw_copy(pfd, tfd, pwd); + pw_copy(pfd, tfd, pwd, opwd); if (pw_mkdb(pwd->pw_name, 0) < 0) { pw_abort(); return("unable to update password database"); |