From 677002b327adc0f6260000a5ec94c941aa41f2150c633c3623dadf9a012b24cb Mon Sep 17 00:00:00 2001 From: Thorsten Kukuk Date: Thu, 24 Feb 2011 12:18:28 +0000 Subject: [PATCH] Accepting request 62683 from home:vitezslav_cizek:branches:Linux-PAM reviewed ok. OBS-URL: https://build.opensuse.org/request/show/62683 OBS-URL: https://build.opensuse.org/package/show/Linux-PAM/pam?expand=0&rev=75 --- pam.changes | 17 +++++++++++++++++ pam.spec | 9 ++++++--- pam_listfile-quiet.patch | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 pam_listfile-quiet.patch diff --git a/pam.changes b/pam.changes index 7c25c8c..6bdf36c 100644 --- a/pam.changes +++ b/pam.changes @@ -1,3 +1,20 @@ +------------------------------------------------------------------- +Wed Feb 23 12:45:03 UTC 2011 - vcizek@novell.com + +- bnc#673826 rework + * manpage is left intact, as it was + * correct parsing of "quiet" option + +------------------------------------------------------------------- + +Wed Feb 23 10:00:22 UTC 2011 - vcizek@novell.com + +- fix for bnc#673826 (pam_listfile) + * removed unnecessary logging when listfile is missing and quiet +option is specified + * manpage is also updated, to reflect that all option +require values + ------------------------------------------------------------------- Thu Oct 28 16:23:49 CEST 2010 - kukuk@suse.de diff --git a/pam.spec b/pam.spec index d2978e1..32fc774 100644 --- a/pam.spec +++ b/pam.spec @@ -1,5 +1,5 @@ # -# spec file for package pam (Version 1.1.2) +# spec file for package pam (Version 1.1.3) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -50,7 +50,9 @@ Source6: common-password.pamd Source7: common-session.pamd Source8: etc.environment Source9: baselibs.conf -Patch: pam_tally-deprecated.diff +Patch0: pam_tally-deprecated.diff +# fix for bnc#673826 (pam_listfile logging) +Patch1: pam_listfile-quiet.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -99,7 +101,8 @@ building both PAM-aware applications and modules for use with PAM. %prep %setup -q -n Linux-PAM-%{version} -b 1 -%patch -p0 +%patch0 -p0 +%patch1 -p1 %build CFLAGS="$RPM_OPT_FLAGS -DNDEBUG" \ diff --git a/pam_listfile-quiet.patch b/pam_listfile-quiet.patch new file mode 100644 index 0000000..edd1391 --- /dev/null +++ b/pam_listfile-quiet.patch @@ -0,0 +1,38 @@ +diff -u -r Linux-PAM-1.1.3.orig/modules/pam_listfile/pam_listfile.c Linux-PAM-1.1.3/modules/pam_listfile/pam_listfile.c +--- Linux-PAM-1.1.3.orig/modules/pam_listfile/pam_listfile.c 2009-12-08 15:41:41.000000000 +0100 ++++ Linux-PAM-1.1.3/modules/pam_listfile/pam_listfile.c 2011-02-23 13:27:04.356265509 +0100 +@@ -78,8 +78,14 @@ + { + const char *junk; + ++ /* option quiet has no value */ ++ if(!strcmp(argv[i],"quiet")) { ++ quiet = 1; ++ continue; ++ } ++ + memset(mybuf,'\0',sizeof(mybuf)); +- memset(myval,'\0',sizeof(mybuf)); ++ memset(myval,'\0',sizeof(myval)); + junk = strchr(argv[i], '='); + if((junk == NULL) || (junk - argv[i]) >= (int) sizeof(mybuf)) { + pam_syslog(pamh,LOG_ERR, "Bad option: \"%s\"", +@@ -142,8 +148,6 @@ + apply_type=APPLY_TYPE_USER; + strncpy(apply_val,myval,sizeof(apply_val)-1); + } +- } else if (!strcmp(mybuf,"quiet")) { +- quiet = 1; + } else { + free(ifname); + pam_syslog(pamh,LOG_ERR, "Unknown option: %s",mybuf); +@@ -283,7 +287,8 @@ + ifname, citem, citemp, sense); + #endif + if(lstat(ifname,&fileinfo)) { +- pam_syslog(pamh,LOG_ERR, "Couldn't open %s",ifname); ++ if(!quiet) ++ pam_syslog(pamh,LOG_ERR, "Couldn't open %s",ifname); + free(ifname); + return onerr; + }