[SSSD] [PATCH][RFC] Fix lack of O_CLOEXEC in open()

Simo Sorce simo at redhat.com
Thu Jun 21 17:24:48 UTC 2012


Old platforms like RHEL5 do not have this feature, this is a RFC about
the way I propose handling it.

Although I generally do not like ifdefs in code and we could alwys use
the fctnl method, I would like to avoid the fcntl when the platfroms
suport the open options as this will remove 2 system calls. This is
because this code is in the client and the cache is a fast path for us,
so the less syscalls the faster.
It also makes it very easy to remove the code later once we will drop
support for things like RHEL5 ... eventually :)

Simo.

NB. it compiles on F17 but had not way to test it on an actual RHEL5,
can someone do that please ?

-- 
Simo Sorce * Red Hat, Inc * New York
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-close-on-exec-support-for-old-platforms.patch
Type: text/x-patch
Size: 1709 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120621/2711a8bc/attachment.bin>


More information about the sssd-devel mailing list