summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog2
-rwxr-xr-xdebian/rules9
2 files changed, 9 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index 69d3efef1..b95d21709 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -63,6 +63,8 @@ openssh (1:4.6p1-1) UNRELEASED; urgency=low
63 * Emit a slightly more informative message from the init script if 63 * Emit a slightly more informative message from the init script if
64 /dev/null has somehow become not a character device (closes: #369964). 64 /dev/null has somehow become not a character device (closes: #369964).
65 * Belatedly build-depend on zlib1g-dev (>= 1:1.2.3-1) (closes: #333447). 65 * Belatedly build-depend on zlib1g-dev (>= 1:1.2.3-1) (closes: #333447).
66 * Build position-independent executables (only for debs, not for udebs) to
67 take advantage of address space layout randomisation.
66 68
67 -- Colin Watson <cjwatson@ubuntu.com> Tue, 12 Jun 2007 14:31:01 +0100 69 -- Colin Watson <cjwatson@ubuntu.com> Tue, 12 Jun 2007 14:31:01 +0100
68 70
diff --git a/debian/rules b/debian/rules
index 8f8eed1b8..76dc5d83c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,6 +12,11 @@ else
12OPTFLAGS := -O0 12OPTFLAGS := -O0
13endif 13endif
14 14
15# Use position-independent executables to take advantage of address space
16# layout randomisation. TODO: This should be done in configure.
17PIE_CFLAGS := -fPIE
18PIE_LDFLAGS := -fPIE -pie
19
15DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null) 20DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null)
16 21
17# Take account of old dpkg-architecture output. 22# Take account of old dpkg-architecture output.
@@ -63,7 +68,7 @@ build-deb: build-deb-stamp
63build-deb-stamp: 68build-deb-stamp:
64 dh_testdir 69 dh_testdir
65 mkdir -p build-deb 70 mkdir -p build-deb
66 cd build-deb && $(FORCE_LIBS) ../configure --prefix=/usr --sysconfdir=/etc/ssh --libexecdir=/usr/lib/openssh --mandir=/usr/share/man --with-tcp-wrappers --with-xauth=/usr/bin/X11/xauth --with-default-path=/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games --with-superuser-path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11 --with-pam --with-4in6 --with-privsep-path=/var/run/sshd --without-rand-helper --with-libedit --with-kerberos5=/usr --with-ssl-engine $(SELINUX) 71 cd build-deb && $(FORCE_LIBS) LDFLAGS='$(PIE_LDFLAGS)' ../configure --prefix=/usr --sysconfdir=/etc/ssh --libexecdir=/usr/lib/openssh --mandir=/usr/share/man --with-tcp-wrappers --with-xauth=/usr/bin/X11/xauth --with-default-path=/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games --with-superuser-path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11 --with-pam --with-4in6 --with-privsep-path=/var/run/sshd --without-rand-helper --with-libedit --with-kerberos5=/usr --with-ssl-engine $(SELINUX)
67 72
68ifeq ($(DEB_HOST_ARCH_OS),linux) 73ifeq ($(DEB_HOST_ARCH_OS),linux)
69 # Some 2.2 kernels have trouble with setres[ug]id() (bug #239999). 74 # Some 2.2 kernels have trouble with setres[ug]id() (bug #239999).
@@ -72,7 +77,7 @@ endif
72 # Debian's /var/log/btmp has inappropriate permissions. 77 # Debian's /var/log/btmp has inappropriate permissions.
73 perl -pi -e 's,.*#define USE_BTMP .*,/* #undef USE_BTMP */,' build-deb/config.h 78 perl -pi -e 's,.*#define USE_BTMP .*,/* #undef USE_BTMP */,' build-deb/config.h
74 79
75 $(MAKE) -C build-deb -j 2 ASKPASS_PROGRAM='/usr/bin/ssh-askpass' CFLAGS='$(OPTFLAGS) -g -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wno-pointer-sign -std=gnu99 -DLOGIN_PROGRAM=\"/bin/login\" -DLOGIN_NO_ENDOPT -DSSHD_PAM_SERVICE=\"ssh\" -DSSH_EXTRAVERSION="\" $(SSH_EXTRAVERSION)\""' 80 $(MAKE) -C build-deb -j 2 ASKPASS_PROGRAM='/usr/bin/ssh-askpass' CFLAGS='$(OPTFLAGS) $(PIE_CFLAGS) -g -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wno-pointer-sign -std=gnu99 -DLOGIN_PROGRAM=\"/bin/login\" -DLOGIN_NO_ENDOPT -DSSHD_PAM_SERVICE=\"ssh\" -DSSH_EXTRAVERSION="\" $(SSH_EXTRAVERSION)\""'
76 # Support building on Debian 3.0 (with GNOME 1.4) and later. 81 # Support building on Debian 3.0 (with GNOME 1.4) and later.
77 if [ -f /usr/include/libgnomeui-2.0/gnome.h ]; then \ 82 if [ -f /usr/include/libgnomeui-2.0/gnome.h ]; then \
78 $(MAKE) -C contrib gnome-ssh-askpass2 CC='gcc $(OPTFLAGS) -g -Wall'; \ 83 $(MAKE) -C contrib gnome-ssh-askpass2 CC='gcc $(OPTFLAGS) -g -Wall'; \