Bug 1614

Summary: ssh-copy-id doesn't seem to set correct selinux permissions
Product: Portable OpenSSH Reporter: jchadima
Component: MiscellaneousAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED FIXED    
Severity: normal CC: djm, jchadima
Priority: P2    
Version: 5.2p1   
Hardware: Other   
OS: Linux   
Bug Depends on:    
Bug Blocks: 1980    
Attachments:
Description Flags
patch solving the problem
none
Patch suitable for openssh-5.6p1
none
openssh-selinux-sshdir.patch
djm: ok+
Patch repaired for the SELinux environment without loaded rules none

Description jchadima 2009-06-30 22:03:48 AEST
Created attachment 1655 [details]
patch solving the problem

Using ssh-copy-id to copy a ssh key to a new f11 host that has selinux enabled,
the authorized_keys file is created on the remote host with an incorrect
context.
Comment 1 jchadima 2010-09-03 23:15:10 AEST
Created attachment 1917 [details]
Patch suitable for openssh-5.6p1
Comment 2 Darren Tucker 2010-09-10 11:11:22 AEST
Created attachment 1922 [details]
openssh-selinux-sshdir.patch

equivalent patch that won't break every non-linux non-selinux platform.
Comment 3 Darren Tucker 2010-09-10 11:19:58 AEST
Comment on attachment 1922 [details]
openssh-selinux-sshdir.patch

why is this even necessary?
Comment 4 jchadima 2010-09-13 18:49:52 AEST
(In reply to comment #3)
> Comment on attachment 1922 [details]
> openssh-selinux-sshdir.patch
> 
> why is this even necessary?
because without it, the files/directories created are unaccessible for ssh/sshd on some installations.
Comment 5 jchadima 2010-09-13 20:32:33 AEST
Created attachment 1923 [details]
Patch repaired for the SELinux environment without loaded rules

Change patch to work correctly on SELinux environment without loaded SELinux rules.
Comment 6 Damien Miller 2013-02-08 10:40:16 AEDT
This is fixed in the proposed ssh-copy-id rewrite in bug #1980
Comment 7 Damien Miller 2013-03-22 12:02:01 AEDT
mark bugs closed by openssh-6.2 release as CLOSED