diff options
authorDmitry V. Levin <>2020-05-01 21:44:59 +0000
committerDmitry V. Levin <>2020-05-21 16:51:52 +0000
commitfa66049858580678e619360087dd825a783716d7 (patch)
parented74a6c898df2963d0587262caf6996259025426 (diff)
pam_localuser: use BUFSIZ as the line buffer size
As BUFSIZ is the buffer size used in stdio, it must be an efficient size for the line buffer. Also, it's larger than LINE_MAX used as the line buffer size before this change, effectively raising the maximum user name length supported by this module. * modules/pam_localuser/pam_localuser.c (pam_sm_authenticate): Replace LINE_MAX with BUFSIZ.
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/pam_localuser/pam_localuser.c b/modules/pam_localuser/pam_localuser.c
index 66ca2d08..e6dd72d0 100644
--- a/modules/pam_localuser/pam_localuser.c
+++ b/modules/pam_localuser/pam_localuser.c
@@ -64,7 +64,7 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED,
FILE *fp;
int debug = 0;
const char *filename = "/etc/passwd";
- char line[LINE_MAX];
+ char line[BUFSIZ];
const char* user;
size_t user_len;