ports/net/nss-pam-ldapd/files/lclass-patches/patch-nss__passwd.c
Ryan Steinmetz 7b4ba79abf
net/pam-nss-ldapd: Update to 0.9.13
PR:		286039
Reported by:	Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>
2025-04-23 10:44:53 -04:00

13 lines
558 B
C

--- nss/passwd.c.orig 2021-01-17 13:59:24 UTC
+++ nss/passwd.c
@@ -45,8 +45,8 @@ static nss_status_t read_passwd(TFILE *fp, struct pass
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);
+ /* set the user access class to an empty string only if empty */
+ READ_BUF_STRING(fp, result->pw_class);
#endif /* HAVE_STRUCT_PASSWD_PW_CLASS */
return NSS_STATUS_SUCCESS;
}