source: trunk/debathena/config/pam-config/debian/rules @ 22731

Revision 22731, 2.7 KB checked in by tabbott, 17 years ago (diff)
In pam-config: * Make access.conf.append mimic Athena workstations more closely.
  • Property svn:executable set to *
Line 
1#!/usr/bin/make -f
2
3pam_types = account auth session password
4pam_krb5_auth_opts = use_authtok
5pam_krb5_passwd_opts = use_authtok
6
7DEB_AUTO_UPDATE_DEBIAN_CONTROL = 1
8DEBATHENA_DIVERT_FILES_debathena-pam-config += \
9        $(patsubst %,/etc/pam.d/common-%.debathena,$(pam_types)) \
10        /etc/pam.d/gdm.debathena \
11        /etc/pam.d/ssh.debathena \
12        /etc/pam.d/login.debathena \
13        /etc/security/access.conf.debathena
14include /usr/share/cdbs/1/rules/debhelper.mk
15include /usr/share/cdbs/1/rules/debathena-check-conffiles.mk
16include /usr/share/cdbs/1/rules/debathena-divert.mk
17
18common-build-indep:: $(patsubst %,debian/common-%.debathena,$(pam_types)) debian/gdm.debathena debian/login.debathena debian/ssh.debathena debian/access.conf.debathena
19
20debian/common-account.debathena: /usr/share/pam/common-account
21        perl -0pe 's/^(account[ \t]+)required( ? ?)([ \t]+)(pam_unix\.so([ \t]+.*)?)\n/$$1sufficient$$3$$4\n$$1required$$2$$3pam_krb5.so\n/m or die' $< > $@
22
23debian/common-auth.debathena: /usr/share/pam/common-auth
24        perl -0pe 's/^(auth[ \t]+)required( ? ?)([ \t]+)(pam_unix\.so([ \t]+.*)?)\n/$$1sufficient$$3$$4\n$$1required$$2$$3pam_krb5.so use_first_pass\n/m or die' $< > $@
25
26debian/common-session.debathena: /usr/share/pam/common-session
27        perl -0pe 's/^(session[ \t]+)required([ \t]+)(pam_unix\.so([ \t]+.*)?)\n/$$1required$$2$$3\n$$1optional$$2pam_krb5.so\n$$1optional$$2pam_krb524.so\n$$1optional$$2pam_athena_locker.so\n$$1optional$$2pam_debathena_home_type.so\n$$1optional$$2pam_mktemp.so var=ATHENA_SESSION_TMPDIR prefix=\/var\/run\/athena-sessions\/session dir\n/m or die' $< > $@
28
29debian/common-password.debathena: /usr/share/pam/common-password
30        perl -0pe 's/^(password[ \t]+)required( ? ?)([ \t]+)(pam_unix\.so([ \t]+.*)?)\n/$$1sufficient$$3$$4\n$$1required$$2$$3pam_krb5.so use_first_pass\n/m or die' $< > $@
31
32debian/gdm.debathena: $(call debathena_check_conffiles,/etc/pam.d/gdm)
33        perl -0pe 's/^(\@include common-account)/account\trequired\tpam_access.so\n$$1/m or die' $< > $@
34
35debian/ssh.debathena: $(call debathena_check_conffiles,/etc/pam.d/ssh)
36        perl -0pe '(s/^\#[\t ]+(account[ \t]+required[ \t]+pam_access.so)/$$1/m or s/^(?=\@include[ \t]+common-account)/account    required     pam_access.so\n/m) and s/^(\@include[ \t]+common-session)/$$1\nsession\toptional\tpam_mktemp.so var=XAUTHORITY prefix=\/var\/run\/athena-sessions\/xauth/m or die' $< > $@
37
38debian/login.debathena: $(call debathena_check_conffiles,/etc/pam.d/login)
39        perl -0pe 's/^\#[\t ]+(account[ \t]+required[ \t]+pam_access.so)/$$1/m or die' $< > $@
40
41debian/access.conf.debathena: $(call debathena_check_conffiles,/etc/security/access.conf)
42        cat $< debian/access.conf.append > $@
43
44clean::
45        rm -f $(patsubst %,debian/common-%.debathena,$(pam_types)) debian/gdm.debathena debian/login.debathena debian/ssh.debathena debian/access.conf.debathena
Note: See TracBrowser for help on using the repository browser.