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: Kamil Dudka
Subject: Re: [PATCH 1/2] find: add SELinux support
Date: Thu, 6 Aug 2009 13:50:23 +0200
User-agent: KMail/1.11.4 (Linux/2.6.29.5-191.fc11.x86_64; KDE/4.2.4; x86_64; ; )

On Thu August 6 2009 13:23:38 Jim Meyering wrote:
> 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.

Thanks!

Just let me note there is no explicit dependency on the openat module (namely 
lib/at-func.c). Is the dependency implied somehow?

Kamil





reply via email to

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