Raise limit for passwd and shadow entry length

Moreover, include checks to prevent writing entries longer than the
length limit.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1422497

Signed-off-by: Tomáš Mráz <tm@t8m.info>
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
This commit is contained in:
Iker Pedrosa
2022-10-07 12:36:59 +02:00
committed by Iker Pedrosa
parent fbf275da19
commit 16afe18142
5 changed files with 22 additions and 5 deletions

View File

@@ -327,6 +327,9 @@ extern char *strerror ();
# endif
#endif
/* Maximum length of passwd entry */
#define PASSWD_ENTRY_MAX_LENGTH 32768
#ifdef HAVE_SECURE_GETENV
# define shadow_getenv(name) secure_getenv(name)
# else