From: "Christian Göttsche" <cgzones@googlemail.com>
To: SElinux list <selinux@vger.kernel.org>
Subject: getcon family: returning success while context is NULL
Date: Fri, 24 Jul 2020 14:34:05 +0200 [thread overview]
Message-ID: <CAJ2a_DfV0M1zD=fjQOGq3KPcBtvQxrgtZHSbBKDcxuOX7pJygA@mail.gmail.com> (raw)
Hi list,
I stumbled over a systemd commit [1], handling the event where
getcon_raw returns 0 (success) and the returned context is NULL.
The commit points to the SELinux userland source lines [2].
Is this by design?
Or should either errno be set to ENODATA and ret to -1, or this case
be mentioned in the manpage?
[1]: https://github.com/systemd/systemd/commit/199a892218e1f36e7bd7d5da2d78de6b13f04488
[2]: https://github.com/SELinuxProject/selinux/blob/4246bb550dee5246c8567804325b7da206cd76cf/libselinux/src/procattr.c#L175
next reply other threads:[~2020-07-24 12:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-24 12:34 Christian Göttsche [this message]
2020-07-24 13:13 ` getcon family: returning success while context is NULL Stephen Smalley
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='CAJ2a_DfV0M1zD=fjQOGq3KPcBtvQxrgtZHSbBKDcxuOX7pJygA@mail.gmail.com' \
--to=cgzones@googlemail.com \
--cc=selinux@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).