emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#25378: closed (cp does not preserve SElinx context


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#25378: closed (cp does not preserve SElinx context of sub folder)
Date: Tue, 21 Feb 2017 03:12:02 +0000

Your message dated Mon, 20 Feb 2017 19:11:15 -0800
with message-id <address@hidden>
and subject line Re: bug#25378: cp does not preserve SElinx context of sub 
folder
has caused the debbugs.gnu.org bug report #25378,
regarding cp does not preserve SElinx context of sub folder
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
25378: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=25378
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: cp does not preserve SElinx context of sub folder Date: Fri, 6 Jan 2017 08:19:11 +0000
Hi coreutils team,

When using cp with --parents options, the SELinux context of sub folders are 
not preserved.

Example as below:

1. Before using cp:
address@hidden etc]# pwd
/etc
address@hidden etc]# ls -Z selinux/
-rw-r--r--. root root system_u:object_r:selinux_config_t:s0 config
-rw-r--r--. root root system_u:object_r:selinux_config_t:s0 semanage.conf
drwxr-xr-x. root root system_u:object_r:selinux_config_t:s0 targeted
address@hidden etc]#  ls -Z -d selinux/
drwxr-xr-x. root root system_u:object_r:selinux_config_t:s0 selinux/


2. Using cp to copy /etc/selinux/targeted/seusers with full path to /tmp
address@hidden etc]# cp -r --preserve=context --parents 
selinux/targeted/seusers  /tmp

3. After using cp, the SELinux context of sub folder are changed, like selinux, 
targeted 

address@hidden etc]# ls -Z /tmp/selinux/
drwx------. root root unconfined_u:object_r:user_tmp_t:s0 targeted
address@hidden etc]# ls -Z -d /tmp/selinux/
drwx------. root root unconfined_u:object_r:user_tmp_t:s0 /tmp/selinux/
address@hidden etc]# ls -Z -d /tmp/selinux/targeted/
drwx------. root root unconfined_u:object_r:user_tmp_t:s0 /tmp/selinux/targeted/
address@hidden etc]# ls -Z /tmp/selinux/targeted/   
-rw-------. root root system_u:object_r:selinux_config_t:s0 seusers

Thanks,
Henry



--- End Message ---
--- Begin Message --- Subject: Re: bug#25378: cp does not preserve SElinx context of sub folder Date: Mon, 20 Feb 2017 19:11:15 -0800 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0
On 06/01/17 00:19, HE Henry wrote:
> Hi coreutils team,
> 
> When using cp with --parents options, the SELinux context of sub folders are 
> not preserved.
> 
> Example as below:
> 
> 1. Before using cp:
> address@hidden etc]# pwd
> /etc
> address@hidden etc]# ls -Z selinux/
> -rw-r--r--. root root system_u:object_r:selinux_config_t:s0 config
> -rw-r--r--. root root system_u:object_r:selinux_config_t:s0 semanage.conf
> drwxr-xr-x. root root system_u:object_r:selinux_config_t:s0 targeted
> address@hidden etc]#  ls -Z -d selinux/
> drwxr-xr-x. root root system_u:object_r:selinux_config_t:s0 selinux/
> 
> 
> 2. Using cp to copy /etc/selinux/targeted/seusers with full path to /tmp
> address@hidden etc]# cp -r --preserve=context --parents 
> selinux/targeted/seusers  /tmp
> 
> 3. After using cp, the SELinux context of sub folder are changed, like 
> selinux, targeted 
> 
> address@hidden etc]# ls -Z /tmp/selinux/
> drwx------. root root unconfined_u:object_r:user_tmp_t:s0 targeted
> address@hidden etc]# ls -Z -d /tmp/selinux/
> drwx------. root root unconfined_u:object_r:user_tmp_t:s0 /tmp/selinux/
> address@hidden etc]# ls -Z -d /tmp/selinux/targeted/
> drwx------. root root unconfined_u:object_r:user_tmp_t:s0 
> /tmp/selinux/targeted/
> address@hidden etc]# ls -Z /tmp/selinux/targeted/   
> -rw-------. root root system_u:object_r:selinux_config_t:s0 seusers

The attached should fix that.

thanks!
Pádraig

Attachment: cp-Z-parents.patch
Description: Text Data


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]