diff --git a/.gitignore b/.gitignore index e69de29..8bf1a31 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/pwauth-2.3.10.tar.gz diff --git a/pwauth-strchr.patch b/pwauth-strchr.patch new file mode 100644 index 0000000..959bbd6 --- /dev/null +++ b/pwauth-strchr.patch @@ -0,0 +1,11 @@ +--- pwauth-2.3.10/main.c.orig 2009-06-11 07:47:10.000000000 -0600 ++++ pwauth-2.3.10/main.c 2012-04-17 17:03:31.432750719 -0600 +@@ -50,7 +50,7 @@ main(int argc, char **argv) + char *login, *passwd; + #else + char login[BFSZ+1], passwd[BFSZ+1]; +- char *c, *strchr(); ++ char *c; + #endif + int uid,i; + int status; diff --git a/pwauth.pam b/pwauth.pam new file mode 100644 index 0000000..2c80d7a --- /dev/null +++ b/pwauth.pam @@ -0,0 +1,3 @@ +#%PAM-1.0 +auth include password-auth +account include password-auth diff --git a/pwauth.spec b/pwauth.spec new file mode 100644 index 0000000..257de37 --- /dev/null +++ b/pwauth.spec @@ -0,0 +1,64 @@ +Name: pwauth +Version: 2.3.10 +Release: 1%{?dist} +Summary: External plugin for mod_authnz_external authenticator + +Group: Applications/System +License: BSD +URL: http://code.google.com/p/pwauth/ +Source0: http://pwauth.googlecode.com/files/%{name}-%{version}.tar.gz +Source1: pwauth.pam +Patch1: pwauth-strchr.patch + +BuildRequires: pam-devel +Requires(pre): httpd + +%description +Pwauth is an authenticator designed to be used with mod_auth_external +or mod_authnz_external and the Apache HTTP daemon to support reasonably +secure web authentication out of the system password database on most +versions of Unix. + + +%prep +%setup -q + +%patch1 -p1 -b .strchr + +%build +sed -i.orig -r \ + -e 's@^#define SHADOW_@/* &@' \ + -e 's@^/\* (#define PAM[^_])@\1@' \ + -e 's@^(#define (NOLOGIN_FILE|MIN_NOLOGIN_UID|SERVER_UIDS))@/* \1@' \ + config.h + +sed -i.orig -r \ + -e 's@^# (LIB=-lpam -ldl)@\1@' \ + -e 's@^CFLAGS= \$\(LOCALFLAGS\)@# &@' \ + Makefile + +make %{?_smp_mflags} CFLAGS="${RPM_OPT_FLAGS} -Wno-comment" + + +%install +mkdir -p %{buildroot}%{_bindir} %{buildroot}%{_sysconfdir}/pam.d + +install -p -m 4750 -t %{buildroot}%{_bindir} pwauth +install -p -T %{SOURCE1} %{buildroot}%{_sysconfdir}/pam.d/pwauth + + +%clean + + +%files +%attr(4750,root,apache) %{_bindir}/pwauth +%attr(644,-,-) %{_sysconfdir}/pam.d/pwauth +%doc CHANGES INSTALL README + + +%changelog +* Fri May 05 2012 Philip Prindeville 2.3.10-1 +- Initial checkin after Fedora packaging review. + +* Tue Apr 17 2012 Philip Prindeville 2.3.10-0 +- Initial RPM packaging. diff --git a/sources b/sources index e69de29..651277b 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +4f2e860ebc8f7f7c17743156b03659b0 pwauth-2.3.10.tar.gz