From da2a84904dd17e4ed70a6497c0d18f69d004d453 Mon Sep 17 00:00:00 2001 From: Eugene Crosser Date: Thu, 5 Dec 2013 02:18:21 +0400 Subject: [PATCH 1/1] fix precedence error --- authfile.c | 2 +- pam_pcsc_cr.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/authfile.c b/authfile.c index 2d30ed8..923cb88 100644 --- a/authfile.c +++ b/authfile.c @@ -74,7 +74,7 @@ static int path_size(const char *tokenid, const char *userid) } else { usub = userid; } - return strlen(template) + p?strlen(usub):0 + q?strlen(tokenid):0 + 1; + return strlen(template)+(p?strlen(usub):0)+(q?strlen(tokenid):0)+1; } static void diff --git a/pam_pcsc_cr.c b/pam_pcsc_cr.c index 7dffd4d..a43bd35 100644 --- a/pam_pcsc_cr.c +++ b/pam_pcsc_cr.c @@ -88,6 +88,7 @@ void parse_cfg(struct _cfg * const cfg, int argc, const char *argv[]) int i; for (i = 0; i < argc; i++) { + if (cfg->verbose) syslog(LOG_DEBUG, "arg: \"%s\"", argv[i]); if (strchr(argv[i],':') && strchr(argv[i],'=')) pcsc_option(argv[i]); else if (!strcmp(argv[i], "verbose")) cfg->verbose = 1; -- 2.39.2