Re: [BUG libselinux] Use nftw() instead of fts()

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

 



On 07/01/2016 04:53 AM, Thomas Petazzoni wrote:
> Hello,
> 
> The recent versions of libselinux use the fts() function in
> src/selinux_restorecon.c. This function is BSD-only, and therefore not
> available in the musl C library, and only available optionally in the
> uClibc C library.
> 
> Would it be possible to use instead the POSIX-compliant nftw()
> function, which provides the same functionality?
> 
> In addition, using fts() is problematic, as on glibc versions <= 2.22,
> it is incompatible with large file support.

selinux userspace has been using fts() since 2009 (commit
cce17290670ed7e1803ca6da660225ac01931d0c), when policycoreutils/setfiles
was converted from nftw() to fts().  libselinux usage is newer, but
src/selinux_restorecon.c is essentially a library function version of
setfiles.

Not saying that it would be impossible to switch (back) to nftw(), but I
guess we'd have to understand the cost/benefit tradeoff there.  If fts()
isn't available or well supported, why hasn't this previously been an
issue for policycoreutils/setfiles?





_______________________________________________
Selinux mailing list
Selinux@xxxxxxxxxxxxx
To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx.
To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.



[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux