1 | #!/usr/bin/make -f |
---|
2 | |
---|
3 | pam_types = account auth session password |
---|
4 | pam_krb5_auth_opts = use_authtok |
---|
5 | pam_krb5_passwd_opts = use_authtok |
---|
6 | |
---|
7 | DEB_AUTO_UPDATE_DEBIAN_CONTROL = 1 |
---|
8 | DEBATHENA_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 |
---|
14 | include /usr/share/cdbs/1/rules/debhelper.mk |
---|
15 | include /usr/share/cdbs/1/rules/debathena-check-conffiles.mk |
---|
16 | include /usr/share/cdbs/1/rules/debathena-divert.mk |
---|
17 | |
---|
18 | common-build-indep:: $(patsubst %,debian/common-%.debathena,$(pam_types)) debian/gdm.debathena debian/login.debathena debian/ssh.debathena debian/access.conf.debathena |
---|
19 | |
---|
20 | debian/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 | |
---|
23 | debian/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 | |
---|
26 | debian/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 | |
---|
29 | debian/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 | |
---|
32 | debian/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 | |
---|
35 | debian/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 | |
---|
38 | debian/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 | |
---|
41 | debian/access.conf.debathena: $(call debathena_check_conffiles,/etc/security/access.conf) |
---|
42 | cat $< debian/access.conf.append > $@ |
---|
43 | |
---|
44 | clean:: |
---|
45 | rm -f $(patsubst %,debian/common-%.debathena,$(pam_types)) debian/gdm.debathena debian/login.debathena debian/ssh.debathena debian/access.conf.debathena |
---|