commit 87954abe9829ea6baca9bed2f522909813636b63 Author: MSVSphere Packaging Team Date: Tue Nov 26 18:57:53 2024 +0300 import python-pam-2.0.2-9.el10 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d035f7f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/python-pam-2.0.2.tar.gz diff --git a/.python-pam.metadata b/.python-pam.metadata new file mode 100644 index 0000000..5565315 --- /dev/null +++ b/.python-pam.metadata @@ -0,0 +1 @@ +30636a739e820addef564fed8503a9038b2c744c SOURCES/python-pam-2.0.2.tar.gz diff --git a/SOURCES/0001-internals-Root-conversation-and-closure-data.patch b/SOURCES/0001-internals-Root-conversation-and-closure-data.patch new file mode 100644 index 0000000..c7328de --- /dev/null +++ b/SOURCES/0001-internals-Root-conversation-and-closure-data.patch @@ -0,0 +1,36 @@ +commit 89ff31db581df98eb34f19471421f5cfcfb1cefd (HEAD -> master) +Author: Ray Strode +Date: Fri Sep 27 15:31:03 2024 -0400 + + internals: Root conversation and closure data + + If the conversation and closure data are not rooted to the class + then they can be garbage collected before the conversation function + is invoked. + + That leads to a crash in pam_lastlog during session open time. + + This commit addressed the issue by assigning the state to the class + as properties. + +diff --git a/src/pam/__internals.py b/src/pam/__internals.py +index 99a0397..9e33188 100644 +--- a/src/pam/__internals.py ++++ b/src/pam/__internals.py +@@ -311,11 +311,11 @@ class PamAuthenticator: + + # do this up front so we can safely throw an exception if there's + # anything wrong with it +- app_data = {'msgs': self.messages, 'password': password, 'encoding': encoding} +- conv = PamConv(__conv, c_void_p.from_buffer(py_object(app_data))) ++ self.app_data = {'msgs': self.messages, 'password': password, 'encoding': encoding} ++ self.conv = PamConv(__conv, c_void_p.from_buffer(py_object(self.app_data))) + + self.handle = PamHandle() +- retval = self.pam_start(service, username, byref(conv), ++ retval = self.pam_start(service, username, byref(self.conv), + byref(self.handle)) + + if retval != PAM_SUCCESS: # pragma: no cover + + diff --git a/SPECS/python-pam.spec b/SPECS/python-pam.spec new file mode 100644 index 0000000..3e7b562 --- /dev/null +++ b/SPECS/python-pam.spec @@ -0,0 +1,171 @@ +Name: python-pam +Version: 2.0.2 +Release: 9%{?dist} +Summary: Pure Python interface to the Pluggable Authentication Modules system on Linux +License: MIT +URL: https://github.com/FirefighterBlu3/python-pam +Source0: https://pypi.python.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz +BuildArch: noarch +BuildRequires: python3-devel + +Patch: 0001-internals-Root-conversation-and-closure-data.patch + +%generate_buildrequires +%pyproject_buildrequires + +%description +This module provides an authenticate function that allows the caller to +authenticate a given username / password against the PAM system on Linux. + +%package -n python3-pam +Summary: Pure Python interface to the Pluggable Authentication Modules system on Linux +%{?python_provide:%python_provide python3-pam} + +%description -n python3-pam +This module provides an authenticate function that allows the caller to +authenticate a given username / password against the PAM system on Linux. + +%prep +%autosetup -p1 + +%build +%pyproject_wheel + +%install +%pyproject_install + +%files -n python3-pam +%doc README.md +%license LICENSE +%{python3_sitelib}/pam +%{python3_sitelib}/python_pam-%{version}* + +%changelog +* Fri Sep 27 2024 Ray Strode - 2.0.2-9 +- Fix crash with pam_lastlog + Resolves: RHEL-53984 + +* Mon Jun 24 2024 Troy Dawson - 2.0.2-8 +- Bump release for June 2024 mass rebuild + +* Mon Jan 22 2024 Fedora Release Engineering - 2.0.2-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jul 21 2023 Fedora Release Engineering - 2.0.2-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Tue Jun 13 2023 Python Maint - 2.0.2-5 +- Rebuilt for Python 3.12 + +* Fri Jan 20 2023 Fedora Release Engineering - 2.0.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Jul 22 2022 Fedora Release Engineering - 2.0.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jun 13 2022 Python Maint - 2.0.2-2 +- Rebuilt for Python 3.11 + +* Wed May 25 2022 Aurelien Bompard - 2.0.2-1 +- Version 2.0.2 + +* Mon Mar 14 2022 Juan Orti Alcaine - 2.0.0-1 +- Version 2.0.0 (#2063598) + +* Fri Jan 21 2022 Fedora Release Engineering - 1.8.4-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 1.8.4-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri Jun 04 2021 Python Maint - 1.8.4-11 +- Rebuilt for Python 3.10 + +* Wed Jan 27 2021 Fedora Release Engineering - 1.8.4-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 1.8.4-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue May 26 2020 Miro Hrončok - 1.8.4-8 +- Rebuilt for Python 3.9 + +* Thu Jan 30 2020 Fedora Release Engineering - 1.8.4-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Oct 24 2019 Juan Orti Alcaine - 1.8.4-6 +- Drop python2 support + +* Thu Oct 03 2019 Miro Hrončok - 1.8.4-5 +- Rebuilt for Python 3.8.0rc1 (#1748018) + +* Mon Aug 19 2019 Miro Hrončok - 1.8.4-4 +- Rebuilt for Python 3.8 + +* Fri Jul 26 2019 Fedora Release Engineering - 1.8.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sat Feb 02 2019 Fedora Release Engineering - 1.8.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Thu Oct 11 2018 Juan Orti Alcaine - 1.8.4-1 +- Version 1.8.4 + +* Sat Jul 14 2018 Fedora Release Engineering - 1.8.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Tue Jun 19 2018 Miro Hrončok - 1.8.3-2 +- Rebuilt for Python 3.7 + +* Wed May 16 2018 Juan Orti Alcaine - 1.8.3-1 +- Version 1.8.3 + +* Fri Feb 09 2018 Fedora Release Engineering - 1.8.2-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 1.8.2-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Jul 01 2017 Juan Orti Alcaine - 1.8.2-9 +- Python3 changes + +* Sat Feb 11 2017 Fedora Release Engineering - 1.8.2-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Mon Dec 19 2016 Miro Hrončok - 1.8.2-7 +- Rebuild for Python 3.6 + +* Tue Jul 19 2016 Fedora Release Engineering - 1.8.2-6 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Thu Feb 04 2016 Fedora Release Engineering - 1.8.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Mon Nov 16 2015 Juan Orti Alcaine - 1.8.2-4 +- Use python_provide macro + +* Tue Nov 10 2015 Fedora Release Engineering - 1.8.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 + +* Thu Jun 18 2015 Fedora Release Engineering - 1.8.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Fri May 22 2015 Juan Orti Alcaine - 1.8.2-1 +- Switch to fork from David Ford, previous source was unmaintained since 2009 +- Update to 1.8.2 +- Add python3 subpackage + +* Tue Aug 12 2014 Juan Orti Alcaine - 0.1.4-2 +- Add support for EPEL6. + +* Wed Jun 11 2014 Fedora Release Engineering - 0.1.4-1 +- Bug #1104258 update to 0.1.4 + +* Sat Jun 07 2014 Fedora Release Engineering - 0.1.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sun Aug 04 2013 Fedora Release Engineering - 0.1.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Tue Jul 09 2013 Juan Orti Alcaine - 0.1.3-1 +- Initial packaging