summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2013-04-23 14:25:52 +1000
committerDamien Miller <djm@mindrot.org>2013-04-23 14:25:52 +1000
commit6332da2ae88db623d7da8070dd807efa26d9dfe8 (patch)
tree1d8fd6ce793ce93282d2ae80a6cee8324b283f31 /misc.c
parentce1c9574fcfaf753a062276867335c1e237f725c (diff)
- (djm) [auth.c configure.ac misc.c monitor.c monitor_wrap.c] Support
platforms, such as Android, that lack struct passwd.pw_gecos. Report and initial patch from Nathan Osman bz#2086; feedback tim@ ok dtucker@
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/misc.c b/misc.c
index a7a23dcc6..9e287433a 100644
--- a/misc.c
+++ b/misc.c
@@ -206,16 +206,18 @@ pwcopy(struct passwd *pw)
206 206
207 copy->pw_name = xstrdup(pw->pw_name); 207 copy->pw_name = xstrdup(pw->pw_name);
208 copy->pw_passwd = xstrdup(pw->pw_passwd); 208 copy->pw_passwd = xstrdup(pw->pw_passwd);
209#ifdef HAVE_STRUCT_PASSWD_PW_GECOS
209 copy->pw_gecos = xstrdup(pw->pw_gecos); 210 copy->pw_gecos = xstrdup(pw->pw_gecos);
211#endif
210 copy->pw_uid = pw->pw_uid; 212 copy->pw_uid = pw->pw_uid;
211 copy->pw_gid = pw->pw_gid; 213 copy->pw_gid = pw->pw_gid;
212#ifdef HAVE_PW_EXPIRE_IN_PASSWD 214#ifdef HAVE_STRUCT_PASSWD_PW_EXPIRE
213 copy->pw_expire = pw->pw_expire; 215 copy->pw_expire = pw->pw_expire;
214#endif 216#endif
215#ifdef HAVE_PW_CHANGE_IN_PASSWD 217#ifdef HAVE_STRUCT_PASSWD_PW_CHANGE
216 copy->pw_change = pw->pw_change; 218 copy->pw_change = pw->pw_change;
217#endif 219#endif
218#ifdef HAVE_PW_CLASS_IN_PASSWD 220#ifdef HAVE_STRUCT_PASSWD_PW_CLASS
219 copy->pw_class = xstrdup(pw->pw_class); 221 copy->pw_class = xstrdup(pw->pw_class);
220#endif 222#endif
221 copy->pw_dir = xstrdup(pw->pw_dir); 223 copy->pw_dir = xstrdup(pw->pw_dir);