summaryrefslogtreecommitdiff
path: root/debian/openssh-server.postinst
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2017-03-09 11:20:38 +0000
committerColin Watson <cjwatson@debian.org>2017-03-30 00:20:13 +0100
commitdeabedcd80fd145a2eb350ad5a6a34670750a755 (patch)
treeb366443eb1d45623f950eceec42bbe59c3888b32 /debian/openssh-server.postinst
parent48ad3d219f0d19d28bd1fe26abd348515477fa6f (diff)
Move privilege separation directory and PID file from /var/run/ to /run/ (closes: #760422, #856825).
Diffstat (limited to 'debian/openssh-server.postinst')
-rw-r--r--debian/openssh-server.postinst8
1 files changed, 4 insertions, 4 deletions
diff --git a/debian/openssh-server.postinst b/debian/openssh-server.postinst
index 90d346674..f0ebe48b8 100644
--- a/debian/openssh-server.postinst
+++ b/debian/openssh-server.postinst
@@ -111,7 +111,7 @@ fix_statoverride() {
111 111
112setup_sshd_user() { 112setup_sshd_user() {
113 if ! getent passwd sshd >/dev/null; then 113 if ! getent passwd sshd >/dev/null; then
114 adduser --quiet --system --no-create-home --home /var/run/sshd --shell /usr/sbin/nologin sshd 114 adduser --quiet --system --no-create-home --home /run/sshd --shell /usr/sbin/nologin sshd
115 fi 115 fi
116} 116}
117 117
@@ -125,14 +125,14 @@ if [ "$action" = configure ]; then
125 rm -f /etc/ssh/primes 125 rm -f /etc/ssh/primes
126 fi 126 fi
127 if dpkg --compare-versions "$2" lt-nl 1:5.5p1-6; then 127 if dpkg --compare-versions "$2" lt-nl 1:5.5p1-6; then
128 rm -f /var/run/sshd/.placeholder 128 rm -f /run/sshd/.placeholder
129 fi 129 fi
130 if dpkg --compare-versions "$2" lt-nl 1:6.2p2-3 && \ 130 if dpkg --compare-versions "$2" lt-nl 1:6.2p2-3 && \
131 which initctl >/dev/null && initctl version 2>/dev/null | grep -q upstart && \ 131 which initctl >/dev/null && initctl version 2>/dev/null | grep -q upstart && \
132 ! status ssh 2>/dev/null | grep -q ' start/'; then 132 ! status ssh 2>/dev/null | grep -q ' start/'; then
133 # We must stop the sysvinit-controlled sshd before we can 133 # We must stop the sysvinit-controlled sshd before we can
134 # restart it under Upstart. 134 # restart it under Upstart.
135 start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/sshd.pid || true 135 start-stop-daemon --stop --quiet --oknodo --pidfile /run/sshd.pid || true
136 fi 136 fi
137 if dpkg --compare-versions "$2" lt-nl 1:6.5p1-2 && \ 137 if dpkg --compare-versions "$2" lt-nl 1:6.5p1-2 && \
138 deb-systemd-helper debian-installed ssh.socket && \ 138 deb-systemd-helper debian-installed ssh.socket && \
@@ -146,7 +146,7 @@ if [ "$action" = configure ]; then
146 [ -d /run/systemd/system ]; then 146 [ -d /run/systemd/system ]; then
147 # We must stop the sysvinit-controlled sshd before we can 147 # We must stop the sysvinit-controlled sshd before we can
148 # restart it under systemd. 148 # restart it under systemd.
149 start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/sshd.pid --exec /usr/sbin/sshd || true 149 start-stop-daemon --stop --quiet --oknodo --pidfile /run/sshd.pid --exec /usr/sbin/sshd || true
150 fi 150 fi
151fi 151fi
152 152