From: Dominick Grift <dominick.grift@defensec.nl>
To: Stephen Smalley <stephen.smalley.work@gmail.com>
Cc: Petr Lautrbach <plautrba@redhat.com>,
SElinux list <selinux@vger.kernel.org>,
Nicolas Iooss <nicolas.iooss@m4x.org>
Subject: Re: [PATCH 4/4] libsemanage: Bump libsemanage.so version
Date: Thu, 08 Oct 2020 14:13:51 +0200 [thread overview]
Message-ID: <ypjleem8apa8.fsf@defensec.nl> (raw)
In-Reply-To: <CAEjxPJ630EuLcg3PUTKM51S7y=PjO-8=AUOBMKsLOi7jboTQ_w@mail.gmail.com> (Stephen Smalley's message of "Wed, 7 Oct 2020 08:35:37 -0400")
Stephen Smalley <stephen.smalley.work@gmail.com> writes:
> On Wed, Oct 7, 2020 at 5:50 AM Petr Lautrbach <plautrba@redhat.com> wrote:
>> Thanks, I'll prepare another patchset with improved commit messages.
>>
>> In the mean time I'm looking into removing deprecated symbols from libsepol as it's
>> supposed to be required only by selinux components. So far I've found that
>> deprecated sepol_check_context() is used in chkcon utility. As Fedora doesn't ship
>> this tool I incline to remove it from libsepol as well.
>
> Looks like it is also used by setfiles and sefcontext_compile at
> least. Might have been copied into external packages as well, e.g.
> busybox. So that one might need to stay. The reason it was
> deprecated was because it predated the introduction of the use of
> sepol handles and relied on global state set previously via
> sepol_set_policydb_from_file(), so I think the idea was to convert
> over to using sepol_context_check() instead (but this requires a much
> longer sequence of calls, ala h = sepol_handle_create();
> sepol_policy_file_create(&pf); sepol_policy_file_set_fp(pf, fp);
> sepol_policy_file_set_handle(pf, h); sepol_policydb_create(&policydb);
> sepol_policydb_read(policydb, pf); sepol_context_from_string(h,
> string, &ctx); sepol_context_check(h, policydb, ctx);). Probably not
> worth the trouble now.
BTW Busybox urgently could use some modernization. It might not even
work fully anymore with recent kernels. For example its a user space
object manager (for the passwd class) and it does not use
selinux_check_access()
Theres also just generally a lot old stuff that has been improved since
It still works on Linux 5.4 (I use it with OpenWrt) but compiling it
floods the screen with "deprecation notices". Most notably for
selinux_context_t
If and once OpenWrt moves to Linux 5.9 (new LTS) some functionality may
no longer work
>
>> And there's also
>>
>> /* Deprecated */
>> struct sepol_handle sepol_compat_handle = {
>> .msg_callback = sepol_msg_default_handler,
>> .msg_callback_arg = NULL,
>> };
>>
>> void sepol_debug(int on)
>> {
>> sepol_compat_handle.msg_callback = (on) ?
>> sepol_msg_default_handler : NULL;
>> }
>>
>> /* End deprecated */
>>
>> which is used on few places internally.
>>
>>
>> Later I'll check whether sssd uses any on deprecated libsemanage symbol and
>> decide what to do.
>
> The main ones in libsepol that I was referencing were the ones in
> libsepol/src/deprecated_funcs.c.
--
gpg --locate-keys dominick.grift@defensec.nl
Key fingerprint = FCD2 3660 5D6B 9D27 7FC6 E0FF DA7E 521F 10F6 4098
https://sks-keyservers.net/pks/lookup?op=get&search=0xDA7E521F10F64098
Dominick Grift
next prev parent reply other threads:[~2020-10-08 12:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-07 9:50 [PATCH 4/4] libsemanage: Bump libsemanage.so version Petr Lautrbach
2020-10-07 12:35 ` Stephen Smalley
2020-10-08 12:13 ` Dominick Grift [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-09-30 14:50 [PATCH 1/4] libsepol: Get rid of the old and duplicated symbols Petr Lautrbach
2020-09-30 14:50 ` [PATCH 4/4] libsemanage: Bump libsemanage.so version Petr Lautrbach
2020-09-30 15:22 ` Stephen Smalley
2020-09-30 15:56 ` Petr Lautrbach
2020-10-01 14:18 ` Stephen Smalley
2020-10-01 16:55 ` Petr Lautrbach
2020-10-01 17:08 ` Stephen Smalley
2020-10-01 17:48 ` Petr Lautrbach
2020-10-02 6:53 ` Nicolas Iooss
2020-10-02 14:49 ` Stephen Smalley
2020-10-02 15:41 ` 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=ypjleem8apa8.fsf@defensec.nl \
--to=dominick.grift@defensec.nl \
--cc=nicolas.iooss@m4x.org \
--cc=plautrba@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.