file creation and selinux

Ed Greshko <[email protected]>
Newsgroups gmane.linux.redhat.fedora.selinux
Message-ID <[email protected]>
Hi,

I'm not well versed in selinux and I rarely have run into issues with it. 

However, one point that I thought was true doesn't seem to be true.  I was under the
impression that when a file is created and the context for it is defined in the policy it
would acquire it.

For example,

[egreshko@meimei ~]$ pwd
/home/egreshko

[egreshko@meimei ~]$ touch .fetchmailrc
[egreshko@meimei ~]$ ls -Z .fetchmailrc
unconfined_u:object_r:user_home_t:s0 .fetchmailrc

[egreshko@meimei ~]$ restorecon .fetchmailrc
[egreshko@meimei ~]$ ls -Z .fetchmailrc
unconfined_u:object_r:fetchmail_home_t:s0 .fetchmailrc

Shouldn't the context have been correct when the file was created?  How is an average user
to know they may need to add the additional step.

Thanks

-- 
Right: I dislike the default color scheme Wrong: What idiot picked the default color scheme
_______________________________________________
selinux mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.