Okay. I can:
(1) Have cachefilesd (the daemon) pass a security context string to the
cachefiles kernel module, which can then convert it to a secID. It'll
require a security_secctx_to_secid() function, but I'm fairly certain I
have a patch to add such kicking around somewhere.
(2) Make security_task_kernel_act_as() take a task_security struct and a
secID and just assign the latter to the former. I'm not sure it makes
sense to do any checks here, other than checking that under SELinux the
secID is of SECCLASS_PROCESS class.
However, I need to write a check that the cachefilesd daemon is permitted to
nominate the secID it did. Can someone tell me how to do this? The obvious
way to do this is to add another PROCESS__xxx security permit specifically for
cachefiles, but that seems like a waste of a bit when there are only two spare
bits.
avc_has_perm(daemon_tsec->sid, nominated_sid,
SECCLASS_PROCESS, PROCESS__CACHEFILES_USE, NULL);
Now, I recall the addition of another security class being mentioned, which
presumably would give something like:
avc_has_perm(daemon_tsec->sid, nominated_sid,
SECCLASS_CACHE, CACHE__USE_AS_OVERRIDE, NULL);
And I assume this doesn't care if one, the other or both of the two SIDs
mentioned are of SECCLASS_PROCESS rather than of SECCLASS_CACHE.
David
--
| Bron Gondwana | BUG: mmapfile/writev spurious zero bytes (x86_64/not i386, bisected, reproducable) |
| Gabriel C | Re: [Announce] [patch] Modular Scheduler Core and Completely Fair Scheduler [CFS] |
| David Miller | [GIT]: Networking |
| Dave Young | Re: 2.6.24-rc3-mm1 |
git: | |
| Matthieu Moy | git push to a non-bare repository |
| Josh Boyer | git-unpack-objects |
| Linus Torvalds | Re: Problem with a push |
| Johannes Schindelin | Re: Git-windows and git-svn? |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| James | Re: OBSD on MacBook |
| Alexey Suslikov | OT: OpenBSD on Asus eeePC |
| Daniel Ouellet | Re: Show your appreciation and get your 4.2 DVD |
| David Pottage | Re: My experience with the Freerunner |
| "Marco Trevisan (Treviño)" | Re: Car charger to GTA02 |
| Neng-Yu Tu (Tony Tu) | GTA02 GPS rework for SD card interference issue |
| Christ van Willegen | Public build host (proposal) |
| Linux Bootup hangs after adding RealTime Premption and HR-Timer | 3 minutes ago | Linux kernel |
| SATA 2 size problems | 1 hour ago | Windows |
| problem with 2.6 kernel driver for a USB MAG Stripe Reader as HID device. | 13 hours ago | Linux kernel |
| get_user_pages failure | 15 hours ago | Linux kernel |
| Reading linux kernel | 16 hours ago | Linux kernel |
| High level of Seagate 2.5" SATA drives failing | 22 hours ago | Hardware |
| Resetting the bios password for Toshiba Laptop | 1 day ago | Hardware |
| Linux 2.6.22 slowly RUNS OUT OF LOWMEM | 1 day ago | Linux kernel |
| Questions about modules | 1 day ago | Linux kernel |
| KDB | 2 days ago | Linux kernel |
