Russell Coker: What is Valid SE Linux Policy?
Guido Trentalancia started an interesting discussion on the SE Linux policy development list about how to manage the evolution of the policy [1].
The Problem
The SE Linux policy is the set of rules that determine what access is granted. It assigns types to files and domains to processes and has a set of rules that specify all the permitted interactions between processes and files (among many other things). The policy evolves over time to match the requirements of programs (applications and daemons). As a program evolves the things that it does will change and the SE Linux policy will tend to evolve to permit the set of all operations that were requested by all versions because people only complain when things stop working not when excessive privilege is granted. So we need to periodically remove old allow rules from the policy.
One difficulty in this regard is the fact that multiple versions of programs are often available for use at the same time. Debian in particular has a good history of providing separate packages for the old and new versions of programs such as Apache to meet the needs of users who want the tried and tested version and of users who want the newer version with better performance, more features, better documentation, or something else good. There is also a demand to have the same policy work with multiple versions of a distribution without excessive effort. Finally all the distributions that have SE Linux support have different people deciding when the new version of a daemon is ready for inclusion and therefore there is a need to support multiple versions for multiple distributions. So support for older versions of daemons can t be removed easily.
One of the things I do to make these things a little easier to manage is to put ifdef( distro_debian', before any Debian specific bits of policy. When policy is conditional and only used in Debian I can freely remove it at any future time if Debian works well without it. Also it doesn t matter if such Debian specific policy allows access that is not needed or desired in other distributions, the only down-side to this is that sometimes other distributions need to repeat work that I did, they determine what access is needed for their configuration and discover that it was already enabled for Debian.
What is Valid Policy?
We went to only have Valid Policy (as described by Christopher J. PeBenito), so the challenge is determining what is Valid Policy.
It seems to me that there are three type of access granted by valid policy (it is debatable whether type #3 is valid):
- Access that is needed for an application to perform it s minimal designed task.
- Access that is needed for the application to perform all the optional configurations, EG an ftpd running from inetd or as a daemon, and daemons like http server being granted access to ssl keys or not.
- Access that is needed to perform all the operations the application requests, but which the application doesn t require or shouldn t require if it worked correctly.
- In most cases this can be determined without too much effort. For example a web server needs to listen on port 80 and read files and directories that relate to data. When writing policy I can write a lot of the allow rules without even testing the application because I know from the design what it will do. A large part of the other access is obvious in a I can t believe I didn t realise it would need this sense.
- The main question here is whether we have booleans (settings which can be tuned at run-time by the sysadmin which determine how the policy works) to specify which optional tasks or whether we allow all access for optional configurations by default. The secondary question is when certain unusual corner cases should be not supported at all such that the people who do such unusual corner cases need to use audit2allow to generate local policy to allow their operations.
- Sometimes we have to allow things that we really don t like. Even when we write policy to allow a daemon to do unusual things (such as using /root instead of /var/lib) it s still a lot better than running without SE Linux. Also SE Linux policy to allow such obviously broken things stands out and is a constant reminder that the daemon needs fixing, this is better than allowing symptoms of broken design to be forgotten.
The major upcoming configuration change in Linux 2.6.39 is to get
rid of the '686' flavour. This may be surprising, because it's the
most widely used flavour of the 4 we have a present:
I was given this Sheevaplug. The idea with plug computers is they look like
just a wall wart, but are a whole computer.
Ideally, a 



As the project for the course System specification and implementation , which introduced the Event-B formalism to us, I modeled the algorithm given in
* Dear Lazyweb,
I have Macbook (Late 2008) model running Debian Sid + Mac OS X (sigh!) and I m facing nice issues which prevents me to full use of disk. They re:
1. CD-ROM drive doesn t work. So, if I want to upgrade to Snow Leopard or anything else, there is no other way.
2. Disk is 160 GB, I want to upgrade to better disk (say with better speed, capacity). Is there any way to clone entire disk (with partition preserved) and use it? Remember: I don t have CD-ROM
3. Is there any way to wipe-out Mac OS X and running Debian with hardware acceleration? I ve noticed that if you single boot Debian, it lacks Video acceleration.
Any pointers towards above 3 is appreciate. I ll hostname my computer if you help me to fix this
As already
Although I often don t agree with
I took part in a occupational-health-related thread recently, and wrote a bit of my experience which might be helpful for my readers, many of them avid keyboard users, with usually 8hr of typing per day.
( ) I suffered not from RSI but from painful back aches. I started using standard keyboards in a different fashion, not putting so much stress on my wrists (and on the muscles connecting them to the rest of the body, of course): I exclusively use US keymaps (with some modifications to allow for proper Spanish input and characters), but instead of making the middle row my fingers' home row, I type with the base position of my fingers in a V shape Fingers resting on (approx.) w-e-f-v-spacebar and spacebar-m-l-;-]; the fingers doing most of the travelling are the index and middle, and with no straining for the little fingers to reach or backspace. On the other side, the most straining keys become Control and Shift, which requires closing the hands a bit too much, but are not that bad. My way does induce some new kind of stress, as my arms also have to move to reach 6 and 7, but it... Works for me .
It looks weird and is somewhat strange to get used to, but I must say it has worked great for me. I work this way on regular and laptop keyboards, even on my netbook's noticeably smaller one.
A new comment on