From 18219a2f997a06997117d20741d052fc1212cd25 Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Sun, 18 Nov 2012 20:13:11 +0000 Subject: properly initialise passwd.pw_class on FreeBSD to empty string (was set to NULL due to the memset which was introduced in r1767) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1833 ef36b2f9-881f-0410-afb5-c4e39611909c --- nss/passwd.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'nss') diff --git a/nss/passwd.c b/nss/passwd.c index 43694ef..a5cc3f0 100644 --- a/nss/passwd.c +++ b/nss/passwd.c @@ -45,6 +45,10 @@ static nss_status_t read_passwd( READ_BUF_STRING(fp,result->pw_gecos); READ_BUF_STRING(fp,result->pw_dir); READ_BUF_STRING(fp,result->pw_shell); +#ifdef HAVE_STRUCT_PASSWD_PW_CLASS + /* set the user access class to an empty string */ + result->pw_class=result->pw_name+strlen(result->pw_name); +#endif /* HAVE_STRUCT_PASSWD_PW_CLASS */ return NSS_STATUS_SUCCESS; } -- cgit v1.2.3