[lkml]   [2009]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [tpmdd-devel] [PATCH] TPM: Let the tpm char device be openable multiple times
On Tue, Nov 03, 2009 at 01:14:28PM -0500, 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


 \ /
  Last update: 2009-11-03 23:45    [W:0.041 / U:1.200 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site