Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: findutils-selinux.patch critique (was Re: [patch] Recent findutils test: msg#00150

Subject: Re: findutils-selinux.patch critique (was Re: [patch] Recent findutils test suite failures)
On Fri, 2005-11-25 at 09:35 +0000, Tim Waugh wrote:
> Forwarding this to a wider SELinux-knowledgeable audience.  James had
> asked me what patches we apply to findutils, so I mentioned SELinux
> and pointed him to the patch for an initial review.

IIRC, the findutils SELinux patch was originally created by a person
from MITRE who is no longer involved in the project.  Dan later rewrote
it for the new SELinux API in Linux 2.6.

> 1. I notice that SELinux-enablement creates two new tests, "-context"
>    and "--context".  I would eliminate "--context", leaving only
>    "-context".  Find predicates aren't GNU-style long options.  Find
>    is confusing enough with options as well as predicates, and so I
>    definitely don't want to further blur that line.

This suggestion seems fine.

> 2. I see that if you use "find -context" on an SELinux-enabled version
>    of find on a system where SELinux is not enabled, find will
>    immediately perform a fatal exit with an explanatory message.  I
>    won't say that that is definitely the wrong behaviour, but why did
>    you choose not to have -context simply always return false (and
>    perhaps issue one warning message)?

This may be a legacy issue.  Since getfilecon is implemented via
getxattr(2), and getxattr(2) does not require SELinux to be enabled, we
might want to drop this restriction.  The older SELinux API (before
migrating to using xattrs) would only have worked if SELinux was
enabled.

> 3. Security contexts are long multi-part strings.  Matching with glob
>    patterns is a reasonable approach.  Nevertheless, does the use of
>    glob patterns to match them reflect practice on other systems?

I'm not sure what we would compare against in terms of other systems
(Trusted Solaris?), or exactly how they would compare.  Some kind of
pattern matching (regex or glob patterns) seems necessary to deal with
searching for e.g. a particular TE type without being concerned about
other fields.

> 4. I notice that your patch slips in a definition for FNM_CASEFOLD.
>    That looks wrong to me.  gl_FUNC_FNMATCH_GNU should call
>    AC_GNU_SOURCE to ensure that <fnmatch.h> #defines FNM_CASEFOLD for
>    you.  This should be called by gl_INIT.  Is this (a) not working
>    correctly on some of your build systems, (b) not working on any of
>    your build systems, implying a findutils bug, or (c) there for
>    'historical reasons'?

I don't know - looks like you added these lines earlier this year upon
merging 4.2.15.

> 5. Findutils should probably default to compiling with SELinux support
>    on systems where <selinux/selinux.h> exists or --with-selinux is
>    specifified to configure, and compile without such support
>    otherwise.

Seems reasonable.

> 6. Is there a reason you turn off Automake gnits rules checking in the
>    SELinux patch?

No ideas here - looks like a change by Dan very recently from the cvs
log.

> 7. The configure magic for selinux can be fully generic and
>    self-contained I think: we could just have an selinux.m4 file.
>    That would also make it much easier to reuse it.

Seems fine.


> 8. Are the DejaGnu test cases for the SELinux patch in another patch
>    file somewhere else?  Perhaps it's in the same patch file as the
>    update to the Texinfo documentation. :) 

Likely doesn't exist yet.

-- 
Stephen Smalley
National Security Agency



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qnx.openqnx.dev...    gcc.libstdc++.c...    solaris.opensol...    information-ret...    misc.misterhous...    web.catalyst.ge...    apache.webservi...    redhat.release....    hardware.lirc/2...    kernel.autofs/2...    technology.sust...    linux.vdr/2003-...    editors.lyx.gen...    org.user-groups...    netbsd.devel.pk...    xdg.devel/2004-...    version-control...    jakarta.slide.d...    debian.packages...    creativecommons...    ports.ppc.embed...    bug-tracking.bu...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe