]> andersk Git - openssh.git/blob - auth2.c
- (djm) Merge OpenBSD changes:
[openssh.git] / auth2.c
1 /*
2  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  *    notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  *    notice, this list of conditions and the following disclaimer in the
11  *    documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23  */
24
25 #include "includes.h"
26 RCSID("$OpenBSD: auth2.c,v 1.21 2000/11/12 19:50:37 markus Exp $");
27
28 #ifdef HAVE_OSF_SIA
29 # include <sia.h>
30 # include <siad.h>
31 #endif
32
33 #include <openssl/dsa.h>
34 #include <openssl/rsa.h>
35 #include <openssl/evp.h>
36
37 #include "xmalloc.h"
38 #include "rsa.h"
39 #include "ssh.h"
40 #include "pty.h"
41 #include "packet.h"
42 #include "buffer.h"
43 #include "servconf.h"
44 #include "compat.h"
45 #include "channels.h"
46 #include "bufaux.h"
47 #include "ssh2.h"
48 #include "auth.h"
49 #include "session.h"
50 #include "dispatch.h"
51 #include "auth.h"
52 #include "key.h"
53 #include "kex.h"
54
55 #include "uidswap.h"
56 #include "auth-options.h"
57
58 /* import */
59 extern ServerOptions options;
60 extern unsigned char *session_id2;
61 extern int session_id2_len;
62
63 #ifdef WITH_AIXAUTHENTICATE
64 extern char *aixloginmsg;
65 #endif
66 #ifdef HAVE_OSF_SIA
67 extern int saved_argc;
68 extern char **saved_argv;
69 #endif
70
71 static Authctxt *x_authctxt = NULL;
72 static int one = 1;
73
74 typedef struct Authmethod Authmethod;
75 struct Authmethod {
76         char    *name;
77         int     (*userauth)(Authctxt *authctxt);
78         int     *enabled;
79 };
80
81 /* protocol */
82
83 void    input_service_request(int type, int plen, void *ctxt);
84 void    input_userauth_request(int type, int plen, void *ctxt);
85 void    protocol_error(int type, int plen, void *ctxt);
86
87
88 /* helper */
89 Authmethod      *authmethod_lookup(const char *name);
90 struct passwd   *pwcopy(struct passwd *pw);
91 int     user_key_allowed(struct passwd *pw, Key *key);
92 char    *authmethods_get(void);
93
94 /* auth */
95 int     userauth_none(Authctxt *authctxt);
96 int     userauth_passwd(Authctxt *authctxt);
97 int     userauth_pubkey(Authctxt *authctxt);
98 int     userauth_kbdint(Authctxt *authctxt);
99
100 Authmethod authmethods[] = {
101         {"none",
102                 userauth_none,
103                 &one},
104         {"publickey",
105                 userauth_pubkey,
106                 &options.pubkey_authentication},
107         {"keyboard-interactive",
108                 userauth_kbdint,
109                 &options.kbd_interactive_authentication},
110         {"password",
111                 userauth_passwd,
112                 &options.password_authentication},
113         {NULL, NULL, NULL}
114 };
115
116 /*
117  * loop until authctxt->success == TRUE
118  */
119
120 void
121 do_authentication2()
122 {
123         Authctxt *authctxt = xmalloc(sizeof(*authctxt));
124         memset(authctxt, 'a', sizeof(*authctxt));
125         authctxt->valid = 0;
126         authctxt->attempt = 0;
127         authctxt->success = 0;
128         x_authctxt = authctxt;          /*XXX*/
129
130 #ifdef KRB4
131         /* turn off kerberos, not supported by SSH2 */
132         options.kerberos_authentication = 0;
133 #endif
134         dispatch_init(&protocol_error);
135         dispatch_set(SSH2_MSG_SERVICE_REQUEST, &input_service_request);
136         dispatch_run(DISPATCH_BLOCK, &authctxt->success, authctxt);
137         do_authenticated2();
138 }
139
140 void
141 protocol_error(int type, int plen, void *ctxt)
142 {
143         log("auth: protocol error: type %d plen %d", type, plen);
144         packet_start(SSH2_MSG_UNIMPLEMENTED);
145         packet_put_int(0);
146         packet_send();
147         packet_write_wait();
148 }
149
150 void
151 input_service_request(int type, int plen, void *ctxt)
152 {
153         Authctxt *authctxt = ctxt;
154         unsigned int len;
155         int accept = 0;
156         char *service = packet_get_string(&len);
157         packet_done();
158
159         if (authctxt == NULL)
160                 fatal("input_service_request: no authctxt");
161
162         if (strcmp(service, "ssh-userauth") == 0) {
163                 if (!authctxt->success) {
164                         accept = 1;
165                         /* now we can handle user-auth requests */
166                         dispatch_set(SSH2_MSG_USERAUTH_REQUEST, &input_userauth_request);
167                 }
168         }
169         /* XXX all other service requests are denied */
170
171         if (accept) {
172                 packet_start(SSH2_MSG_SERVICE_ACCEPT);
173                 packet_put_cstring(service);
174                 packet_send();
175                 packet_write_wait();
176         } else {
177                 debug("bad service request %s", service);
178                 packet_disconnect("bad service request %s", service);
179         }
180         xfree(service);
181 }
182
183 void
184 input_userauth_request(int type, int plen, void *ctxt)
185 {
186         Authctxt *authctxt = ctxt;
187         Authmethod *m = NULL;
188         char *user, *service, *method;
189         int authenticated = 0;
190
191         if (authctxt == NULL)
192                 fatal("input_userauth_request: no authctxt");
193         if (authctxt->attempt++ >= AUTH_FAIL_MAX) {
194 #ifdef WITH_AIXAUTHENTICATE 
195                 loginfailed(authctxt->user?authctxt->user:"NOUSER", 
196                         get_canonical_hostname(), "ssh");
197 #endif /* WITH_AIXAUTHENTICATE */
198                 packet_disconnect("too many failed userauth_requests");
199         }
200
201         user = packet_get_string(NULL);
202         service = packet_get_string(NULL);
203         method = packet_get_string(NULL);
204         debug("userauth-request for user %s service %s method %s", user, service, method);
205         debug("attempt #%d", authctxt->attempt);
206
207         if (authctxt->attempt == 1) { 
208                 /* setup auth context */
209                 struct passwd *pw = NULL;
210                 setproctitle("%s", user);
211                 pw = getpwnam(user);
212                 if (pw && allowed_user(pw) && strcmp(service, "ssh-connection")==0) {
213                         authctxt->pw = pwcopy(pw);
214                         authctxt->valid = 1;
215                         debug2("input_userauth_request: setting up authctxt for %s", user);
216 #ifdef USE_PAM
217                         start_pam(pw);
218 #endif
219                 } else {
220                         log("input_userauth_request: illegal user %s", user);
221                 }
222                 authctxt->user = xstrdup(user);
223                 authctxt->service = xstrdup(service);
224         } else if (authctxt->valid) {
225                 if (strcmp(user, authctxt->user) != 0 ||
226                     strcmp(service, authctxt->service) != 0) {
227                         log("input_userauth_request: missmatch: (%s,%s)!=(%s,%s)",
228                             user, service, authctxt->user, authctxt->service);
229                         authctxt->valid = 0;
230                 }
231         }
232
233         m = authmethod_lookup(method);
234         if (m != NULL) {
235                 debug2("input_userauth_request: try method %s", method);
236                 authenticated = m->userauth(authctxt);
237         } else {
238                 debug2("input_userauth_request: unsupported method %s", method);
239         }
240         if (!authctxt->valid && authenticated == 1) {
241                 log("input_userauth_request: INTERNAL ERROR: authenticated invalid user %s service %s", user, method);
242                 authenticated = 0;
243         }
244
245         /* Special handling for root */
246         if (authenticated == 1 &&
247             authctxt->valid && authctxt->pw->pw_uid == 0 && !options.permit_root_login) {
248                 authenticated = 0;
249                 log("ROOT LOGIN REFUSED FROM %.200s", get_canonical_hostname());
250         }
251
252 #ifdef USE_PAM
253         if (authenticated && authctxt->user && !do_pam_account(authctxt->user, NULL))
254                 authenticated = 0;
255 #endif /* USE_PAM */
256
257         /* Log before sending the reply */
258         userauth_log(authctxt, authenticated, method);
259         userauth_reply(authctxt, authenticated);
260
261         xfree(service);
262         xfree(user);
263         xfree(method);
264 }
265
266
267 void
268 userauth_log(Authctxt *authctxt, int authenticated, char *method)
269 {
270         void (*authlog) (const char *fmt,...) = verbose;
271         char *user = NULL, *authmsg = NULL;
272
273         /* Raise logging level */
274         if (authenticated == 1 ||
275             !authctxt->valid ||
276             authctxt->attempt >= AUTH_FAIL_LOG ||
277             strcmp(method, "password") == 0)
278                 authlog = log;
279
280         if (authenticated == 1) {
281                 authmsg = "Accepted";
282         } else if (authenticated == 0) {
283                 authmsg = "Failed";
284         } else {
285                 authmsg = "Postponed";
286         }
287
288         if (authctxt->valid) {
289                 user = authctxt->pw->pw_uid == 0 ? "ROOT" : authctxt->user;
290         } else {
291                 user = "NOUSER";
292         }
293
294         authlog("%s %s for %.200s from %.200s port %d ssh2",
295             authmsg,
296             method,
297             user,
298             get_remote_ipaddr(),
299             get_remote_port());
300 }
301
302 void   
303 userauth_reply(Authctxt *authctxt, int authenticated)
304 {
305         /* XXX todo: check if multiple auth methods are needed */
306         if (authenticated == 1) {
307 #ifdef WITH_AIXAUTHENTICATE
308                 /* We don't have a pty yet, so just label the line as "ssh" */
309                 if (loginsuccess(authctxt->user?authctxt->user:"NOUSER", 
310                         get_canonical_hostname(), "ssh", &aixloginmsg) < 0)
311                         aixloginmsg = NULL;
312 #endif /* WITH_AIXAUTHENTICATE */
313                 /* turn off userauth */
314                 dispatch_set(SSH2_MSG_USERAUTH_REQUEST, &protocol_error);
315                 packet_start(SSH2_MSG_USERAUTH_SUCCESS);
316                 packet_send();
317                 packet_write_wait();
318                 /* now we can break out */
319                 authctxt->success = 1;
320         } else if (authenticated == 0) {
321                 char *methods = authmethods_get();
322                 packet_start(SSH2_MSG_USERAUTH_FAILURE);
323                 packet_put_cstring(methods);
324                 packet_put_char(0);     /* XXX partial success, unused */
325                 packet_send();
326                 packet_write_wait();
327                 xfree(methods);
328         } else {
329                 /* do nothing, we did already send a reply */
330         }
331 }
332
333 int
334 userauth_none(Authctxt *authctxt)
335 {
336         /* disable method "none", only allowed one time */
337         Authmethod *m = authmethod_lookup("none");
338         if (m != NULL)
339                 m->enabled = NULL;
340         packet_done();
341
342         if (authctxt->valid == 0)
343                 return(0);
344                 
345 #ifdef HAVE_CYGWIN
346         if (check_nt_auth(1, authctxt->pw->pw_uid) == 0)
347                 return(0);
348 #endif
349 #ifdef USE_PAM
350         return auth_pam_password(authctxt->pw, "");
351 #elif defined(HAVE_OSF_SIA)
352         return (sia_validate_user(NULL, saved_argc, saved_argv, 
353                 get_canonical_hostname(), authctxt->user?authctxt->user:"NOUSER", 
354                         NULL, 0, NULL, "") == SIASUCCESS);
355 #else /* !HAVE_OSF_SIA && !USE_PAM */
356         return auth_password(authctxt->pw, "");
357 #endif /* USE_PAM */
358 }
359
360 int
361 userauth_passwd(Authctxt *authctxt)
362 {
363         char *password;
364         int authenticated = 0;
365         int change;
366         unsigned int len;
367         change = packet_get_char();
368         if (change)
369                 log("password change not supported");
370         password = packet_get_string(&len);
371         packet_done();
372         if (authctxt->valid &&
373 #ifdef HAVE_CYGWIN
374                 check_nt_auth(1, authctxt->pw->pw_uid) &&
375 #endif
376 #ifdef USE_PAM
377             auth_pam_password(authctxt->pw, password) == 1)
378 #elif defined(HAVE_OSF_SIA)
379             sia_validate_user(NULL, saved_argc, saved_argv, 
380                         get_canonical_hostname(), authctxt->user?authctxt->user:"NOUSER", 
381                         NULL, 0, NULL, password) == SIASUCCESS)
382 #else /* !USE_PAM && !HAVE_OSF_SIA */
383             auth_password(authctxt->pw, password) == 1)
384 #endif /* USE_PAM */
385                 authenticated = 1;
386         memset(password, 0, len);
387         xfree(password);
388         return authenticated;
389 }
390
391 int
392 userauth_kbdint(Authctxt *authctxt)
393 {
394         int authenticated = 0;
395         char *lang = NULL;
396         char *devs = NULL;
397
398         lang = packet_get_string(NULL);
399         devs = packet_get_string(NULL);
400         packet_done();
401
402         debug("keyboard-interactive language %s devs %s", lang, devs);
403 #ifdef SKEY
404         /* XXX hardcoded, we should look at devs */
405         if (options.skey_authentication != 0)
406                 authenticated = auth2_skey(authctxt);
407 #endif
408         xfree(lang);
409         xfree(devs);
410 #ifdef HAVE_CYGWIN
411         if (check_nt_auth(0, authctxt->pw->pw_uid) == 0)
412                 return(0);
413 #endif
414         return authenticated;
415 }
416
417 int
418 userauth_pubkey(Authctxt *authctxt)
419 {
420         Buffer b;
421         Key *key;
422         char *pkalg, *pkblob, *sig;
423         unsigned int alen, blen, slen;
424         int have_sig, pktype;
425         int authenticated = 0;
426
427         if (!authctxt->valid) {
428                 debug2("userauth_pubkey: disabled because of invalid user");
429                 return 0;
430         }
431         have_sig = packet_get_char();
432         pkalg = packet_get_string(&alen);
433         pktype = key_type_from_name(pkalg);
434         if (pktype == KEY_UNSPEC) {
435                 log("bad pkalg %s", pkalg);
436                 xfree(pkalg);
437                 return 0;
438         }
439         pkblob = packet_get_string(&blen);
440         key = key_from_blob(pkblob, blen);
441         if (key != NULL) {
442                 if (have_sig) {
443                         sig = packet_get_string(&slen);
444                         packet_done();
445                         buffer_init(&b);
446                         if (datafellows & SSH_OLD_SESSIONID) {
447                                 buffer_append(&b, session_id2, session_id2_len);
448                         } else {
449                                 buffer_put_string(&b, session_id2, session_id2_len);
450                         }
451                         /* reconstruct packet */
452                         buffer_put_char(&b, SSH2_MSG_USERAUTH_REQUEST);
453                         buffer_put_cstring(&b, authctxt->user);
454                         buffer_put_cstring(&b,
455                             datafellows & SSH_BUG_PUBKEYAUTH ?
456                             "ssh-userauth" :
457                             authctxt->service);
458                         buffer_put_cstring(&b, "publickey");
459                         buffer_put_char(&b, have_sig);
460                         buffer_put_cstring(&b, key_ssh_name(key));
461                         buffer_put_string(&b, pkblob, blen);
462 #ifdef DEBUG_PK
463                         buffer_dump(&b);
464 #endif
465                         /* test for correct signature */
466                         if (user_key_allowed(authctxt->pw, key) &&
467                             key_verify(key, sig, slen, buffer_ptr(&b), buffer_len(&b)) == 1)
468                                 authenticated = 1;
469                         buffer_clear(&b);
470                         xfree(sig);
471                 } else {
472                         debug("test whether pkalg/pkblob are acceptable");
473                         packet_done();
474
475                         /* XXX fake reply and always send PK_OK ? */
476                         /*
477                          * XXX this allows testing whether a user is allowed
478                          * to login: if you happen to have a valid pubkey this
479                          * message is sent. the message is NEVER sent at all
480                          * if a user is not allowed to login. is this an
481                          * issue? -markus
482                          */
483                         if (user_key_allowed(authctxt->pw, key)) {
484                                 packet_start(SSH2_MSG_USERAUTH_PK_OK);
485                                 packet_put_string(pkalg, alen);
486                                 packet_put_string(pkblob, blen);
487                                 packet_send();
488                                 packet_write_wait();
489                                 authenticated = -1;
490                         }
491                 }
492                 if (authenticated != 1)
493                         auth_clear_options();
494                 key_free(key);
495         }
496         debug2("userauth_pubkey: authenticated %d pkalg %s", authenticated, pkalg);
497         xfree(pkalg);
498         xfree(pkblob);
499 #ifdef HAVE_CYGWIN
500         if (check_nt_auth(0, authctxt->pw->pw_uid) == 0)
501                 return(0);
502 #endif
503         return authenticated;
504 }
505
506 /* get current user */
507
508 struct passwd*
509 auth_get_user(void)
510 {
511         return (x_authctxt != NULL && x_authctxt->valid) ? x_authctxt->pw : NULL;
512 }
513
514 #define DELIM   ","
515
516 char *
517 authmethods_get(void)
518 {
519         Authmethod *method = NULL;
520         unsigned int size = 0;
521         char *list;
522
523         for (method = authmethods; method->name != NULL; method++) {
524                 if (strcmp(method->name, "none") == 0)
525                         continue;
526                 if (method->enabled != NULL && *(method->enabled) != 0) {
527                         if (size != 0)
528                                 size += strlen(DELIM);
529                         size += strlen(method->name);
530                 }
531         }
532         size++;                 /* trailing '\0' */
533         list = xmalloc(size);
534         list[0] = '\0';
535
536         for (method = authmethods; method->name != NULL; method++) {
537                 if (strcmp(method->name, "none") == 0)
538                         continue;
539                 if (method->enabled != NULL && *(method->enabled) != 0) {
540                         if (list[0] != '\0')
541                                 strlcat(list, DELIM, size);
542                         strlcat(list, method->name, size);
543                 }
544         }
545         return list;
546 }
547
548 Authmethod *
549 authmethod_lookup(const char *name)
550 {
551         Authmethod *method = NULL;
552         if (name != NULL)
553                 for (method = authmethods; method->name != NULL; method++)
554                         if (method->enabled != NULL &&
555                             *(method->enabled) != 0 &&
556                             strcmp(name, method->name) == 0)
557                                 return method;
558         debug2("Unrecognized authentication method name: %s", name ? name : "NULL");
559         return NULL;
560 }
561
562 /* return 1 if user allows given key */
563 int
564 user_key_allowed(struct passwd *pw, Key *key)
565 {
566         char line[8192], file[1024];
567         int found_key = 0;
568         FILE *f;
569         unsigned long linenum = 0;
570         struct stat st;
571         Key *found;
572
573         if (pw == NULL)
574                 return 0;
575
576         /* Temporarily use the user's uid. */
577         temporarily_use_uid(pw->pw_uid);
578
579         /* The authorized keys. */
580         snprintf(file, sizeof file, "%.500s/%.100s", pw->pw_dir,
581             SSH_USER_PERMITTED_KEYS2);
582
583         /* Fail quietly if file does not exist */
584         if (stat(file, &st) < 0) {
585                 /* Restore the privileged uid. */
586                 restore_uid();
587                 return 0;
588         }
589         /* Open the file containing the authorized keys. */
590         f = fopen(file, "r");
591         if (!f) {
592                 /* Restore the privileged uid. */
593                 restore_uid();
594                 return 0;
595         }
596         if (options.strict_modes) {
597                 int fail = 0;
598                 char buf[1024];
599                 /* Check open file in order to avoid open/stat races */
600                 if (fstat(fileno(f), &st) < 0 ||
601                     (st.st_uid != 0 && st.st_uid != pw->pw_uid) ||
602                     (st.st_mode & 022) != 0) {
603                         snprintf(buf, sizeof buf,
604                             "%s authentication refused for %.100s: "
605                             "bad ownership or modes for '%s'.",
606                             key_type(key), pw->pw_name, file);
607                         fail = 1;
608                 } else {
609                         /* Check path to SSH_USER_PERMITTED_KEYS */
610                         int i;
611                         static const char *check[] = {
612                                 "", SSH_USER_DIR, NULL
613                         };
614                         for (i = 0; check[i]; i++) {
615                                 snprintf(line, sizeof line, "%.500s/%.100s",
616                                     pw->pw_dir, check[i]);
617                                 if (stat(line, &st) < 0 ||
618                                     (st.st_uid != 0 && st.st_uid != pw->pw_uid) ||
619                                     (st.st_mode & 022) != 0) {
620                                         snprintf(buf, sizeof buf,
621                                             "%s authentication refused for %.100s: "
622                                             "bad ownership or modes for '%s'.",
623                                             key_type(key), pw->pw_name, line);
624                                         fail = 1;
625                                         break;
626                                 }
627                         }
628                 }
629                 if (fail) {
630                         fclose(f);
631                         log("%s",buf);
632                         restore_uid();
633                         return 0;
634                 }
635         }
636         found_key = 0;
637         found = key_new(key->type);
638
639         while (fgets(line, sizeof(line), f)) {
640                 char *cp, *options = NULL;
641                 linenum++;
642                 /* Skip leading whitespace, empty and comment lines. */
643                 for (cp = line; *cp == ' ' || *cp == '\t'; cp++)
644                         ;
645                 if (!*cp || *cp == '\n' || *cp == '#')
646                         continue;
647
648                 if (key_read(found, &cp) == -1) {
649                         /* no key?  check if there are options for this key */
650                         int quoted = 0;
651                         debug2("user_key_allowed: check options: '%s'", cp);
652                         options = cp;
653                         for (; *cp && (quoted || (*cp != ' ' && *cp != '\t')); cp++) {
654                                 if (*cp == '\\' && cp[1] == '"')
655                                         cp++;   /* Skip both */
656                                 else if (*cp == '"')
657                                         quoted = !quoted;
658                         }
659                         /* Skip remaining whitespace. */
660                         for (; *cp == ' ' || *cp == '\t'; cp++)
661                                 ;
662                         if (key_read(found, &cp) == -1) {
663                                 debug2("user_key_allowed: advance: '%s'", cp);
664                                 /* still no key?  advance to next line*/
665                                 continue;
666                         }
667                 }
668                 if (key_equal(found, key) &&
669                     auth_parse_options(pw, options, linenum) == 1) {
670                         found_key = 1;
671                         debug("matching key found: file %s, line %ld",
672                             file, linenum);
673                         break;
674                 }
675         }
676         restore_uid();
677         fclose(f);
678         key_free(found);
679         return found_key;
680 }
681
682 struct passwd *
683 pwcopy(struct passwd *pw)
684 {
685         struct passwd *copy = xmalloc(sizeof(*copy));
686         memset(copy, 0, sizeof(*copy));
687         copy->pw_name = xstrdup(pw->pw_name);
688         copy->pw_passwd = xstrdup(pw->pw_passwd);
689         copy->pw_uid = pw->pw_uid;
690         copy->pw_gid = pw->pw_gid;
691 #ifdef HAVE_PW_CLASS_IN_PASSWD
692         copy->pw_class = xstrdup(pw->pw_class);
693 #endif
694         copy->pw_dir = xstrdup(pw->pw_dir);
695         copy->pw_shell = xstrdup(pw->pw_shell);
696         return copy;
697 }
This page took 0.095229 seconds and 5 git commands to generate.