Newbie questions
Hello!
I have been looking at macros/program/mozilla_macros.te in file (ver 1.26)
Mozilla seems to run in its own derived domain(based on the user running it). It then seems to create these domain transitions for many execs such as:
-> To a derived domain on calling a java program
-> To specialized domains on exec of mplayer, lpr etc
Q1. Is the idea here for SELinux to create specialized domains for all possible desktop apps (on the server side it seems the plan is to eventually confine all daemons)? If not then any SELinux unaware app on exec will run within Mozilla domain if called form within the browser (viewers/players/editors)?
What about invocation from shell...will it then run within user_t domain?
Q2 When I ran an strace on mozilla opening a document using xpdf it seemed to call a clone() which then exec to xpdf rather than call fork(). Are both fork and clone treated identically by the SELinux?
If yes would xpdf then run inside the prefix_mozilla_t domain (since SELinux seems be xpdf unaware)
I am sorry I pbbly could answer some of these questions empirically but I haven't installed the policy. Btw is there a play machine out there with 1.26
installed?
Thanks
-Gaurav
--
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 4 lines
Q1. Is the idea here for SELinux to create specialized domains for all possible desktop apps (on the server side it seems the plan is to eventually confine all daemons)?
I think that's what the plan is/was...whether this is actually possible remains to be discovered. Desktop apps are very difficult to deal with, since they tend to be highly complex, and interact in complicated ways.
Quoted 4 lines
If not then any SELinux unaware app on
exec will run within Mozilla domain if called form within the browser (viewers/players/editors)?
The app does not have to be SELinux aware - this is done automatically for the app, based on policy. Applications which do not have a transition defined in policy from mozilla to a different type continue to run as mozilla (and usually get lots of denials).
Quoted 2 lines
What about invocation from shell...will it then run within
user_tdomain?
That depends on whether or not transitions are defined from user_t to a different domain upon executing the application. If no policy has been written for an application, for example, it would run as user_t (and as $1_mozilla_t in the case above).
--
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 7 lines · Ivan Gyurdiev
Quoted 4 lines
Q1. Is the idea here for SELinux to create specialized domains for all possible desktop apps (on the server side it seems the plan is to eventually confine all daemons)?
I think that's what the plan is/was...whether this is actually possible remains to be discovered. Desktop apps are very difficult to deal with, since they tend to be highly complex, and interact in complicated ways.
one of those complexities is well illustrated by KDE's favourite game: doing an optimisation job which should otherwise really be done by the kernel, the compiler or the linker.
for example, prior to the existence of prelink, a tool for prelinking dynamically linked libraries and preallocating fixed locations right across the board of all .sos and their references in all programs that use them - yes it takes about an hour to run prelink on a desktop system - the kde team came up with "kdeinit".
kdeinit is a program that preloads virtually every component of the kde system instead of as independent executables as .so libraries.
then, instead of exec()ing new programs, a fork() is performed instead and the alternative .so called. so, you run kdesktop - actually it's kdeinit loading the kde_kdesktop.so - and that runs the kde start menu program - and actually it's kdeinit loading the kde_kstartmenu.so.
the fork()ed process has all of the previously called dynamically allocated library functions already sorted.
a similar thing was done with the networking: one program, the kde io handler, will fork() and maintain a cache of outgoing connections, whereby you will be presented with access to those network connections via the kde io handler, which performs proxying on your behalf via unix domain sockets.
the idea is to have the kde io handler "cache" connections such as authenticated IMAP, POP3, SSL connections, HTTP connections which required a password - that sort of thing.
fortunately, the KDE team saw fit to do away with both these things if you set some environment variables, one of which is only active in KDE 3.4 and above.
export KDE_IS_PRELINKED="1" will stop the kdeinit silliness and
export KDE_EXECS_SLAVES="1" will stop the io slave silliness.
i pointed out to the kde development team that their cacheing of network connections presents quite a serious security risk, namely that any one program (e.g. irc) could be compromised and end up hacking in to _all_ outgoing network connections.
they were quite good about it and did actually acknowledge that there was a potential problem.
i don't know if anything came of my pointing it out, though.
l.
--
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.