All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jim Meyering <jim@meyering.net>
To: SE Linux <selinux@tycho.nsa.gov>
Subject: is the string "<<none>>" in a header anywhere?
Date: Mon, 12 Nov 2007 12:06:23 +0100	[thread overview]
Message-ID: <87y7d3yb80.fsf@rho.meyering.net> (raw)

Coreutils' install.c currently compares a context against the
magic string, "<<none>>":

  /* If there's an error determining the context, or it has none,
     return to allow default context */
  if ((matchpathcon (file, st.st_mode, &scontext) != 0) ||
      STREQ (scontext, "<<none>>"))
    {
      if (scontext != NULL)
        freecon (scontext);
      return;
    }

BTW, matchpathcon(8) does, too.
Is there a better way to test for that condition?
It'd be nice if that string were available via a libselinux header,
but I don't see it on rawhide:

    $ grep none $(rpm -ql libselinux-devel|grep -F .h)
    [Exit 1]

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

             reply	other threads:[~2007-11-12 11:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-12 11:06 Jim Meyering [this message]
2007-11-13 14:58 ` is the string "<<none>>" in a header anywhere? Stephen Smalley
2007-11-13 15:23   ` Jim Meyering

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y7d3yb80.fsf@rho.meyering.net \
    --to=jim@meyering.net \
    --cc=selinux@tycho.nsa.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.