Update to version 1.1.4

This commit is contained in:
Andreas Schneider 2021-10-28 13:41:17 +02:00
parent 0dc485821a
commit 06a041573d
4 changed files with 9 additions and 46 deletions

2
.gitignore vendored
View File

@ -9,3 +9,5 @@ x86_64/
/pam_wrapper-1.1.2.tar.gz.asc
/pam_wrapper-1.1.3.tar.gz
/pam_wrapper-1.1.3.tar.gz.asc
/pam_wrapper-1.1.4.tar.gz
/pam_wrapper-1.1.4.tar.gz.asc

View File

@ -1,41 +0,0 @@
From 3508ad2704103e863fca8c45ecda25021850befc Mon Sep 17 00:00:00 2001
From: Jakub Jelen <jjelen@redhat.com>
Date: Thu, 24 Jun 2021 10:24:31 +0200
Subject: [PATCH] Accept whole range of supported pids
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
---
src/pam_wrapper.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/pam_wrapper.c b/src/pam_wrapper.c
index 6801d7b..efa7cbb 100644
--- a/src/pam_wrapper.c
+++ b/src/pam_wrapper.c
@@ -791,14 +791,20 @@ static void pwrap_clean_stale_dirs(const char *dir)
buf[sizeof(buf) - 1] = '\0';
tmp = strtol(buf, NULL, 10);
- if (tmp == 0 || tmp > 0xFFFF || errno == ERANGE) {
+ if (tmp == 0 || errno == ERANGE) {
PWRAP_LOG(PWRAP_LOG_ERROR,
"Failed to parse pid, buf=%s",
buf);
return;
}
- pid = (pid_t)(tmp & 0xFFFF);
+ pid = (pid_t)tmp;
+ /* Check if we are out of pid_t range on this system */
+ if ((long)pid != tmp) {
+ PWRAP_LOG(PWRAP_LOG_ERROR,
+ "pid out of range: %ld", tmp);
+ return;
+ }
rc = kill(pid, 0);
if (rc == -1) {
--
GitLab

View File

@ -1,6 +1,6 @@
Name: pam_wrapper
Version: 1.1.3
Release: 9%{?dist}
Version: 1.1.4
Release: 1%{?dist}
Summary: A tool to test PAM applications and PAM modules
License: GPLv3+
@ -9,7 +9,6 @@ Url: http://cwrap.org/
Source0: https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz
Source1: https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz.asc
Source2: pam_wrapper.keyring
Patch1: pam_wrapper-1.1.3-pid.patch
BuildRequires: gcc
BuildRequires: gnupg2
@ -139,6 +138,9 @@ gpgv2 --quiet --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0}
%{python3_sitearch}/pypamtest.so
%changelog
* Thu Oct 28 2021 Andreas Schneider <asn@redhat.com> - 1.1.4-1
- Update to version 1.1.4
* Wed Sep 15 2021 Jakub Jelen <jjelen@redhat.com> - 1.1.3-9
- Fix PID range as reported in #1881377

View File

@ -1,2 +1,2 @@
SHA512 (pam_wrapper-1.1.3.tar.gz) = 3b7cbd25ae7dd73f4a0c64a7762cdeb38cc7ba6e8b4e18e79aceffea09241d520aa884de88e4105b5957b2b18ec682be6568a6bfccf82b9354a3510cd2cd98eb
SHA512 (pam_wrapper-1.1.3.tar.gz.asc) = e2091dc04f9ca341002abf6ee2ade9e44eb7dc34631c6698c4f69688b9eba91b539c859a9438afb5fb39ef8e60f3660e3079a87416443c4a2d76f387893c7d6a
SHA512 (pam_wrapper-1.1.4.tar.gz) = 3b68dc6d7815707d74d1340facd9c2de4dff3934402ac2c2632371b39c41a75744434744ed7308e157be03a03a941405638cadb6f34995de56fb1f5f45d37de2
SHA512 (pam_wrapper-1.1.4.tar.gz.asc) = 2b4e921dbf5fd404ed03b91a2d314632ff337827becb1dbdd3a9dcde68b9ac6d3af166f68d85eccf3a39b3956beba487f2786fb55179fd7174b2dfd44dff45c0