diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2020-05-01 21:44:59 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2020-05-21 16:51:52 +0000 |
commit | fa66049858580678e619360087dd825a783716d7 (patch) | |
tree | a47fb1fc633930768bdde96d65e9fc3fd9e251f6 /modules/pam_localuser/pam_localuser.c | |
parent | ed74a6c898df2963d0587262caf6996259025426 (diff) | |
download | pam-fa66049858580678e619360087dd825a783716d7.tar.gz pam-fa66049858580678e619360087dd825a783716d7.tar.bz2 pam-fa66049858580678e619360087dd825a783716d7.zip |
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.
Diffstat (limited to 'modules/pam_localuser/pam_localuser.c')
-rw-r--r-- | modules/pam_localuser/pam_localuser.c | 2 |
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; |