From f2c55edce31d0d9729b177104ffa37922dd29fa8b95a043e73fdbc6a82a57799 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 25 Sep 2008 21:43:45 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pam_pkcs11?expand=0&rev=6 --- pam_pkcs11-uninitialized.patch | 27 +++++++++++++++++++++++++++ pam_pkcs11.changes | 5 +++++ pam_pkcs11.spec | 17 ++++++++++++++--- 3 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 pam_pkcs11-uninitialized.patch diff --git a/pam_pkcs11-uninitialized.patch b/pam_pkcs11-uninitialized.patch new file mode 100644 index 0000000..abda8b7 --- /dev/null +++ b/pam_pkcs11-uninitialized.patch @@ -0,0 +1,27 @@ +pkcs11_lib.c:289: warning: 'i' is used uninitialized in this function +================================================================================ +--- src/common/pkcs11_lib.c ++++ src/common/pkcs11_lib.c +@@ -283,14 +283,15 @@ + return 0; + } + } +- } ++ } else { + /* we're configured for a specific module and token, see if it's present */ +- slot_num--; +- if (slot_num >= 0 && slot_num < module->slotCount && module->slots && +- module->slots[i] && PK11_IsPresent(module->slots[i])) { +- h->slot = PK11_ReferenceSlot(module->slots[i]); +- *slotID = PK11_GetSlotID(h->slot); +- return 0; ++ slot_num--; ++ if (slot_num >= 0 && slot_num < module->slotCount && module->slots && ++ module->slots[slot_num] && PK11_IsPresent(module->slots[slot_num])) { ++ h->slot = PK11_ReferenceSlot(module->slots[slot_num]); ++ *slotID = PK11_GetSlotID(h->slot); ++ return 0; ++ } + } + return -1; + } diff --git a/pam_pkcs11.changes b/pam_pkcs11.changes index 87ca733..42f35ac 100644 --- a/pam_pkcs11.changes +++ b/pam_pkcs11.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Sep 23 17:49:42 CEST 2008 - sbrabec@suse.cz + +- Fixed uninitialized variable (bnc#351207). + ------------------------------------------------------------------- Thu Apr 10 12:54:45 CEST 2008 - ro@suse.de diff --git a/pam_pkcs11.spec b/pam_pkcs11.spec index c3ed719..bba1e56 100644 --- a/pam_pkcs11.spec +++ b/pam_pkcs11.spec @@ -2,9 +2,16 @@ # spec file for package pam_pkcs11 (Version 0.6.0) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. -# This file and all modifications and additions to the pristine -# package are under the same license as the package itself. # +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + # Please submit bugfixes or comments via http://bugs.opensuse.org/ # @@ -13,7 +20,7 @@ Name: pam_pkcs11 Version: 0.6.0 -Release: 75 +Release: 138 Url: http://www.opensc-project.org/pam_pkcs11/ Group: Productivity/Security License: LGPL v2.1 or later @@ -27,6 +34,7 @@ Patch2: %{name}-0.6.0-ms-upn-oid.patch Patch3: %{name}-0.6.0-nss-autoconf.patch Patch4: %{name}-msnickname.patch Patch5: %{name}-implicit-declaration.patch +Patch6: %{name}-uninitialized.patch BuildRequires: curl-devel libopenssl-devel libxslt mozilla-nss-devel openldap2-devel openssl-devel pam-devel pcsc-lite-devel pkg-config BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -69,6 +77,7 @@ Authors: %patch3 -p1 %patch4 -p1 %patch5 +%patch6 cp -a %{S:1} common-auth-smartcard cp -a %{S:2} src/common/ @@ -119,6 +128,8 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace) %{_sysconfdir}/pam.d/common-auth-smartcard %changelog +* Tue Sep 23 2008 sbrabec@suse.cz +- Fixed uninitialized variable (bnc#351207). * Thu Apr 10 2008 ro@suse.de - added baselibs.conf file to build xxbit packages for multilib support