Re: bash: Correct usage of F_SETFD

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

 



Eric Blake [eblake@xxxxxxxxxx] wrote:
| > 
| > So if bash is the one creating its file descriptors, there's no need to
| > use R/M/W since it knows what the state of them are.
| 
| No, bash cannot reasonably know what the implementation's default bit
| state is, and blindly setting all other bits to zero is very possibly a
| bug, and easy enough to avoid by using the full R/M/W.

Besides, if user sets a flag on the fd and execs bash, bash would clobber
the flag. IOW, assuming that bash is the one creating the fd is not always
safe right ?

Thanks,

Sukadev
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux