lkml.org 
[lkml]   [2009]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [tpmdd-devel] [PATCH] TPM: Let the tpm char device be openable multiple times
On Tue, Nov 03, 2009 at 01:14:28PM -0500, Valdis.Kletnieks@vt.edu wrote:
> On Tue, 03 Nov 2009 09:31:55 PST, Hal Finney said:
> > What if you don't want it accessible by user mode apps, you only want
> > your middleware (ie tcs daemon, tcsd) to open it? Will this still
> > allow that to be enforced, so nobody can interfere with tcsd's
> > exclusive access to the device?
>
> Couldn't tcsd just open the device with O_EXCL? Or am I missing something
> subtle here?

O_EXCL isn't a locking flag...

O_EXCL Ensure that this call creates the file: if this flag is specified in conjunction with O_CREAT, and
pathname already exists, then open() will fail. The behavior of O_EXCL is undefined if O_CREAT is not
specified.

Jason


\
 
 \ /
  Last update: 2009-11-03 23:45    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site