On Tue, 2007-12-18 at 19:28 -0800, Crispin Cowan wrote:The SELinux API for changing context is described in: http://linux.die.net/man/3/setcon However, setting the current context (SELinux) or profile (AppArmor) for a userspace task doesn't really provide the functionality required here for cachefiles, nor does it solve the (different, yet related) nfsd problem. cachefiles is a kernel module that needs to assume a different set of credentials for its internal accesses to the cache files it manages when a userspace process tries to access a file that has been cached, as the userspace process in whose context it is operating may (and should) lack direct permission to those cache files. The userspace API being talked about is simply how one configures the credentials to be used by cachefiles kernel module for its internal accesses, and is done up front when cachefiles is configured to create a cache. The internal switching of the active set of credentials is done via a kernel-internal API (or just by switching the pointer to the credential structure previously set up) when the cachefiles kernel module wants to access a cache file. Further, when this internal switching occurs, we have to be careful that there are no user-visible side effects on the current task - no change in how others may operate on that task e.g. signal permission checks or on how the task appears to others e.g. via /proc. Neither change_hat nor setcon helps with that problem. For AppArmor, I suspect that you just want the cachefiles kernel module to act as unconfined for its internal accesses, nothing more. -- Stephen Smalley National Security Agency --
| Michał Kudła | [2.6.26-rc5] iwlwifi 4965 not working - last on 2.6.23 |
| monstr | [PATCH 52/60] microblaze_v4: fcntl.h sockios.h ucontext.h |
| James Bottomley | Re: Integration of SCST in the mainstream Linux kernel |
| Nick Piggin | [rfc] no ZERO_PAGE? |
git: | |
| Patrick Altman | Git Library? |
| Jakub Narebski | Re: [RFC] origin link for cherry-pick and revert |
| Avery Pennarun | [bug] Segfault in git rev-list --first-parent --bisect |
| skimo | [PATCH 16/22] unpack-trees.c: optionally clone submodules for later checkout |
| Richard Stallman | Real men don't attack straw men |
| Marco Peereboom | Re: Real men don't attack straw men |
| James Hartley | scp batch mode? |
| Brandon Lee | DELL PERC 5iR slow performance |
| Julius Volz | [PATCH RFC 13/24] IPVS: Add IPv6 support to ip_vs_conn_hashkey() |
| Christopher Snook | RFC: Nagle latency tuning |
| David Miller | Re: [PATCH 10/11] [IPSEC]: Disallow combinations of RO and AH/ESP/IPCOMP |
| Jeff Kirsher | [RESEND][NET-NEXT PATCH 04/29] ixgbe: Update watchdog thread to accomodate longerl... |
