Thread (14 messages) 14 messages, 2 authors, 2019-08-29

Re: [PATCH 10/11] selinux: Implement the watch_key security hook [ver #6]

From: David Howells <dhowells@redhat.com>
Date: 2019-08-29 19:12:05
Also in: keyrings, linux-block, linux-fsdevel, linux-security-module, linux-usb, lkml

Stephen Smalley [off-list ref] wrote:
Can watch->cred ever differ from current's cred here?  If not, why can't we
just use current_sid() here
Um.  Not currently.  I'm not sure whether its ever likely to be otherwise.
Probably we could just use that and fix it up later if we do find otherwise.
and why do we need the watch object at all?
It carries more than just the creds for the caller of keyctl_watch_key(), it
also carries information about the queue to which notifications will be
written, including the creds that were active when that was set up.

Note that there's no requirement that the process that opened /dev/watch_queue
be the one that sets the watch.  In the keyutils testsuite, I 'leak' a file
descriptor from the session wrangler into the program that it runs so that
tests running inside the test script can add watches to it.

David
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help