]> git.pld-linux.org Git - packages/apache-mod_auth_shadow.git/blob - apache-mod_auth_shadow.spec
- updated to 2.1
[packages/apache-mod_auth_shadow.git] / apache-mod_auth_shadow.spec
1 # TODO
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}
8 Version:        2.1
9 Release:        0.1
10 License:        GPL
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)
21
22 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
23 %define         _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
24
25 %description
26 mod_auth_shadow is an Apache module for authenticating users via an
27 /etc/shadow file.
28
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
32 as "nobody".
33
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.
38
39 %description -l pl
40 Modu³ do apache: autoryzacja przez plik /etc/shadow
41
42 %prep
43 %setup -q -n mod_%{mod_name}-%{version}
44 %patch0 -p1
45
46 %build
47 %{__make} \
48         CC="%{__cc}" \
49         INSTBINDIR=%{_sbindir} \
50         APXS=%{apxs}
51
52 %install
53 rm -rf $RPM_BUILD_ROOT
54 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sbindir},%{_sysconfdir}/httpd.conf}
55
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
60
61 %clean
62 rm -rf $RPM_BUILD_ROOT
63
64 %post
65 if [ -f /var/lock/subsys/httpd ]; then
66         /etc/rc.d/init.d/httpd restart 1>&2
67 fi
68
69 %preun
70 if [ "$1" = "0" ]; then
71         if [ -f /var/lock/subsys/httpd ]; then
72                 /etc/rc.d/init.d/httpd restart 1>&2
73         fi
74 fi
75
76 %files
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}/*
This page took 0.042973 seconds and 4 git commands to generate.