Casey Schaufler <casey@schaufler-ca.com> wrote:Looking at SELinux, that doesn't get rid of the permission race because there's no locking. This may be different for other models. I was thinking of having steps (2) and (4) not do any checking, but rather assume that the caller has done the checks before calling the set routines, possibly by calling the hooks mentioned in (1) and (3). My main problem is that I don't know how NFSd wants to do things. I suppose there *ought* to be rules that say what NFSd is allowed to do. It doesn't matter to cachefiles, but it might matter to other users:-/ That's correct. Let me summarise: (1) The daemon has an active process security ID (say A). When the daemon nominates an override process security ID (say B) to be used by the kernel, the cachefiles module asks the LSM to check that A is allowed to nominate B for this purpose. (2) The cachefiles module is given a path under which its cache exists. The directory at the base of this path has its own security ID (say C). cachefiles wants to create new files in the cache with the same security ID as that directory (ie. C). However, when cachefiles is creating files in the cache, the security of whatever process is doing the access will be overridden with B, so cachefiles asks the LSM to check that B is allowed create files as C. Note that this is an instantaneous check in the cache startup stage. This allows caching to be aborted early if the security policy does not permit B to create Cs. Technically this check is superfluous as it's re-checked each time a vfs_mkdir() or vfs_create() are called. That depends on what you mean. cachefilesd (the daemon) will be run with a security label because there's a security model in place. I don't actually need to access the daemon, but the daemon does need to do things for which it requires permission grants. Correct. This is used as an override by any task that accesses the cache indirectly through the cachefiles module. The cachefilesd daemon has its own secid with which it accesses the cache directly. The sets of permissions that must be granted by the module's override subjective secid and by the daemon's subjective secid aren't identical. File and directory objects, yes. The cache is stored on disk as a collection of files and directories, each of which needs labelling. Well, they don't technically have to be different. The daemon and the module can be given the same secid, for instance. However, that secid then grants the daemon permission to anything the module can, and vice versa. The third secid is a file label rather than a process label, and so may or may not have to be different anyway, depending on the model. David --
| Thomas Gleixner | Re: Linux 2.6.23-rc9 and a heads-up for the 2.6.24 series.. |
| Karl Meyer | PROBLEM: 2.6.23-rc "NETDEV WATCHDOG: eth0: transmit timed out" |
| Mark Weber | hdparm standby timeout not working for WD raptors? |
| Robin Lee Powell | NFS hang + umount -f: better behaviour requested. |
git: | |
| Adam Roben | Equivalent of `svn switch` for git-svn? |
| Linus Torvalds | Re: On Tabs and Spaces |
| Adam Mercer | git cvsimport error |
| Sam Song | Fwd: [OT] Re: Git via a proxy server? |
| Antti Harri | Re: wine question |
| Paul Pruett | anyone using zoneminder.com on OpenBSD? |
| Josh | Re: removing sendmail |
| Sevan / Venture37 | wpi(4) not working in -CURRENT |
| Bill Day | telnet: Unable to connect to remote host: Network is unreachable |
| Dong Liu | Re: CXterm for LINUX |
| Framstag | ftp-error: bind: Address already in use? |
| Theodore Ts'o | RESULT: comp.os.linux passes: 858: 5 |
| SMDK2410 LCD Framebuffer driver | 5 hours ago | Linux kernel |
| Resetting the bios password for Toshiba Laptop | 5 hours ago | Hardware |
| Problem booting a barebone kernel in VMWare | 8 hours ago | Linux kernel |
| IP layer send packet | 13 hours ago | Linux kernel |
| PID to ELF image full path | 15 hours ago | Linux kernel |
| types of kernel | 1 day ago | Linux kernel |
| magical mounts | 2 days ago | Linux kernel |
| Problem in scim in Fedora 9 | 2 days ago | Linux general |
| The new Western Digital power saving drives | 2 days ago | Hardware |
| Battery Maximizer Software | 3 days ago | Linux kernel |
