2 # - mv SPECS/apache-mod_auth{-,_}shadow.spec,v
3 %define mod_name auth_shadow
4 %define apxs /usr/sbin/apxs
5 Summary: Apache module: authenticating against a /etc/shadow file
6 Summary(pl): Modu³ do apache: autoryzacja przez plik /etc/shadow
7 Name: apache-mod_%{mod_name}
11 Group: Networking/Daemons
12 Source0: http://dl.sourceforge.net/mod-auth-shadow/mod_auth_shadow-%{version}.tar.gz
13 # Source0-md5: 564f11a9d19ea546673644fdacb928e7
14 Patch0: %{name}-make.patch
15 URL: http://mod-auth-shadow.sourceforge.net/
16 BuildRequires: %{apxs}
17 BuildRequires: apache-devel >= 2.0
18 Requires: apache(modules-api) = %apache_modules_api
19 Obsoletes: apache-mod_auth-shadow
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22 %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
23 %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
26 mod_auth_shadow is an Apache module for authenticating users via an
29 When performing this task one encounters one fundamental difficulty:
30 The /etc/shadow file is supposed to be read/writeable only by root.
31 However, the webserver is supposed to run under a non-root user, such
34 mod_auth_shadow addresses this difficulty by opening a pipe to an suid
35 root program, validate, which does the actual validation. When there
36 is a failure, validate writes an error message to the system log, and
37 waits three seconds before exiting.
40 Modu³ do apache: autoryzacja przez plik /etc/shadow
43 %setup -q -n mod_%{mod_name}-%{version}
49 INSTBINDIR=%{_sbindir} \
53 rm -rf $RPM_BUILD_ROOT
54 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sbindir},%{_sysconfdir}/httpd.conf}
56 install .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
57 install validate $RPM_BUILD_ROOT%{_sbindir}
58 echo 'LoadModule auth_shadow_module modules/mod_auth_shadow.so' > \
59 $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/90_mod_%{mod_name}.conf
62 rm -rf $RPM_BUILD_ROOT
65 if [ -f /var/lock/subsys/httpd ]; then
66 /etc/rc.d/init.d/httpd restart 1>&2
70 if [ "$1" = "0" ]; then
71 if [ -f /var/lock/subsys/httpd ]; then
72 /etc/rc.d/init.d/httpd restart 1>&2
77 %defattr(644,root,root,755)
78 %doc CHANGES INSTALL README
79 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf
80 %attr(755,root,root) %{_pkglibdir}/*
81 %attr(4755,root,root) %{_sbindir}/*