Update to 42.1

This commit is contained in:
David King 2022-05-23 15:26:36 +01:00
parent a1aff4e992
commit 2570ab951a
4 changed files with 101 additions and 6 deletions

2
.gitignore vendored
View File

@ -77,3 +77,5 @@ gnome-keyring-2.31.4.tar.bz2
/gnome-keyring-3.35.90.tar.xz
/gnome-keyring-3.36.0.tar.xz
/gnome-keyring-40.0.tar.xz
/gnome-keyring-42.0.tar.xz
/gnome-keyring-42.1.tar.xz

View File

@ -0,0 +1,78 @@
From f532e3de2bd77465c976abc913e3f0a5cd09a5d2 Mon Sep 17 00:00:00 2001
From: Matt Turner <mattst88@gmail.com>
Date: Sun, 22 May 2022 13:00:46 -0400
Subject: [PATCH] pkcs11: Don't use strncpy when copying paths
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Using strncpy produces the following warning, which indicates that the
destination string could be left unterminated.
CC daemon/control/gkd-control-server.lo
CCLD libgkd-control.la
CC pkcs11/rpc-layer/libgkm_rpc_layer_la-gkm-rpc-dispatch.lo
In file included from /usr/include/string.h:519,
from /usr/include/glib-2.0/glib/galloca.h:33,
from /usr/include/glib-2.0/glib.h:30,
from ./egg/egg-error.h:24,
from pkcs11/rpc-layer/gkm-rpc-dispatch.c:31:
In function strncpy,
inlined from gkm_rpc_layer_startup at pkcs11/rpc-layer/gkm-rpc-dispatch.c:2382:2:
/usr/include/bits/string_fortified.h:95:10: warning: __builtin_strncpy specified bound 108 equals destination size [-Wstringop-truncation]
95 | return __builtin___strncpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
96 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
---
pkcs11/rpc-layer/gkm-rpc-dispatch.c | 4 +++-
pkcs11/rpc-layer/gkm-rpc-module.c | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/pkcs11/rpc-layer/gkm-rpc-dispatch.c b/pkcs11/rpc-layer/gkm-rpc-dispatch.c
index 72d2ced1..dbedb355 100644
--- a/pkcs11/rpc-layer/gkm-rpc-dispatch.c
+++ b/pkcs11/rpc-layer/gkm-rpc-dispatch.c
@@ -31,6 +31,8 @@
#include "egg/egg-error.h"
#include "egg/egg-unix-credentials.h"
+#include <glib.h>
+
#include <sys/types.h>
#include <sys/param.h>
#include <sys/socket.h>
@@ -2379,7 +2381,7 @@ gkm_rpc_layer_startup (const char *prefix)
memset(&addr, 0, sizeof(addr));
addr.sun_family = AF_UNIX;
unlink (pkcs11_socket_path);
- strncpy (addr.sun_path, pkcs11_socket_path, sizeof (addr.sun_path));
+ g_strlcpy (addr.sun_path, pkcs11_socket_path, sizeof (addr.sun_path));
if (bind (sock, (struct sockaddr*)&addr, sizeof (addr)) < 0) {
gkm_rpc_warn ("couldn't bind to pkcs11 socket: %s: %s",
pkcs11_socket_path, strerror (errno));
diff --git a/pkcs11/rpc-layer/gkm-rpc-module.c b/pkcs11/rpc-layer/gkm-rpc-module.c
index 24457ce1..515b18a4 100644
--- a/pkcs11/rpc-layer/gkm-rpc-module.c
+++ b/pkcs11/rpc-layer/gkm-rpc-module.c
@@ -29,6 +29,8 @@
#include "egg/egg-unix-credentials.h"
+#include <glib.h>
+
#include <sys/types.h>
#include <sys/param.h>
#include <sys/socket.h>
@@ -233,7 +235,7 @@ call_connect (CallState *cs)
debug (("connecting to: %s", pkcs11_socket_path));
addr.sun_family = AF_UNIX;
- strncpy (addr.sun_path, pkcs11_socket_path, sizeof (addr.sun_path));
+ g_strlcpy (addr.sun_path, pkcs11_socket_path, sizeof (addr.sun_path));
sock = socket (AF_UNIX, SOCK_STREAM, 0);
if (sock < 0) {
--
GitLab

View File

@ -2,17 +2,20 @@
%global gcr_version 3.27.90
%global gcrypt_version 1.2.2
Name: gnome-keyring
Version: 40.0
Release: 4%{?dist}
Name: gnome-keyring
Version: 42.1
Release: 1%{?dist}
Summary: Framework for managing passwords and other secrets
License: GPLv2+ and LGPLv2+
URL: https://wiki.gnome.org/Projects/GnomeKeyring
Source0: https://download.gnome.org/sources/%{name}/40/%{name}-%{version}.tar.xz
Source0: https://download.gnome.org/sources/%{name}/42/%{name}-%{version}.tar.xz
# https://gitlab.gnome.org/GNOME/gnome-keyring/-/merge_requests/52
Patch0: gnome-keyring-42.0-fix-strncpy.patch
BuildRequires: pkgconfig(gcr-3) >= %{gcr_version}
BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version}
BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(p11-kit-1)
BuildRequires: docbook-dtds
BuildRequires: docbook-style-xsl
@ -21,11 +24,12 @@ BuildRequires: gettext
BuildRequires: intltool
BuildRequires: libgcrypt-devel >= %{gcrypt_version}
BuildRequires: libselinux-devel
BuildRequires: make
BuildRequires: pam-devel
BuildRequires: systemd-rpm-macros
BuildRequires: /usr/bin/ssh-add
BuildRequires: /usr/bin/ssh-agent
BuildRequires: /usr/bin/xsltproc
BuildRequires: make
Requires: /usr/bin/ssh-add
Requires: /usr/bin/ssh-agent
@ -57,6 +61,7 @@ automatically unlock the "login" keyring when the user logs in.
%configure \
--with-pam-dir=%{_libdir}/security \
--enable-pam \
--with-systemd \
--without-libcap-ng
# avoid unneeded direct dependencies
@ -74,6 +79,11 @@ rm $RPM_BUILD_ROOT%{_libdir}/gnome-keyring/devel/*.la
%find_lang gnome-keyring
%post
%systemd_user_post gnome-keyring-daemon.service
%preun
%systemd_user_preun gnome-keyring-daemon.service
%files -f gnome-keyring.lang
%doc AUTHORS NEWS README
@ -99,12 +109,17 @@ rm $RPM_BUILD_ROOT%{_libdir}/gnome-keyring/devel/*.la
%{_mandir}/man1/gnome-keyring.1*
%{_mandir}/man1/gnome-keyring-3.1*
%{_mandir}/man1/gnome-keyring-daemon.1*
%{_userunitdir}/gnome-keyring-daemon.service
%{_userunitdir}/gnome-keyring-daemon.socket
%files pam
%{_libdir}/security/*.so
%changelog
* Mon May 23 2022 David King <amigadave@amigadave.com> - 42.1-1
- Update to 42.1
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 40.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
- Update the path of the PKCS#11 module

View File

@ -1 +1 @@
SHA512 (gnome-keyring-40.0.tar.xz) = c9cb0dca8c46ee712200c96c20663a8d5cd39f07801a04e1afca26550a04af6cb369b53a1f29638bf4c8a29f418a69f565befcf4d08df5b0d30fb31894ecf95e
SHA512 (gnome-keyring-42.1.tar.xz) = 560dc409c21768dcbdf42151986a5bbbfb9a092d2c36295cf76bd603cdf9650fa80670631c7fb8b3e1822bed6a1f55c34b2170a1419ce45fbe8ca08c7eaf3a57