SHA256
1
0
forked from pool/pam_pkcs11

Compare commits

...

2 Commits

Author SHA256 Message Date
Ana Guerrero
664c334d15 Accepting request 1203262 from security:chipcard
OBS-URL: https://build.opensuse.org/request/show/1203262
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pam_pkcs11?expand=0&rev=39
2024-09-25 19:54:05 +00:00
1a982da447 - Fix boo#1230870: Add patch 0001-memory-leak-fixes.patch
- Add -Wno-implicit-function-declaration to CFLAGS to fix build with gcc14 and newer

If you have any suggestions for improvement, please let me know!

OBS-URL: https://build.opensuse.org/package/show/security:chipcard/pam_pkcs11?expand=0&rev=39
2024-09-25 06:30:15 +00:00
3 changed files with 41 additions and 1 deletions

View File

@ -0,0 +1,29 @@
--- a/src/mappers/mapper.c
+++ b/src/mappers/mapper.c
@@ -83,7 +83,12 @@
/* get a line from buffer */
from = mfile->pt;
/* set up pointer */
- while( *from && isspace(*from) ) from++;
+ while( *from && isspace(*from)){
+ if(from - mfile->buffer + 1 >= mfile->length){
+ return 0;
+ }
+ from++;
+ }
to = strchr(from,'\n');
/* if no newline, assume string ends at end of buffer */
if (!to) to=mfile->buffer+mfile->length;
--- a/src/pam_pkcs11/pam_pkcs11.c
+++ b/src/pam_pkcs11/pam_pkcs11.c
@@ -208,7 +208,7 @@
{
int i, rv;
const char *user = NULL;
- char *password;
+ char *password = NULL;
unsigned int slot_num = 0;
int is_a_screen_saver = 0;
struct configuration_st *configuration;

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Tue Sep 24 21:07:33 UTC 2024 - Simon Vogl <simon.vogl@gmx.net>
- Fix for boo#1230870:
* Add patch 0001-memory-leak-fixes.patch
- Add -Wno-implicit-function-declaration to CFLAGS to fix build
with gcc14 and newer
------------------------------------------------------------------- -------------------------------------------------------------------
Tue May 7 15:19:11 UTC 2024 - Davide Benini <davide.benini@suse.com> Tue May 7 15:19:11 UTC 2024 - Davide Benini <davide.benini@suse.com>

View File

@ -1,7 +1,7 @@
# #
# spec file for package pam_pkcs11 # spec file for package pam_pkcs11
# #
# Copyright (c) 2023 SUSE LLC # Copyright (c) 2024 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -35,6 +35,8 @@ Patch0: %{name}-fsf-address.patch
Patch1: %{name}-0.5.3-nss-conf.patch Patch1: %{name}-0.5.3-nss-conf.patch
Patch3: %{name}-0.6.0-nss-autoconf.patch Patch3: %{name}-0.6.0-nss-autoconf.patch
Patch4: 0001-Set-slot_num-configuration-parameter-to-0-by-default.patch Patch4: 0001-Set-slot_num-configuration-parameter-to-0-by-default.patch
# 0001-memory-leak-fixes.patch - Fix memory leaks and issues with kscreenlocker (boo#1230870) - adapted from https://github.com/OpenSC/pam_pkcs11/commit/f8e7d85aa3ca4fd2e2a8c2dfe601d1224debe372.patch
Patch6: 0001-memory-leak-fixes.patch
BuildRequires: curl-devel BuildRequires: curl-devel
BuildRequires: docbook-xsl-stylesheets BuildRequires: docbook-xsl-stylesheets
BuildRequires: doxygen BuildRequires: doxygen
@ -97,6 +99,7 @@ sed -i '/^HTML_TIMESTAMP/s/YES/NO/' doc/doxygen.conf.in
%build %build
./bootstrap ./bootstrap
%configure\ %configure\
CFLAGS="${CFLAGS:-%optflags} -Wno-implicit-function-declaration"\
--docdir=%{_docdir}/%{name}\ --docdir=%{_docdir}/%{name}\
--with-nss\ --with-nss\
--with-curl --with-curl