diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2001-03-05 05:56:40 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2001-03-05 05:56:40 +0000 |
commit | 086cf214cf70cbb1658a9e966f84e7c12214554c (patch) | |
tree | f71acc5803d24430ed87ddf4fc53f31dd9369e37 /auth.c | |
parent | ebd888d91996b8328009f985d1b69d9f698e3607 (diff) |
- markus@cvs.openbsd.org 2001/02/22 21:59:44
[auth.c auth.h auth1.c auth2.c misc.c misc.h ssh.c]
use pwcopy in ssh.c, too
Diffstat (limited to 'auth.c')
-rw-r--r-- | auth.c | 22 |
1 files changed, 1 insertions, 21 deletions
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | RCSID("$OpenBSD: auth.c,v 1.17 2001/02/12 16:16:23 markus Exp $"); | 26 | RCSID("$OpenBSD: auth.c,v 1.18 2001/02/22 21:59:43 markus Exp $"); |
27 | 27 | ||
28 | #ifdef HAVE_LOGIN_H | 28 | #ifdef HAVE_LOGIN_H |
29 | #include <login.h> | 29 | #include <login.h> |
@@ -170,26 +170,6 @@ authctxt_new(void) | |||
170 | return authctxt; | 170 | return authctxt; |
171 | } | 171 | } |
172 | 172 | ||
173 | struct passwd * | ||
174 | pwcopy(struct passwd *pw) | ||
175 | { | ||
176 | struct passwd *copy = xmalloc(sizeof(*copy)); | ||
177 | memset(copy, 0, sizeof(*copy)); | ||
178 | copy->pw_name = xstrdup(pw->pw_name); | ||
179 | copy->pw_passwd = xstrdup(pw->pw_passwd); | ||
180 | copy->pw_uid = pw->pw_uid; | ||
181 | copy->pw_gid = pw->pw_gid; | ||
182 | #ifdef HAVE_PW_CLASS_IN_PASSWD | ||
183 | copy->pw_class = xstrdup(pw->pw_class); | ||
184 | #endif | ||
185 | #ifdef HAVE_CYGWIN | ||
186 | copy->pw_gecos = xstrdup(pw->pw_gecos); | ||
187 | #endif | ||
188 | copy->pw_dir = xstrdup(pw->pw_dir); | ||
189 | copy->pw_shell = xstrdup(pw->pw_shell); | ||
190 | return copy; | ||
191 | } | ||
192 | |||
193 | void | 173 | void |
194 | auth_log(Authctxt *authctxt, int authenticated, char *method, char *info) | 174 | auth_log(Authctxt *authctxt, int authenticated, char *method, char *info) |
195 | { | 175 | { |