From: wenzong fan <wenzong.fan@windriver.com>
To: "Patrick Ohly" <patrick.ohly@intel.com>,
"José Bollo" <jobol@nonadev.net>
Cc: "openembedded-core@lists.openembedded.org"
<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] shadow: 'useradd' copies root's extended attributes
Date: Wed, 10 Jan 2018 17:50:19 +0800 [thread overview]
Message-ID: <c8acc16f-41fa-5818-79a5-78e99eaec6af@windriver.com> (raw)
In-Reply-To: <1515517307.6718.17.camel@intel.com>
On 01/10/2018 01:01 AM, Patrick Ohly wrote:
> On Fri, 2018-01-05 at 01:07 +0000, Fan, Wenzong wrote:
>> It works and will override the labels of home dir that SELinux
>> applied, that's the issue.
>>
>> For SELinux enabled system, the user's home dir should have lavel
>> 'user_home_dir_t' instead of 'etc_t', it prevents users from creating
>> files in their home dir.
>
> Sounds like the "copy xattr" function needs to become a bit smarter: it
> needs to understand some of the semantic involved and skip those
> SELinux xattrs that are always meant to be set dynamically by the
> running kernel.
>
> Wenzong, which xattrs are those? Do you agree with the proposed
> solution?
The xattr for selinux is "security.selinux":
$ getfattr -n security.selinux /home/t1
security.selinux="user_u:object_r:user_home_dir_t:s0-s15:c0.c1023"
I think the "attr_copy_file()" is doing right thing, but it should be
used in a limited situation, such as only for Smack ...
Thanks
Wenzong
>
> Jose, can you look into updating your patch accordingly?
>
next prev parent reply other threads:[~2018-01-10 9:45 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-09 14:07 [PATCH] shadow: 'useradd' copies root's extended attributes jobol
2017-03-09 16:07 ` Patrick Ohly
2017-03-09 16:48 ` José Bollo
2017-03-09 17:18 ` Patrick Ohly
2017-03-15 8:04 ` José Bollo
2018-01-04 9:28 ` wenzong fan
2018-01-04 9:31 ` wenzong fan
2018-01-04 10:18 ` José Bollo
2018-01-04 10:41 ` Patrick Ohly
2018-01-04 11:39 ` wenzong fan
2018-01-04 11:50 ` Patrick Ohly
2018-01-05 1:07 ` Fan, Wenzong
2018-01-09 17:01 ` Patrick Ohly
2018-01-10 9:50 ` wenzong fan [this message]
2018-01-15 14:33 ` José Bollo
2018-01-15 16:58 ` Patrick Ohly
2018-01-16 2:53 ` wenzong fan
2018-01-09 17:51 ` Mark Hatle
2018-01-10 11:15 ` Patrick Ohly
-- strict thread matches above, loose matches on Subject: below --
2017-03-13 9:57 jobol
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c8acc16f-41fa-5818-79a5-78e99eaec6af@windriver.com \
--to=wenzong.fan@windriver.com \
--cc=jobol@nonadev.net \
--cc=openembedded-core@lists.openembedded.org \
--cc=patrick.ohly@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox