From f2e491ba089156ad683da8cb197cc34c03d10af9 Mon Sep 17 00:00:00 2001 From: "Krzysztof A. Adamski" Date: Fri, 11 Jul 2008 13:12:56 -0400 Subject: Provide our own PAM service configuration file. (cherry picked from commit 1656265c3aec5c0701c25f9260b03c444e6af07a) --- funcweb/etc/pam.d/funcweb | 3 +++ funcweb/funcweb.spec | 1 + funcweb/funcweb/identity/pam.py | 2 +- funcweb/setup.py | 5 ++++- 4 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 funcweb/etc/pam.d/funcweb (limited to 'funcweb') diff --git a/funcweb/etc/pam.d/funcweb b/funcweb/etc/pam.d/funcweb new file mode 100644 index 0000000..658583d --- /dev/null +++ b/funcweb/etc/pam.d/funcweb @@ -0,0 +1,3 @@ +#%PAM-1.0 +auth include system-auth +account include system-auth diff --git a/funcweb/funcweb.spec b/funcweb/funcweb.spec index a2b1720..39d394b 100644 --- a/funcweb/funcweb.spec +++ b/funcweb/funcweb.spec @@ -98,6 +98,7 @@ rm -fr $RPM_BUILD_ROOT %dir /var/log/funcweb %config(noreplace) %{_sysconfdir}/httpd/conf.d/funcweb.conf %config(noreplace) %{_sysconfdir}/%{name}/prod.cfg +%config(noreplace) %{_sysconfdir}/pam.d/funcweb %config(noreplace) /etc/logrotate.d/funcweb_rotate #adding the server startup shutdown thing diff --git a/funcweb/funcweb/identity/pam.py b/funcweb/funcweb/identity/pam.py index 87bc126..503ba0b 100644 --- a/funcweb/funcweb/identity/pam.py +++ b/funcweb/funcweb/identity/pam.py @@ -82,7 +82,7 @@ PAM_AUTHENTICATE = LIBPAM.pam_authenticate PAM_AUTHENTICATE.restype = c_int PAM_AUTHENTICATE.argtypes = [PamHandle, c_int] -def authenticate(username, password, service='login'): +def authenticate(username, password, service='funcweb'): """Returns True if the given username and password authenticate for the given service. Returns False otherwise diff --git a/funcweb/setup.py b/funcweb/setup.py index e4e6cf7..fc12ca2 100644 --- a/funcweb/setup.py +++ b/funcweb/setup.py @@ -23,6 +23,8 @@ initpath = "/etc/init.d" #the log path logpath = "/var/log/funcweb" rotpath = "/etc/logrotate.d" +#the pam path +pampath = "/etc/pam.d/" #the setup part setup( @@ -93,6 +95,7 @@ setup( (self_etcpath,['etc/prod.cfg']), (initpath,['init-scripts/funcwebd']), (logpath,[]), - (rotpath,['etc/funcweb_rotate']) + (rotpath,['etc/funcweb_rotate']), + (pampath,['etc/pam.d/funcweb']) ], ) -- cgit