All of lore.kernel.org
 help / color / mirror / Atom feed
* file_type_auto_trans is not sufficient
@ 2005-05-28  3:09 Ivan Gyurdiev
  2005-05-28  3:47 ` Ivan Gyurdiev
  2005-05-31 13:18 ` Stephen Smalley
  0 siblings, 2 replies; 29+ messages in thread
From: Ivan Gyurdiev @ 2005-05-28  3:09 UTC (permalink / raw)
  To: SELinux; +Cc: dwalsh

As part of my current project, I am running into a large number of cases
where file_type_auto_trans is not an acceptable solution for changing
the context for a newly created file/directory. This always
happens in a conflicting-transition scenario (very common):

For example:

1) 
libgnome needs to create .gnome2 and .gnome2_private with
a context that differs from the parent directory. Applications
that link to libgnome may already have a transition defined 
for (ROLE_home_dir_t: dir)

2)
libfontconfig needs to create .font.cache-# with
a context that differs from the parent directory. Same
problem for (ROLE_hime_dir_t: file)

3) 
Mail apps need to be able to save mail to $HOME
under some context (likely ROLE_untrusted_content_t:file/dir).
Same goes for web content saved by mozilla. This conflicts
with the usual transition.

4) 
libORBit2 needs to create /tmp/orbit-$USER... with a specific
context while the app may have its own tmp_domain. Same for libICE.

===============

To address those problems, I think I need to add selinux support
to a number of applications, and perform the transition in the code. 
I'm not sure what's the best way to do that. Does adding 
the following functions to libselinux (or elsewhere) make sense?

int mkdir_restorecon(const char *pathname, mode_t mode);
int creat_restorecon(const char *pathname, mode_t mode);
int mknod_restorecon(const char *pathname, mode_t mode, dev_t dev);

Those would perform getfscreate/matchpathcon/setfscreate cycle,
and would ignore errors in permissive mode.

-- 
Ivan Gyurdiev <ivg2@cornell.edu>
Cornell University


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2005-06-01 11:31 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-28  3:09 file_type_auto_trans is not sufficient Ivan Gyurdiev
2005-05-28  3:47 ` Ivan Gyurdiev
2005-05-28  5:24   ` Daniel J Walsh
2005-05-29  3:17     ` Ivan Gyurdiev
2005-05-29 10:52       ` Daniel J Walsh
2005-05-29 17:44         ` Ivan Gyurdiev
2005-05-30  3:03           ` Ivan Gyurdiev
2005-05-30  8:05             ` Ivan Gyurdiev
2005-05-31 13:36               ` Stephen Smalley
2005-05-31 15:09                 ` Ivan Gyurdiev
2005-05-31 13:18 ` Stephen Smalley
2005-05-31 13:35   ` Ivan Gyurdiev
2005-05-31 13:53     ` Stephen Smalley
2005-05-31 14:12     ` Karl MacMillan
2005-05-31 14:57       ` Ivan Gyurdiev
2005-05-31 16:32         ` Karl MacMillan
2005-05-31 16:48           ` Ivan Gyurdiev
2005-05-31 17:07             ` Stephen Smalley
2005-05-31 17:37               ` Ivan Gyurdiev
2005-05-31 17:39                 ` Stephen Smalley
2005-05-31 18:05                   ` Ivan Gyurdiev
2005-05-31 21:10                 ` Luke Kenneth Casson Leighton
2005-05-31 21:12             ` Luke Kenneth Casson Leighton
2005-05-31 21:21         ` Luke Kenneth Casson Leighton
2005-05-31 21:21           ` Luke Kenneth Casson Leighton
2005-05-31 23:09           ` Chad Sellers
2005-06-01  0:02             ` Luke Kenneth Casson Leighton
2005-06-01 11:21           ` Stephen Smalley
2005-06-01 11:21             ` Stephen Smalley

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.