]> granicus.if.org Git - linux-pam/commitdiff
Relevant BUGIDs: none
authorDmitry V. Levin <ldv@altlinux.org>
Thu, 22 Sep 2005 22:16:02 +0000 (22:16 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 22 Sep 2005 22:16:02 +0000 (22:16 +0000)
Purpose of commit: bugfix

Commit summary:
---------------
2005-09-22  Dmitry V. Levin  <ldv@altlinux.org>

* modules/pam_nologin/pam_nologin.c (parse_args): Use strncmp()
instead of memcmp() for string comparison.

ChangeLog
modules/pam_nologin/pam_nologin.c

index c77c281ae4b04bf65e5c9b9f8d6813c72f01ee1c..e48c60c18dcfbedbcf811f276d22d6a2de8844b1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-09-22  Dmitry V. Levin  <ldv@altlinux.org>
+
+       * modules/pam_nologin/pam_nologin.c (parse_args): Use strncmp()
+       instead of memcmp() for string comparison.
+
 2005-09-21  Dmitry V. Levin  <ldv@altlinux.org>
 
        * modules/pam_nologin/pam_nologin.c: Include <syslog.h>.
index 39577595d7c24b794ba151ff04123b1739fae4fb..54ecc82b5eaa5447881de8a3af662839daba1a4b 100644 (file)
@@ -54,7 +54,7 @@ parse_args(pam_handle_t *pamh, int argc, const char **argv, struct opt_s *opts)
     for (i=0; i<argc; ++i) {
        if (!strcmp("successok", argv[i])) {
            opts->retval_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]);