[openssh-commits] [openssh] 01/04: restorecon the correct directory

git+noreply at mindrot.org git+noreply at mindrot.org
Fri Feb 26 01:08:25 AEDT 2021


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit 333e25f7bc43cee6e36f766e39dad6f9918b318c
Author: Jakub Jelen <jjelen at redhat.com>
Date:   Tue Sep 29 10:00:01 2020 +0000

    restorecon the correct directory
    
    if using different path for authorized_keys file
    
    SSH-Copy-ID-Upstream: 791a3df47b48412c726bff6f7b1d190721e65d51
---
 contrib/ssh-copy-id | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/ssh-copy-id b/contrib/ssh-copy-id
index cd1835c1..3105e78b 100644
--- a/contrib/ssh-copy-id
+++ b/contrib/ssh-copy-id
@@ -256,7 +256,7 @@ installkeys_sh() {
 	  cat >> ${AUTH_KEY_FILE} ||
 	  exit 1;
 	if type restorecon >/dev/null 2>&1; then
-	  restorecon -F .ssh ${AUTH_KEY_FILE};
+	  restorecon -F $(dirname "${AUTH_KEY_FILE}") ${AUTH_KEY_FILE};
 	fi
 EOF
   )

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list