source: trunk/debathena/config/ssh-server-config/debian/rules @ 24787

Revision 24787, 1.5 KB checked in by jdreed, 14 years ago (diff)
In ssh-server-config: * Disable GSSAPI if there's no keytab when sshd is started (Trac #315)
  • Property svn:executable set to *
Line 
1#!/usr/bin/make -f
2
3DEB_DIVERT_EXTENSION = .debathena
4DEB_DIVERT_FILES_debathena-ssh-server-config += \
5        /etc/ssh/sshd_config.debathena
6DEB_TRANSFORM_FILES_debathena-ssh-server-config += \
7        /etc/default/ssh.debathena
8include /usr/share/cdbs/1/rules/debhelper.mk
9include /usr/share/cdbs/1/rules/config-package.mk
10
11ifeq ($(shell dpkg --compare-versions \
12        "`dpkg-query --showformat='$${Version}' --show openssh-server`" ">=" 1:4.3 && echo y),y)
13
14PRIVSEP = yes
15debian/sshd_config.debathena-orig: /var/lib/dpkg/info/openssh-server.postinst
16        perl -0pe 's/^.*<<EOF[^\n]*\n(.*\n)EOF\n.*$$/$$1/s or die;' $< > $@
17
18else
19
20PRIVSEP = no
21debian/sshd_config.debathena-orig: /var/lib/dpkg/info/ssh-krb5.postinst
22        perl -0pe 's/^.*<<EOF[^\n]*\n(.*\n)EOF\n.*<<EOF[^\n]*\n.*\nEOF\n.*<<EOF[^\n]*\n(.*\n)EOF\n.*<<EOF[^\n]*\n(.*\n)EOF\n.*$$/$$1$$2$$3/s or die;' $< > $@
23
24endif
25
26common-build-indep:: debian/sshd_config.debathena
27
28debian/sshd_config.debathena: debian/sshd_config.debathena-orig
29        perl -0pe ' \
30            s/^#?GSSAPIAuthentication .*$$/GSSAPIAuthentication yes\nGSSAPIKeyExchange yes\nGSSAPIStrictAcceptorCheck no/m and \
31            s/^#?GSSAPICleanupCredentials .*$$/GSSAPICleanupCredentials yes/m and \
32            s/^#?ChallengeResponseAuthentication .*$$/ChallengeResponseAuthentication yes/m and \
33            s/^#?UsePrivilegeSeparation .*$$/UsePrivilegeSeparation $(PRIVSEP)/m and \
34            s/^#?PasswordAuthentication .*$$/PasswordAuthentication no/m or die;' $< > $@
35
36clean::
37        rm -f debian/sshd_config.debathena debian/sshd_config.debathena-orig
Note: See TracBrowser for help on using the repository browser.