deleting all files in /var/log
Subsystems (2)
has anyone tried this?
because i have... and things like /var/log/dmesg cannot be recreated under the present selinux policy, which bans initrc_t from write and add_name permissions to /var/log.
l.
Signature · 13 lines
-- Truth, honesty and respect are rare commodities that all spring from the same well: Love. If you love yourself and everyone and everything around you, funnily and coincidentally enough, life gets a lot better. -- <a href="http://lkcl.net"> lkcl.net </a> <br /> <a href="mailto:[email protected]"> [email protected] </a> <br /> -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 5 lines · Luke Kenneth Casson Leighton
has anyone tried this?
because i have... and things like
/var/log/dmesgcannot be recreated under the present selinux policy, which bansinitrc_tfrom write andadd_namepermissions to/var/log.
That's bizarre. On my machine initrc_t doesn't get any access to var_log_t:dir so I wonder how it gets to do anything to the file.
The attached patch fixes it.
Signature · 4 lines
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark http://www.coker.com.au/postal/ Postal SMTP/POP benchmark http://www.coker.com.au/~russell/ My home page
program/initrc.te renamed from usr/src/se/policy/domains/program/initrc.te +1 -0
@@ -139,6 +139,7 @@ # Update /var/log/wtmp and /var/log/dmesg. allow initrc_t wtmp_t:file { setattr rw_file_perms }; +allow initrc_t var_log_t:dir rw_dir_perms; allow initrc_t var_log_t:file { setattr rw_file_perms }; allow initrc_t lastlog_t:file { setattr rw_file_perms };