summaryrefslogtreecommitdiffstats
path: root/auth.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 /auth.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 'auth.c')
-rw-r--r--auth.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/auth.c b/auth.c
index 6128fa46..666c493d 100644
--- a/auth.c
+++ b/auth.c
@@ -721,10 +721,12 @@ fakepw(void)
fake.pw_name = "NOUSER";
fake.pw_passwd =
"$2a$06$r3.juUaHZDlIbQaO2dS9FuYxL1W9M81R1Tc92PoSNmzvpEqLkLGrK";
+#ifdef HAVE_STRUCT_PASSWD_PW_GECOS
fake.pw_gecos = "NOUSER";
+#endif
fake.pw_uid = privsep_pw == NULL ? (uid_t)-1 : privsep_pw->pw_uid;
fake.pw_gid = privsep_pw == NULL ? (gid_t)-1 : privsep_pw->pw_gid;
-#ifdef HAVE_PW_CLASS_IN_PASSWD
+#ifdef HAVE_STRUCT_PASSWD_PW_CLASS
fake.pw_class = "";
#endif
fake.pw_dir = "/nonexist";