Re: writing zero bytes in bash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sunday 27 February 2005 04:54, Tim Waugh <twaugh@xxxxxxxxxx> 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][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux