2007-01-16 00:28:55 +01:00
|
|
|
#
|
2011-05-12 10:10:42 +02:00
|
|
|
# spec file for package pam-config
|
2007-01-16 00:28:55 +01:00
|
|
|
#
|
2018-02-23 13:36:57 +01:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2007-01-16 00:28:55 +01:00
|
|
|
#
|
2008-08-23 01:44:49 +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.
|
|
|
|
|
2007-01-16 00:28:55 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2008-02-15 01:36:57 +01:00
|
|
|
|
2007-01-16 00:28:55 +01:00
|
|
|
Name: pam-config
|
2023-03-13 15:40:16 +01:00
|
|
|
Version: 1.9
|
2011-12-07 09:29:46 +01:00
|
|
|
Release: 0
|
2019-08-19 11:28:35 +02:00
|
|
|
Summary: Utility to modify common PAM configuration files
|
2018-02-23 13:36:57 +01:00
|
|
|
License: GPL-2.0-only
|
|
|
|
Group: System/Management
|
|
|
|
URL: https://github.com/SUSE/pam-config
|
2019-04-24 09:54:10 +02:00
|
|
|
Source: %{name}-%{version}.tar.xz
|
2023-01-12 15:47:37 +01:00
|
|
|
# Do not show some rpmlint errors.
|
|
|
|
Source1: pam-config-rpmlintrc
|
2018-02-23 13:36:57 +01:00
|
|
|
PreReq: pam >= 1.3.0
|
2020-05-01 22:38:28 +02:00
|
|
|
Recommends: pam_pwquality
|
2007-01-16 00:28:55 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
pam-config is a command line utility to maintain the common PAM
|
|
|
|
configuration files included by most PAM application configuration
|
|
|
|
files. It can be used to configure a system for different network or
|
|
|
|
hardware based authentication schemes. pam-config can also
|
|
|
|
add/adjust/remove other PAM modules and their options.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%build
|
|
|
|
%configure
|
2011-12-07 15:01:14 +01:00
|
|
|
make %{?_smp_mflags}
|
2007-01-16 00:28:55 +01:00
|
|
|
|
|
|
|
%install
|
2018-02-23 13:36:57 +01:00
|
|
|
%make_install
|
|
|
|
mkdir -p %{buildroot}/%{_sysconfdir}/pam.d
|
2016-06-23 11:30:50 +02:00
|
|
|
for i in account auth password session ; do
|
2018-02-23 13:36:57 +01:00
|
|
|
touch %{buildroot}/%{_sysconfdir}/pam.d/common-$i-pc
|
2016-06-23 11:30:50 +02:00
|
|
|
done
|
2018-02-23 13:36:57 +01:00
|
|
|
%find_lang pam-config
|
2007-01-16 00:28:55 +01:00
|
|
|
|
|
|
|
%post
|
2018-02-23 13:36:57 +01:00
|
|
|
if [ ! -f %{_sysconfdir}/pam.d/common-auth-pc ] ; then
|
2012-11-12 15:54:12 +01:00
|
|
|
pam-config --debug --create --force
|
2007-01-16 00:28:55 +01:00
|
|
|
else
|
2014-04-02 16:12:13 +02:00
|
|
|
pam-config --debug --update ||:
|
2007-01-16 00:28:55 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
%postun
|
2015-01-28 11:34:37 +01:00
|
|
|
if [ $1 = 0 ]; then
|
2007-01-16 00:28:55 +01:00
|
|
|
# Deinstall
|
2018-02-23 13:36:57 +01:00
|
|
|
dir=%{_sysconfdir}/security
|
2007-01-16 00:28:55 +01:00
|
|
|
for conf in pam_unix2.conf pam_pwcheck.conf ; do
|
|
|
|
if [ -f $dir/$conf.pam-config-backup -a ! -f $dir/$conf ]; then
|
|
|
|
mv -v $dir/$conf.pam-config-backup $dir/$conf
|
|
|
|
fi
|
|
|
|
done
|
2018-02-23 13:36:57 +01:00
|
|
|
dir=%{_sysconfdir}/pam.d
|
2007-01-16 00:28:55 +01:00
|
|
|
for pamd in common-account common-auth common-password common-session ; do
|
|
|
|
if [ -f $dir/$pamd.pam-config-backup -a -L $dir/$pamd ]; then
|
|
|
|
rm -v $dir/$pamd && mv -v $dir/$pamd.pam-config-backup $dir/$pamd
|
|
|
|
fi
|
2012-09-20 14:59:17 +02:00
|
|
|
# common-*-pc are ghost, so we have to move them away...
|
2007-01-16 00:28:55 +01:00
|
|
|
if [ -f $dir/$pamd-pc ]; then
|
|
|
|
mv -v $dir/$pamd-pc $dir/$pamd-pc.bak
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
2018-04-11 15:35:27 +02:00
|
|
|
%triggerpostun -- pam-modules
|
2018-04-11 15:25:33 +02:00
|
|
|
[ $2 = 0 ] || exit 0
|
|
|
|
pam-config --debug --update ||:
|
|
|
|
|
2007-07-27 15:12:41 +02:00
|
|
|
%files -f pam-config.lang
|
2018-02-23 13:36:57 +01:00
|
|
|
%license COPYING
|
2007-01-16 00:28:55 +01:00
|
|
|
%{_sbindir}/pam-config
|
2018-02-23 13:36:57 +01:00
|
|
|
%{_mandir}/man8/pam-config.8*
|
2016-06-23 11:30:50 +02:00
|
|
|
%ghost %config %{_sysconfdir}/pam.d/common-account-pc
|
|
|
|
%ghost %config %{_sysconfdir}/pam.d/common-auth-pc
|
|
|
|
%ghost %config %{_sysconfdir}/pam.d/common-password-pc
|
|
|
|
%ghost %config %{_sysconfdir}/pam.d/common-session-pc
|
2007-11-23 14:32:53 +01:00
|
|
|
|
2007-06-28 19:39:03 +02:00
|
|
|
%changelog
|