Commit Graph

16 Commits (b50c50748ee4736c4880b0305499ea4f1fd954a4)

Author SHA1 Message Date
Michael DeHaan 80e6d83660 Fix bug in library/file 13 years ago
Stephen Fromm be58995278 Add context=default option to file module
This adjusts behavior of file module such that removal of se* option
does not revert the file's selinux context to the default.  In order to
go back to the default context according to the policy, you can use the
context=default option.
13 years ago
Michael DeHaan c0c691089d Fix bug in src. Should not code this early :) 13 years ago
Michael DeHaan 7794493952 Don't try to expand path for None values 13 years ago
Michael DeHaan 445e48b991 Call os.path.expanduser in modules so things work as expected even when using ./hacking/test-module script 13 years ago
Stephen Fromm 28895f6615 Rename serange to selevel to be consistent with selinux docs 13 years ago
Stephen Fromm 1e5d34ba35 Add selinux support to file module
This adds the options: seuser, serole, setype, and serange to the file
module.  If the python selinux module doesn't exist, this will set
HAVE_SELINUX to False and punt in the related modules.

This takes the options the user provides and applies those to the
default selinux context as provided from matchpathcon().  If there is no
default context, this uses the value from the current context.  This
implies that if you set the setype and later remove it, the file module
will rever the setype to the default if available.
13 years ago
Michael DeHaan 4792021f47 Fix syntax error in user patch 13 years ago
Matthew Williams ae38ee0b3f protecting against replacing file or directory with link 13 years ago
Matthew Williams 24f61f1583 "link" state in file module 13 years ago
Michael DeHaan 60bf82d266 Remove comment about FIXME that is already resolved 13 years ago
Michael DeHaan 311b93995c Add some comments 13 years ago
Michael DeHaan 6874d853c9 Fix changed=True/False detection when specifying mode= 13 years ago
Michael DeHaan 4ad885111b Disable debug 13 years ago
Michael DeHaan 5004d21f10 Return file info about the file regardless of changes made 13 years ago
Michael DeHaan be55145a1e Initial crack at the file module 13 years ago