lib: replace USER_NAME_MAX_LENGTH macro
Replace it by `sysconf(_SC_LOGIN_NAME_MAX)`, which is the maximum username length supported by the kernel. Resolves: https://github.com/shadow-maint/shadow/issues/674 Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
This commit is contained in:
committed by
Serge Hallyn
parent
fb8f44d73f
commit
3b7cc05387
@@ -232,10 +232,6 @@ static inline void memzero(void *ptr, size_t size)
|
||||
# define format_attr(type, index, check)
|
||||
#endif
|
||||
|
||||
/* Maximum length of usernames */
|
||||
#include <utmp.h>
|
||||
#define USER_NAME_MAX_LENGTH (sizeof (((struct utmp *)NULL)->ut_user))
|
||||
|
||||
/* Maximum length of passwd entry */
|
||||
#define PASSWD_ENTRY_MAX_LENGTH 32768
|
||||
|
||||
|
||||
Reference in New Issue
Block a user