[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: writing zero bytes in bash
- From: Russell Coker <russell coker com au>
- To: Tim Waugh <twaugh redhat com>
- Cc: Development discussions related to Fedora Core <fedora-devel-list redhat com>, SE-Linux <selinux tycho nsa gov>
- Subject: Re: writing zero bytes in bash
- Date: Sun, 27 Feb 2005 09:01:35 +1100
On Sunday 27 February 2005 04:54, Tim Waugh <twaugh redhat com> wrote:
> On Sat, Feb 26, 2005 at 06:32:13PM +1100, Russell Coker wrote:
> > To unset the fscreate or exec context you have to write zero bytes
> > to /proc/self/attr/fscreate or /proc/self/attr/exec respectively.
>
> Oh dear, really? How badly designed. The man page for write() says
> that writing no bytes causes write() to return 0 "without causing any
> other effect".
Is an entry under /proc a "regular file" or a "special file"?
Sym-links under /proc/*/fd are not regular sym-links, which seems to imply
that files under /proc are not "regular files". That seems to indicate that
the section "the results are not portable" applies.
Alexandre has a good point though, so it seems that changing the interface
would be a good idea.
--
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/ Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/ My home page
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]