From 25a303a41491a157ab5d7c3a01598b411148dd9f Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Thu, 22 Sep 2005 22:16:02 +0000 Subject: [PATCH] Relevant BUGIDs: none Purpose of commit: bugfix Commit summary: --------------- 2005-09-22 Dmitry V. Levin * modules/pam_nologin/pam_nologin.c (parse_args): Use strncmp() instead of memcmp() for string comparison. --- ChangeLog | 5 +++++ modules/pam_nologin/pam_nologin.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c77c281a..e48c60c1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-09-22 Dmitry V. Levin + + * modules/pam_nologin/pam_nologin.c (parse_args): Use strncmp() + instead of memcmp() for string comparison. + 2005-09-21 Dmitry V. Levin * modules/pam_nologin/pam_nologin.c: Include . diff --git a/modules/pam_nologin/pam_nologin.c b/modules/pam_nologin/pam_nologin.c index 39577595..54ecc82b 100644 --- a/modules/pam_nologin/pam_nologin.c +++ b/modules/pam_nologin/pam_nologin.c @@ -54,7 +54,7 @@ parse_args(pam_handle_t *pamh, int argc, const char **argv, struct opt_s *opts) for (i=0; iretval_when_nofile = PAM_SUCCESS; - } else if (!memcmp("file=", argv[i], 5)) { + } else if (!strncmp("file=", argv[i], 5)) { opts->nologin_file = argv[i] + 5; } else { pam_syslog(pamh, LOG_ERR, "unknown option: %s", argv[i]); -- 2.40.0