bug-findutils
[Top][All Lists]
Advanced

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

Re: [PATCH 1/2] find: add SELinux support


From: Jim Meyering
Subject: Re: [PATCH 1/2] find: add SELinux support
Date: Thu, 06 Aug 2009 13:23:38 +0200

Kamil Dudka wrote:
> On Thu August 6 2009 12:16:58 Jim Meyering wrote:
>> Kamil Dudka wrote:
>> > On Thu July 30 2009 13:57:00 Jim Meyering wrote:
>> >> > The attached incremental patch fixes it. Now it works on both Fedora
>> >> > and Debian. But unfortunately it does not work with the stable version
>> >> > (4.4.2) of findutils. Could anybody point me to the relevant change in
>> >> > findutils code? Thanks in advance!
>> >>
>> >> With the FTS_CWDFD-adding change you spotted,
>> >> I suspect that you should be using an FD-based function,
>> >> like getfileconat or lgetfileconat from coreutils.
>> >
>> > It's probably always better to use a FD-based function when working with
>> > an opened file. However this is not the case I think. Only FD of the
>> > traversed directory is available when getfilecon() is called. If I want
>> > to use FD of an opened  file, I need to open the file first. Then I am
>> > obviously encountering the same problem with relative paths.
>>
>> With FTS_CWDFD, the working directory does not change.
>> Instead, fts->fts_cwd_fd is what changes.
>> You can use getfileconat (fts->fts_cwd_fd, relative_name, &context) to
>> get the desired context.
>
> Thanks for the explanation! But the module selinux-at does not seem to be
> in gnulib. How can I then use it within findutils? I guess it's not good
> idea to copy the code to findutils repo...

I'll move them to gnulib.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]