All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Smalley <sds@tycho.nsa.gov>
To: Jason Zaman <jason@perfinion.com>, Nicolas Iooss <nicolas.iooss@m4x.org>
Cc: selinux <selinux@tycho.nsa.gov>
Subject: Re: SELinux musl support
Date: Fri, 18 May 2018 08:58:58 -0400	[thread overview]
Message-ID: <acddd718-3b1f-9745-00fc-d3115964178a@tycho.nsa.gov> (raw)
In-Reply-To: <20180518050318.GA6239@baraddur.perfinion.com>

On 05/18/2018 01:03 AM, Jason Zaman wrote:
> On Thu, May 17, 2018 at 09:22:01PM +0200, Nicolas Iooss wrote:
>> On Thu, May 17, 2018 at 7:11 AM, Jason Zaman <jason@perfinion.com> wrote:
>>> This series fixes compiling and running on musl libc.
>>>
>>> patches 1-2 are fairly trivial.
>>>
>>> patches 3-4 are a feature change on that platform since it does not
>>> support GLOB_TILDE and GLOB_BRACE. tilde is coming in musl 1.1.21
>>> according to [1]. brace support is not documented anywhere or in the
>>> example configs so that is probably not a big problem.
>>>
>>> patch 5 fixes a bug and it just happens that glibc returns a value for
>>> sysconf and the error handling was wrong but never noticed.
>>>
>>> [1]: https://wiki.musl-libc.org/roadmap.html
>>>
>>> [PATCH 1/5] sestatus: include limits.h for PATH_MAX
>>> [PATCH 2/5] libselinux: enable linking to musl-fts
>>> [PATCH 3/5] setfiles: Musl compatibility for GLOB_BRACE and
>>> [PATCH 4/5] restorecond: Musl compatibility for GLOB_BRACE and
>>> [PATCH 5/5] genhomedircon: sysconf can return -1 without failure
>>
>> Thanks! These patches look good to me and I would also appreciate if
>> they are merged in 2.8.
> 
> Awesome, I'll push them on monday then unless there are any issues
> before then :)

FWIW, the patches look fine to me as well and I did a test PR to trigger travis CI testing
and they passed,
https://github.com/SELinuxProject/selinux/pull/96

One possible area for improvement (but not necessary to merge this) would be to fix the
genhomedircon code to also then handle the case where getpwnam_r/getgrnam_r returns ERANGE,
in which case we are supposed to realloc a larger buffer and try again per the man page.

  reply	other threads:[~2018-05-18 12:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-17  5:11 SELinux musl support Jason Zaman
2018-05-17  5:11 ` [PATCH 1/5] sestatus: include limits.h for PATH_MAX Jason Zaman
2018-05-17  5:11 ` [PATCH 2/5] libselinux: enable linking to musl-fts Jason Zaman
2018-05-17  5:11 ` [PATCH 3/5] setfiles: Musl compatibility for GLOB_BRACE and GLOB_TILDE Jason Zaman
2018-05-17  5:11 ` [PATCH 4/5] restorecond: " Jason Zaman
2018-05-17  5:11 ` [PATCH 5/5] genhomedircon: sysconf can return -1 without failure Jason Zaman
2018-05-17 19:22 ` SELinux musl support Nicolas Iooss
2018-05-18  5:03   ` Jason Zaman
2018-05-18 12:58     ` Stephen Smalley [this message]
2018-05-18 15:58       ` Jason Zaman
2018-05-21  9:41         ` Jason Zaman

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=acddd718-3b1f-9745-00fc-d3115964178a@tycho.nsa.gov \
    --to=sds@tycho.nsa.gov \
    --cc=jason@perfinion.com \
    --cc=nicolas.iooss@m4x.org \
    --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.