From: Florian Weimer <fweimer@redhat.com>
To: Stephen Smalley <stephen.smalley.work@gmail.com>
Cc: Arjun Shankar <arjun.is@lostca.se>,
SElinux list <selinux@vger.kernel.org>,
Aurelien Jarno <aurelien@aurel32.net>,
"Carlos O'Donell" <carlos@redhat.com>
Subject: Re: [RFC] Porting glibc away from deprecated libselinux APIs
Date: Tue, 21 Jul 2020 15:05:12 +0200 [thread overview]
Message-ID: <87365lqarb.fsf@oldenburg2.str.redhat.com> (raw)
In-Reply-To: <CAEjxPJ5wZ6HE0hA7+RAPfJkzL_W3LTLop9gNb8GxkHxMkLEAcA@mail.gmail.com> (Stephen Smalley's message of "Tue, 21 Jul 2020 08:59:18 -0400")
* Stephen Smalley:
> On Tue, Jul 21, 2020 at 8:07 AM Arjun Shankar <arjun.is@lostca.se> wrote:
>>
>> Hi,
>>
>> glibc currently uses several recently deprecated libselinux APIs:
>>
>> 1. makedb uses matchpathcon:
>>
>> https://sourceware.org/git/?p=glibc.git;a=blob;f=nss/makedb.c;h=8e389a1683747cf1047f4de8fe603f2b5ccc5f3f;hb=HEAD
>
> Should migrate to selabel_open/lookup/close.
>
>> 2. nscd uses avc_init and multiple old style callbacks:
>>
>> https://sourceware.org/git/?p=glibc.git;a=blob;f=nscd/selinux.c;h=a4ea8008e201b9397aa4274bb558de471b0573af;hb=HEAD
>
> Wondering if nscd can migrate to using the higher level
> selinux_check_access() interface instead of direct usage of the
> avc_*() interfaces.
Somewhat related:
I do not know the reason *why* we have SELinux-specific code in glibc,
and in this places in particular. What makes nscd and makedb special?
ldconfig also writes a file used across trust boundaries
(/etc/ld.so.cache), and yet we don't label it explicitly.
(nscd is a daemon that runs under its own user and loads NSS service
modules. makedb is similar to ldconfig.)
Do you have an idea why we need this code in glibc in the first place?
Could it be that it is simply there to work around an incomplete system
policy?
Thanks,
Florian
next prev parent reply other threads:[~2020-07-21 13:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-21 11:57 [RFC] Porting glibc away from deprecated libselinux APIs Arjun Shankar
2020-07-21 12:59 ` Stephen Smalley
2020-07-21 13:05 ` Florian Weimer [this message]
2020-07-21 13:13 ` Stephen Smalley
2020-07-21 14:48 ` Daniel Walsh
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=87365lqarb.fsf@oldenburg2.str.redhat.com \
--to=fweimer@redhat.com \
--cc=arjun.is@lostca.se \
--cc=aurelien@aurel32.net \
--cc=carlos@redhat.com \
--cc=selinux@vger.kernel.org \
--cc=stephen.smalley.work@gmail.com \
/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.