2006-12-19 00:17:21 +01:00
|
|
|
#
|
2011-02-24 15:19:29 +01:00
|
|
|
# spec file for package pam
|
2006-12-19 00:17:21 +01:00
|
|
|
#
|
2020-02-27 15:49:37 +01:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2006-12-19 00:17:21 +01:00
|
|
|
#
|
2008-08-21 18:47:18 +02:00
|
|
|
# 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.
|
|
|
|
|
2019-05-06 09:09:44 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2006-12-19 00:17:21 +01:00
|
|
|
#
|
|
|
|
|
2023-03-15 10:05:09 +01:00
|
|
|
%if 0%{?sle_version} >= 150400 || 0%{?suse_version} >= 1550
|
|
|
|
# Enable livepatching support for SLE15-SP4 onwards. It requires
|
|
|
|
# compiler support introduced there.
|
|
|
|
%define livepatchable 1
|
|
|
|
|
|
|
|
# Set variables for livepatching.
|
|
|
|
%define _other %{_topdir}/OTHER
|
|
|
|
%define tar_basename pam-livepatch-%{version}-%{release}
|
|
|
|
%define tar_package_name %{tar_basename}.%{_arch}.tar.xz
|
|
|
|
%define clones_dest_dir %{tar_basename}/%{_arch}
|
|
|
|
%else
|
|
|
|
# Unsupported operating system.
|
|
|
|
%define livepatchable 0
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%ifnarch x86_64
|
|
|
|
# Unsupported architectures must have livepatch disabled.
|
|
|
|
%define livepatchable 0
|
|
|
|
%endif
|
|
|
|
|
2023-04-11 10:24:03 +02:00
|
|
|
%bcond_without selinux
|
2021-07-09 14:12:20 +02:00
|
|
|
%bcond_with debug
|
2020-12-03 14:58:29 +01:00
|
|
|
|
2021-11-24 14:43:37 +01:00
|
|
|
%define flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
|
2023-01-25 11:56:16 +01:00
|
|
|
%define config_files pam.d/other pam.d/common-account pam.d/common-auth pam.d/common-password pam.d/common-session \\\
|
|
|
|
security/faillock.conf security/group.conf security/limits.conf security/pam_env.conf security/access.conf \\\
|
|
|
|
security/namespace.conf security/namespace.init security/sepermit.conf
|
|
|
|
|
2021-11-24 14:43:37 +01:00
|
|
|
%if "%{flavor}" == "full"
|
|
|
|
%define build_main 0
|
|
|
|
%define build_doc 1
|
2023-04-11 10:24:03 +02:00
|
|
|
%define build_extra 1
|
|
|
|
%define build_userdb 1
|
2021-11-24 14:43:37 +01:00
|
|
|
%define name_suffix -%{flavor}-src
|
|
|
|
%else
|
|
|
|
%define build_main 1
|
|
|
|
%define build_doc 0
|
2023-04-11 10:24:03 +02:00
|
|
|
%define build_extra 0
|
|
|
|
%define build_userdb 0
|
2021-11-24 14:43:37 +01:00
|
|
|
%define name_suffix %{nil}
|
|
|
|
%endif
|
|
|
|
|
2012-05-10 05:15:08 +02:00
|
|
|
#
|
2020-05-12 11:30:59 +02:00
|
|
|
%define libpam_so_version 0.85.1
|
2015-04-27 17:17:47 +02:00
|
|
|
%define libpam_misc_so_version 0.82.1
|
2009-05-06 18:50:00 +02:00
|
|
|
%define libpamc_so_version 0.82.1
|
2020-05-27 11:48:06 +02:00
|
|
|
%if ! %{defined _distconfdir}
|
|
|
|
%define _distconfdir %{_sysconfdir}
|
|
|
|
%define config_noreplace 1
|
|
|
|
%endif
|
2021-07-09 14:12:20 +02:00
|
|
|
#
|
|
|
|
%{load:%{_sourcedir}/macros.pam}
|
|
|
|
#
|
2021-11-24 14:43:37 +01:00
|
|
|
Name: pam%{name_suffix}
|
2013-09-12 10:06:49 +02:00
|
|
|
#
|
2024-04-10 09:30:15 +02:00
|
|
|
Version: 1.6.1
|
2012-03-19 13:00:58 +01:00
|
|
|
Release: 0
|
2007-10-11 22:08:44 +02:00
|
|
|
Summary: A Security Tool that Provides Authentication for Applications
|
2018-07-13 17:28:53 +02:00
|
|
|
License: GPL-2.0-or-later OR BSD-3-Clause
|
2012-03-19 13:00:58 +01:00
|
|
|
Group: System/Libraries
|
2023-04-11 10:24:03 +02:00
|
|
|
URL: https://github.com/linux-pam/linux-pam
|
2020-05-12 11:30:59 +02:00
|
|
|
Source: Linux-PAM-%{version}.tar.xz
|
Accepting request 1085746 from home:kukuk:cleanup
- Update to final 1.5.3 release:
- configure: added --enable-logind option to use logind instead of utmp
in pam_issue and pam_timestamp.
- pam_modutil_getlogin: changed to use getlogin() from libc instead of
parsing utmp.
- Added libeconf support to pam_env and pam_shells.
- Added vendor directory support to pam_access, pam_env, pam_group,
pam_faillock, pam_limits, pam_namespace, pam_pwhistory, pam_sepermit,
pam_shells, and pam_time.
- pam_limits: changed to not fail on missing config files.
- pam_pwhistory: added conf= option to specify config file location.
- pam_pwhistory: added file= option to specify password history file
location.
- pam_shells: added shells.d support when libeconf and vendordir are enabled.
- Deprecated pam_lastlog: this module is no longer built by default because
it uses utmp, wtmp, btmp and lastlog, but none of them are Y2038 safe,
even on 64bit architectures.
pam_lastlog will be removed in one of the next releases, consider using
pam_lastlog2 (from https://github.com/thkukuk/lastlog2) and/or
pam_wtmpdb (from https://github.com/thkukuk/wtmpdb) instead.
- Deprecated _pam_overwrite(), _pam_overwrite_n(), and _pam_drop_reply()
macros provided by _pam_macros.h; the memory override performed by these
macros can be optimized out by the compiler and therefore can no longer
be relied upon.
OBS-URL: https://build.opensuse.org/request/show/1085746
OBS-URL: https://build.opensuse.org/package/show/Linux-PAM/pam?expand=0&rev=277
2023-05-09 18:04:51 +02:00
|
|
|
Source1: Linux-PAM-%{version}.tar.xz.asc
|
2021-07-09 14:12:20 +02:00
|
|
|
Source2: macros.pam
|
2006-12-19 00:17:21 +01:00
|
|
|
Source3: other.pamd
|
|
|
|
Source4: common-auth.pamd
|
|
|
|
Source5: common-account.pamd
|
|
|
|
Source6: common-password.pamd
|
|
|
|
Source7: common-session.pamd
|
2009-12-18 12:34:28 +01:00
|
|
|
Source9: baselibs.conf
|
2016-05-02 10:45:43 +02:00
|
|
|
Source10: unix2_chkpwd.c
|
|
|
|
Source11: unix2_chkpwd.8
|
2019-05-06 09:09:44 +02:00
|
|
|
Source12: pam-login_defs-check.sh
|
2021-09-15 15:55:27 +02:00
|
|
|
Source13: pam.tmpfiles
|
2023-03-20 11:36:11 +01:00
|
|
|
Source20: common-session-nonlogin.pamd
|
|
|
|
Source21: postlogin-auth.pamd
|
|
|
|
Source22: postlogin-account.pamd
|
|
|
|
Source23: postlogin-password.pamd
|
|
|
|
Source24: postlogin-session.pamd
|
2021-11-24 14:43:37 +01:00
|
|
|
Patch1: pam-limit-nproc.patch
|
2019-08-21 13:20:26 +02:00
|
|
|
BuildRequires: audit-devel
|
|
|
|
BuildRequires: bison
|
|
|
|
BuildRequires: flex
|
2015-01-09 15:23:58 +01:00
|
|
|
BuildRequires: libtool
|
2020-05-27 11:48:06 +02:00
|
|
|
BuildRequires: xz
|
|
|
|
Requires(post): permissions
|
2019-08-21 13:20:26 +02:00
|
|
|
# All login.defs variables require support from shadow side.
|
|
|
|
# Upgrade this symbol version only if new variables appear!
|
|
|
|
# Verify by shadow-login_defs-check.sh from shadow source package.
|
2021-11-18 15:13:26 +01:00
|
|
|
Recommends: login_defs-support-for-pam >= 1.5.2
|
2019-09-25 12:16:25 +02:00
|
|
|
BuildRequires: pkgconfig(libeconf)
|
2023-04-11 10:24:03 +02:00
|
|
|
%if %{with selinux}
|
2019-08-21 13:20:26 +02:00
|
|
|
BuildRequires: libselinux-devel
|
|
|
|
%endif
|
2022-12-16 10:50:49 +01:00
|
|
|
Obsoletes: pam_unix
|
|
|
|
Obsoletes: pam_unix-nis
|
2021-11-24 15:34:36 +01:00
|
|
|
Recommends: pam-manpages
|
2019-08-21 13:20:26 +02:00
|
|
|
Requires(pre): group(shadow)
|
|
|
|
Requires(pre): user(root)
|
2006-12-19 00:17:21 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
PAM (Pluggable Authentication Modules) is a system security tool that
|
|
|
|
allows system administrators to set authentication policies without
|
|
|
|
having to recompile programs that do authentication.
|
|
|
|
|
2023-04-11 10:24:03 +02:00
|
|
|
%if %{build_userdb}
|
|
|
|
%package -n pam-userdb
|
2020-03-21 16:44:00 +01:00
|
|
|
Summary: PAM module to authenticate against a separate database
|
2020-05-27 11:48:06 +02:00
|
|
|
Group: System/Libraries
|
2023-04-12 13:48:48 +02:00
|
|
|
Provides: pam-extra:%{_pam_moduledir}/pam_userdb.so
|
2020-03-21 16:44:00 +01:00
|
|
|
BuildRequires: libdb-4_8-devel
|
|
|
|
BuildRequires: pam-devel
|
|
|
|
|
2023-04-11 10:24:03 +02:00
|
|
|
%description -n pam-userdb
|
2020-03-21 16:44:00 +01:00
|
|
|
PAM (Pluggable Authentication Modules) is a system security tool that
|
|
|
|
allows system administrators to set authentication policies without
|
|
|
|
having to recompile programs that do authentication.
|
|
|
|
|
2023-04-11 10:24:03 +02:00
|
|
|
This package contains pam_userdb which is used to verify a
|
|
|
|
username/password pair against values stored in a Berkeley DB database.
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%if %{build_extra}
|
|
|
|
%package -n pam-extra
|
|
|
|
Summary: PAM module with extended dependencies
|
|
|
|
Group: System/Libraries
|
2024-01-19 12:24:46 +01:00
|
|
|
#BuildRequires: pkgconfig(systemd)
|
2024-01-18 18:01:37 +01:00
|
|
|
# The systemd-mini package does not pass configure checks
|
|
|
|
BuildRequires: systemd-devel >= 254
|
2023-04-11 10:24:03 +02:00
|
|
|
BuildRequires: pam-devel
|
2023-04-20 12:12:45 +02:00
|
|
|
Provides: pam:%{_sbindir}/pam_timestamp_check
|
2023-04-11 10:24:03 +02:00
|
|
|
|
|
|
|
%description -n pam-extra
|
|
|
|
PAM (Pluggable Authentication Modules) is a system security tool that
|
|
|
|
allows system administrators to set authentication policies without
|
|
|
|
having to recompile programs that do authentication.
|
|
|
|
|
|
|
|
This package contains extra modules eg pam_issue and pam_timestamp which
|
|
|
|
can have extended dependencies.
|
|
|
|
%endif
|
2020-03-21 16:44:00 +01:00
|
|
|
|
2021-11-29 10:46:08 +01:00
|
|
|
%if %{build_doc}
|
|
|
|
|
2021-11-24 14:43:37 +01:00
|
|
|
%package -n pam-doc
|
2007-07-10 13:34:21 +02:00
|
|
|
Summary: Documentation for Pluggable Authentication Modules
|
2007-04-19 22:09:31 +02:00
|
|
|
Group: Documentation/HTML
|
2012-03-19 13:00:58 +01:00
|
|
|
BuildArch: noarch
|
2007-04-19 22:09:31 +02:00
|
|
|
|
2021-11-24 14:43:37 +01:00
|
|
|
%description -n pam-doc
|
2007-04-19 22:09:31 +02:00
|
|
|
PAM (Pluggable Authentication Modules) is a system security tool that
|
|
|
|
allows system administrators to set authentication policies without
|
|
|
|
having to recompile programs that do authentication.
|
|
|
|
|
|
|
|
This package contains the documentation.
|
|
|
|
|
2021-11-24 14:43:37 +01:00
|
|
|
%package -n pam-manpages
|
|
|
|
Summary: Manualpages for Pluggable Authentication Modules
|
|
|
|
Group: Documentation/HTML
|
2021-11-24 15:34:36 +01:00
|
|
|
Provides: pam:/%{_mandir}/man8/PAM.8.gz
|
2021-11-24 14:43:37 +01:00
|
|
|
BuildArch: noarch
|
2022-12-08 15:52:25 +01:00
|
|
|
BuildRequires: docbook5-xsl-stylesheets
|
2021-11-24 14:43:37 +01:00
|
|
|
BuildRequires: elinks
|
|
|
|
BuildRequires: xmlgraphics-fop
|
|
|
|
|
|
|
|
%description -n pam-manpages
|
|
|
|
PAM (Pluggable Authentication Modules) is a system security tool that
|
|
|
|
allows system administrators to set authentication policies without
|
|
|
|
having to recompile programs that do authentication.
|
|
|
|
|
|
|
|
This package contains the manual pages.
|
|
|
|
|
2021-11-29 10:46:08 +01:00
|
|
|
%endif
|
|
|
|
|
2006-12-19 00:17:21 +01:00
|
|
|
%package devel
|
2019-08-23 14:39:21 +02:00
|
|
|
Summary: Include Files and Libraries for PAM Development
|
2006-12-19 00:17:21 +01:00
|
|
|
Group: Development/Libraries/C and C++
|
2012-05-10 05:15:08 +02:00
|
|
|
Requires: glibc-devel
|
|
|
|
Requires: pam = %{version}
|
2006-12-19 00:17:21 +01:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
PAM (Pluggable Authentication Modules) is a system security tool which
|
|
|
|
allows system administrators to set authentication policy without
|
|
|
|
having to recompile programs which do authentication.
|
|
|
|
|
|
|
|
This package contains header files and static libraries used for
|
|
|
|
building both PAM-aware applications and modules for use with PAM.
|
|
|
|
|
|
|
|
%prep
|
2024-02-23 09:28:16 +01:00
|
|
|
%autosetup -p1 -n Linux-PAM-%{version}
|
2019-08-21 13:20:26 +02:00
|
|
|
cp -a %{SOURCE12} .
|
2006-12-19 00:17:21 +01:00
|
|
|
|
|
|
|
%build
|
2021-09-10 12:28:05 +02:00
|
|
|
bash ./pam-login_defs-check.sh
|
2021-07-09 14:12:20 +02:00
|
|
|
export CFLAGS="%{optflags}"
|
|
|
|
%if !%{with debug}
|
|
|
|
CFLAGS="$CFLAGS -DNDEBUG"
|
|
|
|
%endif
|
2023-03-15 10:05:09 +01:00
|
|
|
%if %{livepatchable}
|
|
|
|
CFLAGS="$CFLAGS -fpatchable-function-entry=16,14 -fdump-ipa-clones"
|
|
|
|
%endif
|
2023-08-07 12:24:04 +02:00
|
|
|
autoreconf
|
2012-03-19 13:00:58 +01:00
|
|
|
%configure \
|
2019-08-21 13:20:26 +02:00
|
|
|
--includedir=%{_includedir}/security \
|
2007-01-18 16:42:07 +01:00
|
|
|
--docdir=%{_docdir}/pam \
|
|
|
|
--htmldir=%{_docdir}/pam/html \
|
|
|
|
--pdfdir=%{_docdir}/pam/pdf \
|
2021-07-09 14:12:20 +02:00
|
|
|
--enable-isadir=../..%{_pam_moduledir} \
|
|
|
|
--enable-securedir=%{_pam_moduledir} \
|
2022-06-13 10:55:58 +02:00
|
|
|
--enable-vendordir=%{_prefix}/etc \
|
2024-01-18 10:18:10 +01:00
|
|
|
%if "%{flavor}" == "full"
|
Accepting request 1085746 from home:kukuk:cleanup
- Update to final 1.5.3 release:
- configure: added --enable-logind option to use logind instead of utmp
in pam_issue and pam_timestamp.
- pam_modutil_getlogin: changed to use getlogin() from libc instead of
parsing utmp.
- Added libeconf support to pam_env and pam_shells.
- Added vendor directory support to pam_access, pam_env, pam_group,
pam_faillock, pam_limits, pam_namespace, pam_pwhistory, pam_sepermit,
pam_shells, and pam_time.
- pam_limits: changed to not fail on missing config files.
- pam_pwhistory: added conf= option to specify config file location.
- pam_pwhistory: added file= option to specify password history file
location.
- pam_shells: added shells.d support when libeconf and vendordir are enabled.
- Deprecated pam_lastlog: this module is no longer built by default because
it uses utmp, wtmp, btmp and lastlog, but none of them are Y2038 safe,
even on 64bit architectures.
pam_lastlog will be removed in one of the next releases, consider using
pam_lastlog2 (from https://github.com/thkukuk/lastlog2) and/or
pam_wtmpdb (from https://github.com/thkukuk/wtmpdb) instead.
- Deprecated _pam_overwrite(), _pam_overwrite_n(), and _pam_drop_reply()
macros provided by _pam_macros.h; the memory override performed by these
macros can be optimized out by the compiler and therefore can no longer
be relied upon.
OBS-URL: https://build.opensuse.org/request/show/1085746
OBS-URL: https://build.opensuse.org/package/show/Linux-PAM/pam?expand=0&rev=277
2023-05-09 18:04:51 +02:00
|
|
|
--enable-logind \
|
2024-01-18 10:18:10 +01:00
|
|
|
%endif
|
2023-08-07 12:24:04 +02:00
|
|
|
--disable-examples \
|
2023-04-11 10:24:03 +02:00
|
|
|
--disable-nis \
|
2021-07-09 14:12:20 +02:00
|
|
|
%if %{with debug}
|
2021-09-10 11:48:01 +02:00
|
|
|
--enable-debug
|
2021-07-09 14:12:20 +02:00
|
|
|
%endif
|
2021-09-10 11:48:01 +02:00
|
|
|
|
2021-07-13 15:43:07 +02:00
|
|
|
%make_build
|
2023-03-15 10:05:09 +01:00
|
|
|
|
|
|
|
%if %{livepatchable}
|
|
|
|
|
|
|
|
# Ipa-clones are files generated by gcc which logs changes made across
|
|
|
|
# functions, and we need to know such changes to build livepatches
|
|
|
|
# correctly. These files are intended to be used by the livepatch
|
|
|
|
# developers and may be retrieved by using `osc getbinaries`.
|
|
|
|
#
|
|
|
|
# Create list of ipa-clones.
|
|
|
|
find . -name "*.ipa-clones" ! -empty | sed 's/^\.\///g' | sort > ipa-clones.list
|
|
|
|
|
|
|
|
# Create ipa-clones destination folder and move clones there.
|
|
|
|
mkdir -p ipa-clones/%{clones_dest_dir}
|
|
|
|
while read f; do
|
|
|
|
_dest=ipa-clones/%{clones_dest_dir}/$f
|
|
|
|
mkdir -p ${_dest%/*}
|
|
|
|
cp $f $_dest
|
|
|
|
done < ipa-clones.list
|
|
|
|
|
|
|
|
# Create tar package with the clone files.
|
|
|
|
tar cfJ %{tar_package_name} -C ipa-clones %{tar_basename}
|
|
|
|
|
|
|
|
# Copy tar package to the OTHERS folder
|
|
|
|
cp %{tar_package_name} %{_other}
|
|
|
|
|
|
|
|
%endif # livepatchable
|
|
|
|
|
2020-05-27 11:48:06 +02:00
|
|
|
gcc -fwhole-program -fpie -pie -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE %{optflags} -I%{_builddir}/Linux-PAM-%{version}/libpam/include %{SOURCE10} -o %{_builddir}/unix2_chkpwd -L%{_builddir}/Linux-PAM-%{version}/libpam/.libs -lpam
|
2007-07-10 13:34:21 +02:00
|
|
|
|
2021-11-24 14:43:37 +01:00
|
|
|
%if %{build_main}
|
2007-07-10 13:34:21 +02:00
|
|
|
%check
|
2020-05-27 11:48:06 +02:00
|
|
|
%make_build check
|
2021-11-24 14:43:37 +01:00
|
|
|
%endif
|
2006-12-19 00:17:21 +01:00
|
|
|
|
|
|
|
%install
|
2021-07-09 14:12:20 +02:00
|
|
|
mkdir -p %{buildroot}%{_pam_confdir}
|
|
|
|
mkdir -p %{buildroot}%{_pam_vendordir}
|
2019-08-21 13:20:26 +02:00
|
|
|
mkdir -p %{buildroot}%{_includedir}/security
|
2021-07-09 14:12:20 +02:00
|
|
|
mkdir -p %{buildroot}%{_pam_moduledir}
|
2019-08-21 13:20:26 +02:00
|
|
|
mkdir -p %{buildroot}/sbin
|
|
|
|
mkdir -p -m 755 %{buildroot}%{_libdir}
|
2022-06-17 17:30:56 +02:00
|
|
|
# For compat reasons
|
|
|
|
mkdir -p %{buildroot}%{_distconfdir}/pam.d
|
2023-03-15 10:05:09 +01:00
|
|
|
|
2019-08-21 13:20:26 +02:00
|
|
|
%make_install
|
2024-01-18 17:09:06 +01:00
|
|
|
/sbin/ldconfig -n %{buildroot}%{_libdir}
|
2006-12-19 00:17:21 +01:00
|
|
|
# Install documentation
|
2019-08-23 14:39:21 +02:00
|
|
|
%make_install -C doc
|
2024-01-19 12:24:46 +01:00
|
|
|
# install /etc/security/namespace.d used by pam_namespace.so for namespace.conf iscript
|
|
|
|
install -d %{buildroot}%{_pam_secconfdir}/namespace.d
|
2006-12-19 00:17:21 +01:00
|
|
|
# install other.pamd and common-*.pamd
|
2021-07-09 14:12:20 +02:00
|
|
|
install -m 644 %{SOURCE3} %{buildroot}%{_pam_vendordir}/other
|
|
|
|
install -m 644 %{SOURCE4} %{buildroot}%{_pam_vendordir}/common-auth
|
|
|
|
install -m 644 %{SOURCE5} %{buildroot}%{_pam_vendordir}/common-account
|
|
|
|
install -m 644 %{SOURCE6} %{buildroot}%{_pam_vendordir}/common-password
|
|
|
|
install -m 644 %{SOURCE7} %{buildroot}%{_pam_vendordir}/common-session
|
2023-03-20 11:36:11 +01:00
|
|
|
install -m 644 %{SOURCE20} %{buildroot}%{_pam_vendordir}/common-session-nonlogin
|
|
|
|
install -m 644 %{SOURCE21} %{buildroot}%{_pam_vendordir}/postlogin-auth
|
|
|
|
install -m 644 %{SOURCE22} %{buildroot}%{_pam_vendordir}/postlogin-account
|
|
|
|
install -m 644 %{SOURCE23} %{buildroot}%{_pam_vendordir}/postlogin-password
|
|
|
|
install -m 644 %{SOURCE24} %{buildroot}%{_pam_vendordir}/postlogin-session
|
2020-04-03 08:26:25 +02:00
|
|
|
mkdir -p %{buildroot}%{_prefix}/lib/motd.d
|
2006-12-19 00:17:21 +01:00
|
|
|
#
|
|
|
|
# Remove crap
|
|
|
|
#
|
2019-08-21 13:20:26 +02:00
|
|
|
find %{buildroot} -type f -name "*.la" -delete -print
|
2006-12-19 00:17:21 +01:00
|
|
|
#
|
|
|
|
# Install READMEs of PAM modules
|
|
|
|
#
|
2019-08-21 13:20:26 +02:00
|
|
|
DOC=%{buildroot}%{_defaultdocdir}/pam
|
2006-12-19 00:17:21 +01:00
|
|
|
mkdir -p $DOC/modules
|
2019-08-23 14:39:21 +02:00
|
|
|
pushd modules
|
|
|
|
for i in pam_*/README; do
|
|
|
|
cp -fpv "$i" "$DOC/modules/README.${i%/*}"
|
|
|
|
done
|
|
|
|
popd
|
2016-05-02 10:45:43 +02:00
|
|
|
# Install unix2_chkpwd
|
2021-07-09 14:12:20 +02:00
|
|
|
install -m 755 %{_builddir}/unix2_chkpwd %{buildroot}%{_sbindir}
|
2021-11-24 14:43:37 +01:00
|
|
|
|
2020-12-03 14:58:29 +01:00
|
|
|
# rpm macros
|
2021-07-13 15:53:02 +02:00
|
|
|
install -D -m 644 %{SOURCE2} %{buildroot}%{_rpmmacrodir}/macros.pam
|
2021-06-25 11:44:49 +02:00
|
|
|
# /run/motd.d
|
2021-09-15 15:55:27 +02:00
|
|
|
install -Dm0644 %{SOURCE13} %{buildroot}%{_tmpfilesdir}/pam.conf
|
2021-11-24 14:43:37 +01:00
|
|
|
|
2024-01-19 12:24:46 +01:00
|
|
|
mkdir -p %{buildroot}%{_pam_secdistconfdir}/{limits.d,namespace.d}
|
2022-11-23 13:21:53 +01:00
|
|
|
mv %{buildroot}%{_sysconfdir}/environment %{buildroot}%{_distconfdir}/environment
|
2021-11-24 14:43:37 +01:00
|
|
|
|
|
|
|
# Remove manual pages for main package
|
|
|
|
%if !%{build_doc}
|
2023-04-11 10:24:03 +02:00
|
|
|
rm -rf %{buildroot}%{_mandir}/man?/*
|
2021-11-24 14:43:37 +01:00
|
|
|
%else
|
|
|
|
install -m 644 %{_sourcedir}/unix2_chkpwd.8 %{buildroot}/%{_mandir}/man8/
|
|
|
|
# bsc#1188724
|
|
|
|
echo '.so man8/pam_motd.8' > %{buildroot}%{_mandir}/man5/motd.5
|
|
|
|
%endif
|
|
|
|
|
2023-04-11 10:24:03 +02:00
|
|
|
%if !%{build_main}
|
2024-01-19 12:24:46 +01:00
|
|
|
rm -rf %{buildroot}{%{_sysconfdir},%{_distconfdir},%{_sbindir}/{f*,m*,pam_n*,pw*,u*},%{_pam_secconfdir},%{_pam_confdir},%{_datadir}/locale}
|
2024-01-19 12:30:53 +01:00
|
|
|
rm -rf %{buildroot}{%{_includedir},%{_libdir}/{libpam*,pkgconfig},%{_pam_vendordir},%{_rpmmacrodir},%{_tmpfilesdir},%{_unitdir}/pam_namespace.service}
|
2024-01-19 12:24:46 +01:00
|
|
|
rm -rf %{buildroot}%{_pam_moduledir}/pam_{a,b,c,d,e,f,g,h,j,k,l,m,n,o,p,q,r,s,v,w,x,y,z,time.,tt,um,un,usertype}*
|
2021-11-24 14:43:37 +01:00
|
|
|
%else
|
2023-04-11 10:24:03 +02:00
|
|
|
# Delete files for extra package
|
|
|
|
rm -rf %{buildroot}{%{_pam_moduledir}/pam_issue.so,%{_pam_moduledir}/pam_timestamp.so,%{_sbindir}/pam_timestamp_check}
|
2021-11-24 14:43:37 +01:00
|
|
|
|
2021-06-25 11:44:49 +02:00
|
|
|
# Create filelist with translations
|
2019-08-21 13:20:26 +02:00
|
|
|
%find_lang Linux-PAM
|
2006-12-19 00:17:21 +01:00
|
|
|
|
2021-11-24 14:43:37 +01:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%if %{build_main}
|
|
|
|
|
2012-03-19 13:00:58 +01:00
|
|
|
%verifyscript
|
2021-07-09 14:12:20 +02:00
|
|
|
%verify_permissions -e %{_sbindir}/unix_chkpwd
|
|
|
|
%verify_permissions -e %{_sbindir}/unix2_chkpwd
|
2006-12-19 00:17:21 +01:00
|
|
|
|
2013-02-05 14:10:24 +01:00
|
|
|
%post
|
|
|
|
/sbin/ldconfig
|
2021-07-09 14:12:20 +02:00
|
|
|
%set_permissions %{_sbindir}/unix_chkpwd
|
|
|
|
%set_permissions %{_sbindir}/unix2_chkpwd
|
2021-09-15 15:55:27 +02:00
|
|
|
%tmpfiles_create %{_tmpfilesdir}/pam.conf
|
2006-12-19 00:17:21 +01:00
|
|
|
|
2012-03-19 13:00:58 +01:00
|
|
|
%postun -p /sbin/ldconfig
|
2019-09-25 12:16:25 +02:00
|
|
|
%pre
|
2023-01-25 11:56:16 +01:00
|
|
|
for i in securetty %{config_files} ; do
|
2020-05-27 11:48:06 +02:00
|
|
|
test -f %{_sysconfdir}/${i}.rpmsave && mv -v %{_sysconfdir}/${i}.rpmsave %{_sysconfdir}/${i}.rpmsave.old ||:
|
2019-09-25 12:16:25 +02:00
|
|
|
done
|
|
|
|
|
|
|
|
%posttrans
|
|
|
|
# Migration to /usr/etc.
|
2023-01-25 11:56:16 +01:00
|
|
|
for i in securetty %{config_files} ; do
|
2020-05-27 11:48:06 +02:00
|
|
|
test -f %{_sysconfdir}/${i}.rpmsave && mv -v %{_sysconfdir}/${i}.rpmsave %{_sysconfdir}/${i} ||:
|
2019-09-25 12:16:25 +02:00
|
|
|
done
|
|
|
|
|
2006-12-19 00:17:21 +01:00
|
|
|
%files -f Linux-PAM.lang
|
2021-11-24 14:43:37 +01:00
|
|
|
%doc NEWS
|
|
|
|
%license COPYING
|
|
|
|
%exclude %{_defaultdocdir}/pam/html
|
|
|
|
%exclude %{_defaultdocdir}/pam/modules
|
|
|
|
%exclude %{_defaultdocdir}/pam/pdf
|
|
|
|
%exclude %{_defaultdocdir}/pam/*.txt
|
2021-07-09 14:12:20 +02:00
|
|
|
%dir %{_pam_confdir}
|
|
|
|
%dir %{_pam_vendordir}
|
|
|
|
%dir %{_pam_secconfdir}
|
2023-01-25 11:56:16 +01:00
|
|
|
%dir %{_pam_secdistconfdir}
|
|
|
|
%dir %{_pam_secdistconfdir}/limits.d
|
2022-06-17 17:30:56 +02:00
|
|
|
# /usr/etc/pam.d is for compat reasons
|
|
|
|
%dir %{_distconfdir}/pam.d
|
2020-04-03 08:26:25 +02:00
|
|
|
%dir %{_prefix}/lib/motd.d
|
2019-09-25 12:16:25 +02:00
|
|
|
%if %{defined config_noreplace}
|
2021-07-09 14:12:20 +02:00
|
|
|
%config(noreplace) %{_pam_confdir}/other
|
|
|
|
%config(noreplace) %{_pam_confdir}/common-*
|
2019-09-25 12:16:25 +02:00
|
|
|
%else
|
2021-07-09 14:12:20 +02:00
|
|
|
%{_pam_vendordir}/other
|
|
|
|
%{_pam_vendordir}/common-*
|
2023-03-20 11:36:11 +01:00
|
|
|
%{_pam_vendordir}/postlogin-*
|
2019-09-25 12:16:25 +02:00
|
|
|
%endif
|
2022-11-23 13:21:53 +01:00
|
|
|
%{_distconfdir}/environment
|
2023-01-25 11:56:16 +01:00
|
|
|
%{_pam_secdistconfdir}/access.conf
|
|
|
|
%{_pam_secdistconfdir}/group.conf
|
|
|
|
%{_pam_secdistconfdir}/faillock.conf
|
|
|
|
%{_pam_secdistconfdir}/limits.conf
|
|
|
|
%{_pam_secdistconfdir}/pam_env.conf
|
2023-04-11 10:24:03 +02:00
|
|
|
%if %{with selinux}
|
2023-01-25 11:56:16 +01:00
|
|
|
%{_pam_secdistconfdir}/sepermit.conf
|
2008-02-16 08:33:36 +01:00
|
|
|
%endif
|
2023-01-25 11:56:16 +01:00
|
|
|
%{_pam_secdistconfdir}/time.conf
|
2024-01-19 12:24:46 +01:00
|
|
|
%{_pam_secdistconfdir}/namespace.conf
|
|
|
|
%{_pam_secdistconfdir}/namespace.init
|
2023-04-11 10:24:03 +02:00
|
|
|
%{_pam_secdistconfdir}/pwhistory.conf
|
2024-01-19 12:24:46 +01:00
|
|
|
%dir %{_pam_secdistconfdir}/namespace.d
|
2021-07-09 14:12:20 +02:00
|
|
|
%{_libdir}/libpam.so.0
|
|
|
|
%{_libdir}/libpam.so.%{libpam_so_version}
|
|
|
|
%{_libdir}/libpamc.so.0
|
|
|
|
%{_libdir}/libpamc.so.%{libpamc_so_version}
|
|
|
|
%{_libdir}/libpam_misc.so.0
|
|
|
|
%{_libdir}/libpam_misc.so.%{libpam_misc_so_version}
|
|
|
|
%dir %{_pam_moduledir}
|
|
|
|
%{_pam_moduledir}/pam_access.so
|
2024-01-30 16:18:15 +01:00
|
|
|
%{_pam_moduledir}/pam_canonicalize_user.so
|
2021-07-09 14:12:20 +02:00
|
|
|
%{_pam_moduledir}/pam_debug.so
|
|
|
|
%{_pam_moduledir}/pam_deny.so
|
|
|
|
%{_pam_moduledir}/pam_echo.so
|
|
|
|
%{_pam_moduledir}/pam_env.so
|
|
|
|
%{_pam_moduledir}/pam_exec.so
|
|
|
|
%{_pam_moduledir}/pam_faildelay.so
|
|
|
|
%{_pam_moduledir}/pam_faillock.so
|
|
|
|
%{_pam_moduledir}/pam_filter.so
|
|
|
|
%dir %{_pam_moduledir}/pam_filter
|
|
|
|
%{_pam_moduledir}//pam_filter/upperLOWER
|
|
|
|
%{_pam_moduledir}/pam_ftp.so
|
|
|
|
%{_pam_moduledir}/pam_group.so
|
|
|
|
%{_pam_moduledir}/pam_keyinit.so
|
|
|
|
%{_pam_moduledir}/pam_limits.so
|
|
|
|
%{_pam_moduledir}/pam_listfile.so
|
|
|
|
%{_pam_moduledir}/pam_localuser.so
|
|
|
|
%{_pam_moduledir}/pam_loginuid.so
|
|
|
|
%{_pam_moduledir}/pam_mail.so
|
|
|
|
%{_pam_moduledir}/pam_mkhomedir.so
|
|
|
|
%{_pam_moduledir}/pam_motd.so
|
2024-01-19 12:24:46 +01:00
|
|
|
%{_pam_moduledir}/pam_namespace.so
|
2021-07-09 14:12:20 +02:00
|
|
|
%{_pam_moduledir}/pam_nologin.so
|
|
|
|
%{_pam_moduledir}/pam_permit.so
|
|
|
|
%{_pam_moduledir}/pam_pwhistory.so
|
|
|
|
%{_pam_moduledir}/pam_rhosts.so
|
|
|
|
%{_pam_moduledir}/pam_rootok.so
|
|
|
|
%{_pam_moduledir}/pam_securetty.so
|
2023-04-11 10:24:03 +02:00
|
|
|
%if %{with selinux}
|
2021-07-09 14:12:20 +02:00
|
|
|
%{_pam_moduledir}/pam_selinux.so
|
|
|
|
%{_pam_moduledir}/pam_sepermit.so
|
2008-02-16 08:33:36 +01:00
|
|
|
%endif
|
2021-07-09 14:12:20 +02:00
|
|
|
%{_pam_moduledir}/pam_setquota.so
|
|
|
|
%{_pam_moduledir}/pam_shells.so
|
|
|
|
%{_pam_moduledir}/pam_stress.so
|
|
|
|
%{_pam_moduledir}/pam_succeed_if.so
|
|
|
|
%{_pam_moduledir}/pam_time.so
|
|
|
|
%{_pam_moduledir}/pam_tty_audit.so
|
|
|
|
%{_pam_moduledir}/pam_umask.so
|
2022-12-16 10:50:49 +01:00
|
|
|
%{_pam_moduledir}/pam_unix.so
|
2021-07-09 14:12:20 +02:00
|
|
|
%{_pam_moduledir}/pam_usertype.so
|
|
|
|
%{_pam_moduledir}/pam_warn.so
|
|
|
|
%{_pam_moduledir}/pam_wheel.so
|
|
|
|
%{_pam_moduledir}/pam_xauth.so
|
|
|
|
%{_sbindir}/faillock
|
|
|
|
%{_sbindir}/mkhomedir_helper
|
2024-01-19 12:24:46 +01:00
|
|
|
%{_sbindir}/pam_namespace_helper
|
2021-07-09 14:12:20 +02:00
|
|
|
%{_sbindir}/pwhistory_helper
|
|
|
|
%verify(not mode) %attr(4755,root,shadow) %{_sbindir}/unix_chkpwd
|
|
|
|
%verify(not mode) %attr(4755,root,shadow) %{_sbindir}/unix2_chkpwd
|
|
|
|
%attr(0700,root,root) %{_sbindir}/unix_update
|
2024-01-19 12:24:46 +01:00
|
|
|
%{_unitdir}/pam_namespace.service
|
2021-09-15 15:55:27 +02:00
|
|
|
%{_tmpfilesdir}/pam.conf
|
2006-12-19 00:17:21 +01:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(644,root,root,755)
|
2019-08-21 13:20:26 +02:00
|
|
|
%dir %{_includedir}/security
|
2006-12-19 00:17:21 +01:00
|
|
|
%{_includedir}/security/*.h
|
|
|
|
%{_libdir}/libpam.so
|
|
|
|
%{_libdir}/libpamc.so
|
|
|
|
%{_libdir}/libpam_misc.so
|
2021-07-13 15:53:02 +02:00
|
|
|
%{_rpmmacrodir}/macros.pam
|
2021-09-10 11:48:01 +02:00
|
|
|
%{_libdir}/pkgconfig/pam*.pc
|
2023-04-11 10:24:03 +02:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%if %{build_userdb}
|
|
|
|
%files -n pam-userdb
|
|
|
|
%defattr(-,root,root,755)
|
|
|
|
%{_pam_moduledir}/pam_userdb.so
|
|
|
|
%{_mandir}/man8/pam_userdb.8%{?ext_man}
|
|
|
|
%endif
|
2008-02-16 08:33:36 +01:00
|
|
|
|
2023-04-11 10:24:03 +02:00
|
|
|
%if %{build_extra}
|
|
|
|
%files -n pam-extra
|
|
|
|
%defattr(-,root,root,755)
|
|
|
|
%{_pam_moduledir}/pam_issue.so
|
|
|
|
%{_pam_moduledir}/pam_timestamp.so
|
|
|
|
%{_sbindir}/pam_timestamp_check
|
2021-11-24 14:43:37 +01:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%if %{build_doc}
|
|
|
|
|
|
|
|
%files -n pam-doc
|
|
|
|
%defattr(644,root,root,755)
|
|
|
|
%dir %{_defaultdocdir}/pam
|
|
|
|
%doc %{_defaultdocdir}/pam/html
|
|
|
|
%doc %{_defaultdocdir}/pam/modules
|
|
|
|
%doc %{_defaultdocdir}/pam/pdf
|
|
|
|
%doc %{_defaultdocdir}/pam/*.txt
|
|
|
|
|
|
|
|
%files -n pam-manpages
|
2023-04-11 10:24:03 +02:00
|
|
|
%{_mandir}/man3/pam*.3%{?ext_man}
|
|
|
|
%{_mandir}/man3/misc_conv.3%{?ext_man}
|
2021-11-24 14:43:37 +01:00
|
|
|
%{_mandir}/man5/environment.5%{?ext_man}
|
|
|
|
%{_mandir}/man5/*.conf.5%{?ext_man}
|
|
|
|
%{_mandir}/man5/pam.d.5%{?ext_man}
|
|
|
|
%{_mandir}/man5/motd.5%{?ext_man}
|
|
|
|
%{_mandir}/man8/PAM.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/faillock.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/mkhomedir_helper.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_access.8%{?ext_man}
|
2024-01-30 16:18:15 +01:00
|
|
|
%{_mandir}/man8/pam_canonicalize_user.8%{?ext_man}
|
2021-11-24 14:43:37 +01:00
|
|
|
%{_mandir}/man8/pam_debug.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_deny.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_echo.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_env.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_exec.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_faildelay.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_faillock.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_filter.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_ftp.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_group.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_issue.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_keyinit.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_limits.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_listfile.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_localuser.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_loginuid.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_mail.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_mkhomedir.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_motd.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_namespace.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_namespace_helper.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_nologin.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_permit.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_pwhistory.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_rhosts.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_rootok.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_securetty.8%{?ext_man}
|
2023-08-23 11:38:24 +02:00
|
|
|
%if %{with selinux}
|
2021-11-24 14:43:37 +01:00
|
|
|
%{_mandir}/man8/pam_selinux.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_sepermit.8%{?ext_man}
|
2023-08-23 11:38:24 +02:00
|
|
|
%endif
|
2021-11-24 14:43:37 +01:00
|
|
|
%{_mandir}/man8/pam_setquota.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_shells.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_stress.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_succeed_if.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_time.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_timestamp.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_timestamp_check.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_tty_audit.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_umask.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_unix.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_usertype.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_warn.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_wheel.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pam_xauth.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/pwhistory_helper.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/unix2_chkpwd.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/unix_chkpwd.8%{?ext_man}
|
|
|
|
%{_mandir}/man8/unix_update.8%{?ext_man}
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
2007-03-29 00:57:30 +02:00
|
|
|
%changelog
|