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.
---
modules/pam_localuser/pam_localuser.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/pam_localuser/pam_localuser.c
b/modules/pam_localuser/pam_localuser.c
index c5a337fb..3972eb77 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;
--
ldv