Tmpfs acls
cover Tmpfs acls
This is an update of the tmpfs acl patches against 2.6.15-git4. (The first version of these patches was posted on 2 February 2005.) We'll have our /dev tree on tmpfs in the future, and we need acls there to manage device inode permissions of logged-in users. Other distributions will be in exactly the same situation, and need this patchset as well.
Andrew, if this stuff looks good enough to you, could you please let it live in -mm for some time?
Thanks,
Andreas
--
Andreas Gruenbacher <[email protected]>
SUSE Labs, SUSE LINUX Products GmbH / Novell Inc.
Quoted 5 lines · Andreas Gruenbacher
This is an update of the tmpfs acl patches against 2.6.15-git4. (The first version of these patches was posted on 2 February 2005.) We'll have our /dev tree on tmpfs in the future, and we need acls there to manage device inode permissions of logged-in users. Other distributions will be in exactly the same situation, and need this patchset as well.
Hmm. Do you have any infrastructure for revoking open file descriptors when a user logs out?
Signature · 1 line
Matthew Garrett | [email protected]
Quoted 9 lines · Matthew Garrett
Quoted 5 lines · Andreas Gruenbacher
This is an update of the tmpfs acl patches against 2.6.15-git4. (The first version of these patches was posted on 2 February 2005.) We'll have our /dev tree on tmpfs in the future, and we need acls there to manage device inode permissions of logged-in users. Other distributions will be in exactly the same situation, and need this patchset as well.
Hmm. Do you have any infrastructure for revoking open file descriptors when a user logs out?
Open file descriptors have nothing to do with it. The device permissions are set by different pam modules on different distributions (pam_console, pam_resmgr).
Without acls, permissions are assigned by changing file ownership. With acls, the respective user or users can be given access as appropriate, which is more flexible. There are a few cases in which it is desirable to grant access to a device to more than one locally logged in user. This also obsoletes the resmgr hack of passing around open file descriptors and several hacks in applications that use this mechanism, because permissions can be set as appropriate.
Andreas
Quoted 7 lines · Andreas Gruenbacher
Quoted 2 lines · Matthew Garrett
Hmm. Do you have any infrastructure for revoking open file descriptors when a user logs out?
Open file descriptors have nothing to do with it. The device permissions are set by different pam modules on different distributions (
pam_console,pam_resmgr).
Right. But what stops a user writing an application that opens a device, hangs around after the user logs out and then provides access to the user when logged in remotely?
Handwavy problem scenario - user A logs in, is given access to the soundcard. Starts running a program that when given appropriate signals will record from the system microphone. Logs out. Waits for user B, who he suspects is having an affair with his wife, and then monitors any conversations that user B has. ACLs on their own don't seem to solve this any more than just statically assigning group membership to users.
Signature · 1 line
Matthew Garrett | [email protected]
Quoted 13 lines · Matthew Garrett
Quoted 7 lines · Andreas Gruenbacher
Quoted 2 lines · Matthew Garrett
Hmm. Do you have any infrastructure for revoking open file descriptors when a user logs out?
Open file descriptors have nothing to do with it. The device permissions are set by different pam modules on different distributions (
pam_console,pam_resmgr).Right. But what stops a user writing an application that opens a device, hangs around after the user logs out and then provides access to the user when logged in remotely?
Quoted 5 lines
Handwavy problem scenario - user A logs in, is given access to the soundcard. Starts running a program that when given appropriate signals will record from the system microphone. Logs out. Waits for user B, who he suspects is having an affair with his wife, and then monitors any conversations that user B has.
That can be solved in the user session handling and not in the kernel.
Quoted 2 lines
ACLs on their own don't seem to solve
this any more than just statically assigning group membership to users.
Sure, they do. Unlike silly group memberships, the system can provide ressources to "local" users only.
Kay
Quoted 8 lines · Kay Sievers
Quoted 5 lines · Matthew Garrett
Handwavy problem scenario - user A logs in, is given access to the soundcard. Starts running a program that when given appropriate signals will record from the system microphone. Logs out. Waits for user B, who he suspects is having an affair with his wife, and then monitors any conversations that user B has.
That can be solved in the user session handling and not in the kernel.
Without killing every application that they've been left running? How? The only way I can think of is by checking open files against a blacklist, which seems, uhm, fragile.
Signature · 1 line
Matthew Garrett | [email protected]
Quoted 4 lines · Kay Sievers
Quoted 2 lines
he suspects is having an affair with his wife, and then monitors any conversations that user B has.
That can be solved in the user session handling and not in the kernel.
Exactly how do you plan to do that ?
Quoted 6 lines · Matthew Garrett
Handwavy problem scenario - user A logs in, is given access to the soundcard. Starts running a program that when given appropriate signals will record from the system microphone. Logs out. Waits for user B, who he suspects is having an affair with his wife, and then monitors any conversations that user B has. ACLs on their own don't seem to solve this any more than just statically assigning group membership to users.
This scenario is not a permission but a locking problem. User B should just claim the microphone exclusively and that should fail if user A keeps an fd open.
For the generic case maybe a new lock type would be useful, that would fail iff a process with a different effective UID keeps the device open.
Gabor
Signature · 4 lines
---------------------------------------------------------
MTA SZTAKI Computer and Automation Research Institute
Hungarian Academy of Sciences
---------------------------------------------------------