mirror of
https://git.freebsd.org/ports.git
synced 2025-04-28 01:26:39 -04:00
13 lines
558 B
C
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;
|
|
}
|