Skip to content

Commit

Permalink
Fix strange file patterns
Browse files Browse the repository at this point in the history
Some file patterns look very strange, like:

    /var/log/cluster/.*\.*log

I've found such patterns while writing a script that parses the file patterns.
Hence I haven't tested if the new file contexts apply to the existing files.
For example, this patch changes

    /var/run/*.fingerd\.pid

to

    /var/run/fingerd\.pid

because "/*" seems weird to me, but this also changes the semantic of the
pattern.  Another possibility which doesn't change the meaning is:

    /var/run/?.fingerd\.pid

I send this patch as an RFC because what I consider abnormal may in fact be
something expected or a workaround to fix some bugs I'm not aware of.
  • Loading branch information
fishilico authored and pebenito committed Apr 11, 2014
1 parent b045ede commit 50ac799
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion finger.fc
Expand Up @@ -7,4 +7,4 @@

/var/log/cfingerd\.log.* -- gen_context(system_u:object_r:fingerd_log_t,s0)

/var/run/*.fingerd\.pid -- gen_context(system_u:object_r:fingerd_var_run_t,s0)
/var/run/fingerd\.pid -- gen_context(system_u:object_r:fingerd_var_run_t,s0)
2 changes: 1 addition & 1 deletion rhcs.fc
Expand Up @@ -14,7 +14,7 @@

/var/lib/qdiskd(/.*)? gen_context(system_u:object_r:qdiskd_var_lib_t,s0)

/var/log/cluster/.*\.*log <<none>>
/var/log/cluster/.*\.log <<none>>
/var/log/cluster/dlm_controld\.log.* -- gen_context(system_u:object_r:dlm_controld_var_log_t,s0)
/var/log/cluster/fenced\.log.* -- gen_context(system_u:object_r:fenced_var_log_t,s0)
/var/log/cluster/gfs_controld\.log.* -- gen_context(system_u:object_r:gfs_controld_var_log_t,s0)
Expand Down
2 changes: 1 addition & 1 deletion setroubleshoot.fc
@@ -1,6 +1,6 @@
/usr/sbin/setroubleshootd -- gen_context(system_u:object_r:setroubleshootd_exec_t,s0)

/usr/share/setroubleshoot/SetroubleshootFixit\.py* -- gen_context(system_u:object_r:setroubleshoot_fixit_exec_t,s0)
/usr/share/setroubleshoot/SetroubleshootFixit\.py -- gen_context(system_u:object_r:setroubleshoot_fixit_exec_t,s0)

/var/run/setroubleshoot(/.*)? gen_context(system_u:object_r:setroubleshoot_var_run_t,s0)

Expand Down

0 comments on commit 50ac799

Please sign in to comment.