add back the restorecon call to ssh-copy-id - it might be needed on older

distributions (#739989)
This commit is contained in:
Tomas Mraz 2011-11-21 09:03:05 +01:00
parent 2aa158e869
commit 4fc167470d
2 changed files with 20 additions and 1 deletions

View File

@ -0,0 +1,12 @@
diff -up openssh-5.9p1/contrib/ssh-copy-id.restorecon openssh-5.9p1/contrib/ssh-copy-id
--- openssh-5.9p1/contrib/ssh-copy-id.restorecon 2011-08-17 04:05:49.000000000 +0200
+++ openssh-5.9p1/contrib/ssh-copy-id 2011-11-21 08:40:56.000000000 +0100
@@ -41,7 +41,7 @@ fi
# strip any trailing colon
host=`echo $1 | sed 's/:$//'`
-{ eval "$GET_ID" ; } | ssh $host "umask 077; test -d ~/.ssh || mkdir ~/.ssh ; cat >> ~/.ssh/authorized_keys" || exit 1
+{ eval "$GET_ID" ; } | ssh $host "umask 077; test -d ~/.ssh || mkdir ~/.ssh ; cat >> ~/.ssh/authorized_keys && (test -x /sbin/restorecon && /sbin/restorecon ~/.ssh ~/.ssh/authorized_keys >/dev/null 2>&1 || true)" || exit 1
cat <<EOF
Now try logging into the machine, with "ssh '$host'", and check in:

View File

@ -75,7 +75,7 @@
# Do not forget to bump pam_ssh_agent_auth release if you rewind the main package release to 1 # Do not forget to bump pam_ssh_agent_auth release if you rewind the main package release to 1
%define openssh_ver 5.9p1 %define openssh_ver 5.9p1
%define openssh_rel 12 %define openssh_rel 13
%define pam_ssh_agent_ver 0.9.2 %define pam_ssh_agent_ver 0.9.2
%define pam_ssh_agent_rel 32 %define pam_ssh_agent_rel 32
@ -192,6 +192,8 @@ Patch707: openssh-5.9p1-redhat.patch
Patch708: openssh-5.9p1-entropy.patch Patch708: openssh-5.9p1-entropy.patch
#https://bugzilla.mindrot.org/show_bug.cgi?id=1640 (WONTFIX) #https://bugzilla.mindrot.org/show_bug.cgi?id=1640 (WONTFIX)
Patch709: openssh-5.9p1-vendor.patch Patch709: openssh-5.9p1-vendor.patch
#?
Patch710: openssh-5.9p1-copy-id-restorecon.patch
#http://www.sxw.org.uk/computing/patches/openssh.html #http://www.sxw.org.uk/computing/patches/openssh.html
Patch800: openssh-5.9p1-gsskex.patch Patch800: openssh-5.9p1-gsskex.patch
@ -437,6 +439,7 @@ popd
%patch707 -p1 -b .redhat %patch707 -p1 -b .redhat
%patch708 -p1 -b .entropy %patch708 -p1 -b .entropy
%patch709 -p1 -b .vendor %patch709 -p1 -b .vendor
%patch710 -p1 -b .restorecon
%patch800 -p1 -b .gsskex %patch800 -p1 -b .gsskex
%patch801 -p1 -b .force_krb %patch801 -p1 -b .force_krb
@ -782,6 +785,10 @@ fi
%endif %endif
%changelog %changelog
* Mon Nov 21 2011 Tomas Mraz <tmraz@redhat.com> - 5.9p1-13 + 0.9.2-32
- add back the restorecon call to ssh-copy-id - it might be needed on older
distributions (#739989)
* Fri Nov 18 2011 Tomas Mraz <tmraz@redhat.com> - 5.9p1-12 + 0.9.2-32 * Fri Nov 18 2011 Tomas Mraz <tmraz@redhat.com> - 5.9p1-12 + 0.9.2-32
- still support /etc/sysconfig/sshd loading in sshd service (#754732) - still support /etc/sysconfig/sshd loading in sshd service (#754732)
- fix incorrect key permissions generated by sshd-keygen script (#754779) - fix incorrect key permissions generated by sshd-keygen script (#754779)