aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/pam_shells/pam_shells.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/pam_shells/pam_shells.c b/modules/pam_shells/pam_shells.c
index 2fae67cf..3e639ed0 100644
--- a/modules/pam_shells/pam_shells.c
+++ b/modules/pam_shells/pam_shells.c
@@ -140,6 +140,7 @@ static int perform_check(pam_handle_t *pamh)
getdelim(&p, &n, '\n', shellFile)
#endif
!= -1) {
+ p[strcspn(p, "\n")] = '\0';
if (p[0] != '/') {
continue;
@@ -161,6 +162,7 @@ static int perform_check(pam_handle_t *pamh)
ignore = 0;
continue;
}
+ *p = '\0';
if (buf[0] != '/') {
continue;