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 /ssh.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 'ssh.c')
-rw-r--r-- | ssh.c | 16 |
1 files changed, 3 insertions, 13 deletions
@@ -39,7 +39,7 @@ | |||
39 | */ | 39 | */ |
40 | 40 | ||
41 | #include "includes.h" | 41 | #include "includes.h" |
42 | RCSID("$OpenBSD: ssh.c,v 1.97 2001/02/21 21:14:04 stevesk Exp $"); | 42 | RCSID("$OpenBSD: ssh.c,v 1.98 2001/02/22 21:59:44 markus Exp $"); |
43 | 43 | ||
44 | #include <openssl/evp.h> | 44 | #include <openssl/evp.h> |
45 | #include <openssl/err.h> | 45 | #include <openssl/err.h> |
@@ -245,7 +245,7 @@ main(int ac, char **av) | |||
245 | u_short fwd_port, fwd_host_port; | 245 | u_short fwd_port, fwd_host_port; |
246 | char *optarg, *cp, buf[256]; | 246 | char *optarg, *cp, buf[256]; |
247 | struct stat st; | 247 | struct stat st; |
248 | struct passwd *pw, pwcopy; | 248 | struct passwd *pw; |
249 | int dummy; | 249 | int dummy; |
250 | uid_t original_effective_uid; | 250 | uid_t original_effective_uid; |
251 | 251 | ||
@@ -555,17 +555,7 @@ main(int ac, char **av) | |||
555 | exit(1); | 555 | exit(1); |
556 | } | 556 | } |
557 | /* Take a copy of the returned structure. */ | 557 | /* Take a copy of the returned structure. */ |
558 | memset(&pwcopy, 0, sizeof(pwcopy)); | 558 | pw = pwcopy(pw); |
559 | pwcopy.pw_name = xstrdup(pw->pw_name); | ||
560 | pwcopy.pw_passwd = xstrdup(pw->pw_passwd); | ||
561 | pwcopy.pw_uid = pw->pw_uid; | ||
562 | pwcopy.pw_gid = pw->pw_gid; | ||
563 | #ifdef HAVE_PW_CLASS_IN_PASSWD | ||
564 | pwcopy.pw_class = xstrdup(pw->pw_class); | ||
565 | #endif | ||
566 | pwcopy.pw_dir = xstrdup(pw->pw_dir); | ||
567 | pwcopy.pw_shell = xstrdup(pw->pw_shell); | ||
568 | pw = &pwcopy; | ||
569 | 559 | ||
570 | /* Initialize "log" output. Since we are the client all output | 560 | /* Initialize "log" output. Since we are the client all output |
571 | actually goes to the terminal. */ | 561 | actually goes to the terminal. */ |