]> git.pld-linux.org Git - packages/openssh.git/commitdiff
- restore selinux flags
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Tue, 17 Aug 2004 17:35:10 +0000 (17:35 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    opensshd.init -> 1.23

opensshd.init

index 8fba73144f9688b059732a97d5567623c1bdca79..e5da21e7c188a417f670b1b1cdcd48223e0abfab 100644 (file)
@@ -38,14 +38,17 @@ case "$1" in
        if [ ! -f /etc/ssh/ssh_host_key -o ! -s /etc/ssh/ssh_host_key ]; then
                /usr/bin/ssh-keygen -t rsa1 -f /etc/ssh/ssh_host_key -N '' 1>&2
                chmod 600 /etc/ssh/ssh_host_key
+               [ -x /sbin/restorecon ] && /sbin/restorecon /etc/ssh/ssh_host_key || :
        fi
        if [ ! -f /etc/ssh/ssh_host_rsa_key -o ! -s /etc/ssh/ssh_host_rsa_key ]; then
                /usr/bin/ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N '' 1>&2
                chmod 600 /etc/ssh/ssh_host_rsa_key
+               [ -x /sbin/restorecon ] && /sbin/restorecon /etc/ssh/ssh_host_rsa_key || :
        fi
        if [ ! -f /etc/ssh/ssh_host_dsa_key -o ! -s /etc/ssh/ssh_host_dsa_key ]; then
                /usr/bin/ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N '' 1>&2
                chmod 600 /etc/ssh/ssh_host_dsa_key
+               [ -x /sbin/restorecon ] && /sbin/restorecon /etc/ssh/ssh_host_dsa_key || :
        fi
 
        if [ ! -f /etc/ssh/ssh_host_key ]; then
@@ -87,11 +90,14 @@ case "$1" in
        nls "will use password for the key, you will need to type it on each"
        nls "reboot."
        /usr/bin/ssh-keygen -t rsa1 -f /etc/ssh/ssh_host_key
+       [ -x /sbin/restorecon ] && /sbin/restorecon /etc/ssh/ssh_host_key || :
        chmod 600 /etc/ssh/ssh_host_key
        /usr/bin/ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
+       [ -x /sbin/restorecon ] && /sbin/restorecon /etc/ssh/ssh_host_rsa_key || :
        chmod 600 /etc/ssh/ssh_host_rsa_key
        /usr/bin/ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
        chmod 600 /etc/ssh/ssh_host_dsa_key
+       [ -x /sbin/restorecon ] && /sbin/restorecon /etc/ssh/ssh_host_dsa_key || :
        exit $?
        ;;
   reload|force-reload)
This page took 0.034242 seconds and 4 git commands to generate.