selinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Iooss <nicolas.iooss@m4x.org>
To: Petr Lautrbach <plautrba@redhat.com>
Cc: selinux@vger.kernel.org
Subject: Re: [PATCH 1/2] libselinux: set an appropriate errno in booleans.c
Date: Thu, 31 Jan 2019 23:02:08 +0100	[thread overview]
Message-ID: <CAJfZ7=kF0quUm_KAJqxw+u5KyYoOveaVMXBOTxevgOu41VWRPA@mail.gmail.com> (raw)
In-Reply-To: <20190131194824.4944-1-plautrba@redhat.com>

On Thu, Jan 31, 2019 at 8:48 PM Petr Lautrbach <plautrba@redhat.com> wrote:
>
> Fixes:
> $ mkdir booleans
> $ sudo mount --bind ./booleans /sys/fs/selinux/booleans
> $ sudo getsebool -a
> getsebool:  Unable to get boolean names:  Success
>
> Signed-off-by: Petr Lautrbach <plautrba@redhat.com>

Acked-by: Nicolas Iooss <nicolas.iooss@m4x.org>
> ---
>  libselinux/src/booleans.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/libselinux/src/booleans.c b/libselinux/src/booleans.c
> index b3ea3623..a6d46fea 100644
> --- a/libselinux/src/booleans.c
> +++ b/libselinux/src/booleans.c
> @@ -55,6 +55,7 @@ int security_get_boolean_names(char ***names, int *len)
>         snprintf(path, sizeof path, "%s%s", selinux_mnt, SELINUX_BOOL_DIR);
>         *len = scandir(path, &namelist, &filename_select, alphasort);
>         if (*len <= 0) {
> +               errno = ENOENT;
>                 return -1;
>         }
>
> --
> 2.20.1
>


  parent reply	other threads:[~2019-01-31 22:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-31 19:48 [PATCH 1/2] libselinux: set an appropriate errno in booleans.c Petr Lautrbach
2019-01-31 19:48 ` [PATCH 2/2] libselinux: Change matchpathcon usage to match with matchpathcon manpage Petr Lautrbach
2019-01-31 22:02   ` Nicolas Iooss
2019-02-05  7:19     ` Nicolas Iooss
2019-01-31 22:02 ` Nicolas Iooss [this message]
2019-02-05  7:18   ` [PATCH 1/2] libselinux: set an appropriate errno in booleans.c Nicolas Iooss

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='CAJfZ7=kF0quUm_KAJqxw+u5KyYoOveaVMXBOTxevgOu41VWRPA@mail.gmail.com' \
    --to=nicolas.iooss@m4x.org \
    --cc=plautrba@redhat.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).