AVC Messages
Hello All,
I am very new to SELinux. I have some questions, and I hope you all forgive me if they have been asked before.
1. Is it possible to prevent the avc 'granted' or 'denied' messages off? If so, how?
2. Can I write my own policy file from scratch and use only the functions necessary for my purpose?
3. Will SELinux be incorporated in to the next kernel release?
Thank you for your time in advance.
Warren Lerner
Quoted 5 lines · Warren Lerner
I am very new to SELinux. I have some questions, and I hope you all forgive me if they have been asked before.
1. Is it possible to prevent the avc 'granted' or 'denied' messages off? If so, how?
Granted messages are only generated if you have specified auditallow rules in the configuration. Denied messages are always generated unless you specify auditdeny rules in the configuration. A recently posted patch (also committed to the sourceforge CVS tree) changes the 'auditdeny' rules' to 'dontaudit' rules and provides more intuitive semantics. See the "Configuring the SELinux Policy" report for the precise syntax, or look at examples in the example policy configuration.
Quoted 2 lines
2. Can I write my own policy file from scratch and use only the functions necessary for my purpose?
Of course. But writing a policy from scratch is nontrivial. As with the prior question, please read the aforementioned report.
Quoted 1 line
3. Will SELinux be incorporated in to the next kernel release?
The LSM kernel patch, on which SELinux is now based, will _hopefully_ be incorporated into the 2.5 development series. But obviously that isn't under our control.
--
Stephen D. Smalley, NAI Labs
[email protected]
--
You have received this message because you are subscribed to the selinux 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 · Stephen Smalley
Quoted 2 lines
2. Can I write my own policy file from scratch and use only the functions necessary for my purpose?
Of course. But writing a policy from scratch is nontrivial. As with the prior question, please read the aforementioned report.
Writing a policy starting from the sample policy is not trivial either. Even starting from my sample policy (the NSA sample tree plus quite a number of things I've written) it still takes a bit of work.
I spent about 3 hours configuring the policy for the SE Debian machine at LinuxTag. 3 hours for an expert to configure a shell server with hostile users which is also a FTP server is not very good.
Things are being improved though, my latest sample policy tree is much more complete, and before OLS I aim to get all the features of the LinuxTag setup in my standard default policy and submitted to Stephen.
At that time a typical box with no unusual daemons could be setup by an expert in 10 minutes, and by a novice in a few hours.
Signature · 3 lines
I do not get viruses because I do not use MS software. If you use Outlook then please do not put my email address in your address-book so that WHEN you get a virus it won't use my address in the
Quoted 1 line
From field.
--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 2 lines · Warren Lerner
1. Is it possible to prevent the avc 'granted' or 'denied' messages off? If so, how?
There is no way to turn them all off. You can put in rules that match large numbers of them though, consider the following:
dontaudit domain file_type:{ file lnk_file fifo_file } create_file_perms; dontaudit domain file_type:dir create_dir_perms;
But that's probably not what you really want. When you put SE Linux in enforcing mode it's a real PITA to have things not work and no messages to explain why (I recently had some problems when I put in dontaudit rules for almost every action on /tmp and then X stopped working).
As for granted, avc_toggle is the only thing (AFAIK) that gets granted without you explicitely requesting it.
Quoted 2 lines
2. Can I write my own policy file from scratch and use only the functions necessary for my purpose?
Sure!
Quoted 1 line
3. Will SELinux be incorporated in to the next kernel release?
I doubt it. But hopefully LSM will be, and once your kernel has the base LSM code SE Linux will apply cleanly and easily.
I would prefer to see SE Linux stay out of the main kernel (for several reasons) and see just LSM go in.
Signature · 3 lines
I do not get viruses because I do not use MS software. If you use Outlook then please do not put my email address in your address-book so that WHEN you get a virus it won't use my address in the
Quoted 1 line
From field.
--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.