summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2002-05-10 03:02:22 +0000
committerTim Potter <tpot@samba.org>2002-05-10 03:02:22 +0000
commitfc26f277caa0baad3c3d101fd94e365dec565d54 (patch)
tree428ace895561fae835b2e5da11192a3086c9bfa5 /source3/nsswitch
parent6d893c61cd9bbbef9c4953d1def6762684cf0f00 (diff)
downloadsamba-fc26f277caa0baad3c3d101fd94e365dec565d54.tar.gz
samba-fc26f277caa0baad3c3d101fd94e365dec565d54.tar.bz2
samba-fc26f277caa0baad3c3d101fd94e365dec565d54.zip
Fix for Solaris nscd issue pointed out by Mike Gerdts
<Michael.Gerdts@alcatel.com>. The struct passwd in Solaris contains some extra fields which must be initialised otherwise nscd crashes. (This used to be commit a67323d07177ebc8e46dc14476efaf7e95944504)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/winbind_nss.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source3/nsswitch/winbind_nss.c b/source3/nsswitch/winbind_nss.c
index 0a49f5ec96..a396e5551b 100644
--- a/source3/nsswitch/winbind_nss.c
+++ b/source3/nsswitch/winbind_nss.c
@@ -659,6 +659,17 @@ static NSS_STATUS fill_pwent(struct passwd *result,
strcpy(result->pw_shell, pw->pw_shell);
+ /* The struct passwd for Solaris has some extra fields which must
+ be initialised or nscd crashes. */
+
+#if HAVE_PASSWD_PW_COMMENT
+ result->pw_comment = "";
+#endif
+
+#if HAVE_PASSWD_PW_AGE
+ result->pw_age = "";
+#endif
+
return NSS_STATUS_SUCCESS;
}