| From: |
| David Howells <dhowells@redhat.com> |
| To: |
| Linus Torvalds <torvalds@osdl.org>, akpm@osdl.org |
| Subject: |
| [PATCH] implement in-kernel keys & keyring management [try #6] |
| Date: |
| Wed, 11 Aug 2004 13:34:11 +0100 |
| Cc: |
| James Morris <jmorris@redhat.com>, linux-kernel@vger.kernel.org,
arjanv@redhat.com, dwmw2@infradead.org, greg@kroah.com,
Chris Wright <chrisw@osdl.org>, sfrench@samba.org,
mike@halcrow.us, Trond Myklebust <trond.myklebust@fys.uio.no>,
Kyle Moffett <mrmacman_g4@mac.com>,
viro@parcelfarce.linux.theplanet.co.uk |
Hi Linus, Andrew,
> I've modified my patch to avoid a locking error that Al Viro pointed out. If
> you have two keyrings A and B, if one process tries to link A to B, whilst
> in parallel another process tries to link B to A, it could end up creating a
> cycle in the graph. I've added code to serialise link calls with respect to
> one another to obviate that problem.
I've fixed another looking bug that that introduced.
Following a reply from Chris Wright, I've also sorted out session keyring
management to what is probably a more sane approach. Processes now start off
without session keyrings being assigned. A process is automatically subscribed
to the user's default session if it doesn't have a session keyring when it
tries to access it. Processes inherit their parents session keyring or lack
thereof at fork time. Processes can still manually join a session.
The patch can be found at:
http://people.redhat.com/~dhowells/keys/keys-268rc2-6.dif...
David.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/