[openssh/f16] add the restorecon call to ssh-copy-id - it might be needed on older distributions (#739989)
plautrba
plautrba at fedoraproject.org
Wed Nov 23 17:09:49 UTC 2011
commit fd9ff22aaf4251ece07ce049b03e7c1f798bcf63
Author: Tomas Mraz <tmraz at fedoraproject.org>
Date: Mon Nov 21 09:03:05 2011 +0100
add the restorecon call to ssh-copy-id - it might be needed on older distributions (#739989)
openssh-5.8p2-copy-id-restorecon.patch | 12 ++++++++++++
openssh.spec | 3 +++
2 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/openssh-5.8p2-copy-id-restorecon.patch b/openssh-5.8p2-copy-id-restorecon.patch
new file mode 100644
index 0000000..5ebd5eb
--- /dev/null
+++ b/openssh-5.8p2-copy-id-restorecon.patch
@@ -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:
diff --git a/openssh.spec b/openssh.spec
index 93c0183..217dbfa 100644
--- a/openssh.spec
+++ b/openssh.spec
@@ -196,6 +196,8 @@ Patch66: openssh-5.8p2-ipv6man.patch
Patch67: openssh-5.8p2-unconfined.patch
#?
Patch69: openssh-5.8p2-askpass-ld.patch
+#https://bugzilla.redhat.com/show_bug.cgi?id=739989
+Patch70: openssh-5.8p2-copy-id-restorecon.patch
#---
#https://bugzilla.mindrot.org/show_bug.cgi?id=1604
# sctp
@@ -434,6 +436,7 @@ popd
%patch66 -p1 -b .ipv6man
%patch67 -p1 -b .unconfined
%patch69 -p1 -b .askpass-ld
+%patch70 -p1 -b .restorecon
autoreconf
pushd pam_ssh_agent_auth-%{pam_ssh_agent_ver}
More information about the scm-commits
mailing list