From f501babfcffea72a6a5604ff4644444b0ad6aa5a Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Mon, 16 Mar 2020 21:02:18 +0000 Subject: modules/pam_access: use pam_str_skip_prefix * modules/pam_access/pam_access.c: Include "pam_inline.h". (parse_args): Use pam_str_skip_prefix instead of ugly strncmp invocations. --- modules/pam_access/pam_access.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'modules/pam_access') diff --git a/modules/pam_access/pam_access.c b/modules/pam_access/pam_access.c index 9eab923a..680b5860 100644 --- a/modules/pam_access/pam_access.c +++ b/modules/pam_access/pam_access.c @@ -65,8 +65,8 @@ #include #include #include - #include "pam_cc_compat.h" +#include "pam_inline.h" /* login_access.c from logdaemon-5.6 with several changes by A.Nogin: */ @@ -125,25 +125,27 @@ parse_args(pam_handle_t *pamh, struct login_info *loginfo, loginfo->fs = ":"; loginfo->sep = ", \t"; for (i=0; iconfig_file = 11 + argv[i]; + loginfo->config_file = str; fclose(fp); } else { pam_syslog(pamh, LOG_ERR, - "failed to open accessfile=[%s]: %m", 11 + argv[i]); + "failed to open accessfile=[%s]: %m", str); return 0; } -- cgit v1.2.3