Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 455856 - Func needs to maintain SELinux file context
Summary: Func needs to maintain SELinux file context
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: func
Version: 10
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Bryan Kearney
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-07-18 12:27 UTC by Daniel Walsh
Modified: 2014-01-21 23:03 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-12-18 06:15:17 UTC


Attachments (Terms of Use)

Description Daniel Walsh 2008-07-18 12:27:22 UTC
Description of problem:

Not sure if this is a bug or not, since I have never used func.  We found puppet
was not respecting SELinux labeling and causing files to be mislabed which can
break the system.  When Func installs files it has to make sure the labels on
the files are correct for that system.  As an example if func installed an
update to /etc/services or /etc/nsswitch and labeled it incorrectly most of the
confined network daemons would start to get access denied and may blow up.

SELinux has a couple of system calls that can be used to assure this.  C, Python
and Ruby bindings now exist for libselinux.

( rc, con) = matchpathcon(PATH,MODE)

Will give you an SELinux file context to assign to a file.

setfscreatecon(file, con)

Tells the kernel that all files in the future created by this process will be
created with the context "con".

setfilecon(file, con)  Change the file context of an existing file to "con".

If you already do this correctly then thanks, and close this bugzilla.

Comment 1 Michael DeHaan 2008-07-18 12:46:57 UTC
Daniel,

Thanks for the heads up.

If using the copyfile module right now (which is essentially just scp) it would
just depend on the current directory/file context.   I am not sure if we have
this bug or not, but I imagine if files in /etc have different context and we
overwrite one with the equivalent of a scp, how that context might not be the same?

Func is a Python app, so I suppose we will need to look into the shell
equivalents if there is not a selinux python module available.  Might be neat to
have one :)



Comment 2 Daniel Walsh 2008-07-18 13:56:43 UTC
If the file exists it would be best to keep the current context.  Probably what
you do now.   I probably should open a similar bug on scp.  There are python
bindings,  most of SELinux tools are written in python and the pseudo code I
wrote above is python based.

I guess if you could just experiment and distribute a /etc/resolv.conf and make
sure it ends up as net_conf_t.  Try with the resolv.conf file there and with it
missing.


Comment 3 Bug Zapper 2008-11-26 02:34:47 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 5 Bug Zapper 2009-11-18 12:36:55 UTC
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 6 Bug Zapper 2009-12-18 06:15:17 UTC
Fedora 10 changed to end-of-life (EOL) status on 2009-12-17. Fedora 10 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.