2007-01-16 00:28:55 +01:00
|
|
|
#
|
2009-12-04 10:23:35 +01:00
|
|
|
# spec file for package pam-config (Version 0.73)
|
2007-01-16 00:28:55 +01:00
|
|
|
#
|
2009-03-26 17:41:04 +01:00
|
|
|
# Copyright (c) 2009 SUSE LINUX Products 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
# norootforbuild
|
|
|
|
|
2008-02-15 01:36:57 +01:00
|
|
|
|
2007-01-16 00:28:55 +01:00
|
|
|
Name: pam-config
|
|
|
|
Summary: Modify common PAM configuration files
|
2009-12-04 10:23:35 +01:00
|
|
|
Version: 0.73
|
2008-11-21 15:46:02 +01:00
|
|
|
Release: 1
|
2009-12-04 10:23:35 +01:00
|
|
|
License: GPLv2
|
2007-10-26 01:49:53 +02:00
|
|
|
AutoReqProv: on
|
2007-01-16 00:28:55 +01:00
|
|
|
PreReq: pam >= 0.99
|
|
|
|
Requires: pam-modules >= 10.2
|
|
|
|
Group: System/Management
|
|
|
|
Source: %{name}-%{version}.tar.bz2
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%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
|
|
|
|
make
|
|
|
|
|
|
|
|
%install
|
|
|
|
make install DESTDIR=$RPM_BUILD_ROOT
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/pam.d
|
|
|
|
for i in account auth password session ; do
|
|
|
|
touch $RPM_BUILD_ROOT/%{_sysconfdir}/pam.d/common-$i-pc
|
|
|
|
done
|
2007-07-27 15:12:41 +02:00
|
|
|
%{find_lang} pam-config
|
2007-01-16 00:28:55 +01:00
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%post
|
|
|
|
if [ ! -f /etc/pam.d/common-auth-pc ] ; then
|
|
|
|
pam-config --debug --initialize
|
|
|
|
else
|
|
|
|
pam-config --debug --update ||:
|
|
|
|
fi
|
|
|
|
|
|
|
|
%postun
|
|
|
|
if [ $1 == 0 ]; then
|
|
|
|
# Deinstall
|
|
|
|
dir=/etc/security
|
|
|
|
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
|
|
|
|
dir=/etc/pam.d
|
|
|
|
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
|
|
|
|
# common-*-pc are %ghost, so we have to move them away...
|
|
|
|
if [ -f $dir/$pamd-pc ]; then
|
|
|
|
mv -v $dir/$pamd-pc $dir/$pamd-pc.bak
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
2007-07-27 15:12:41 +02:00
|
|
|
%files -f pam-config.lang
|
2007-01-16 00:28:55 +01:00
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_sbindir}/pam-config
|
|
|
|
%doc %{_mandir}/man8/pam-config.8*
|
|
|
|
%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
|