Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <peter@korsgaard.com>
To: Adam Duskett <adam.duskett@amarulasolutions.com>,
	thomas.petazzoni@bootlin.com
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] package/openssh: select linux-pam if refpolicy upstream is selected
Date: Thu, 09 Nov 2023 12:10:19 +0100	[thread overview]
Message-ID: <87cywjp4h0.fsf@48ers.dk> (raw)
In-Reply-To: <20231009143440.1776155-1-adam.duskett@amarulasolutions.com> (Adam Duskett's message of "Mon, 9 Oct 2023 16:34:40 +0200")

>>>>> "Adam" == Adam Duskett <adam.duskett@amarulasolutions.com> writes:

 > linux-pam is required to login via OpenSSH if the upstream refpolicy for
 > SELinux is enaabled, as linux-pam handles changing user contexts. If a
 > user wants to make their own policy and use a refpolicy via git, we of course
 > should let them do so. As such, only select linux-pam if the upstream version
 > of refpolicy is selected.

 > Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
 > ---
 >  package/openssh/Config.in | 1 +
 >  1 file changed, 1 insertion(+)

 > diff --git a/package/openssh/Config.in b/package/openssh/Config.in
 > index 08d3c7d391..e7d8f46c07 100644
 > --- a/package/openssh/Config.in
 > +++ b/package/openssh/Config.in
 > @@ -3,6 +3,7 @@ config BR2_PACKAGE_OPENSSH
 >  	depends on BR2_USE_MMU # fork()
 >  	select BR2_PACKAGE_OPENSSL
 >  	select BR2_PACKAGE_ZLIB
 > +	select BR2_PACKAGE_LINUX_PAM if BR2_PACKAGE_REFPOLICY_UPSTREAM_VERSION

Hmm, we cannot do that without taking the dependencies on linux-pam into
consideration:

config BR2_PACKAGE_OPENSSH
        bool "openssh"
        depends on BR2_USE_MMU # fork()

..

config BR2_PACKAGE_REFPOLICY
        bool "refpolicy"
        depends on BR2_TOOLCHAIN_HAS_THREADS # libsepol
        depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 # libsepol
        depends on BR2_HOST_GCC_AT_LEAST_5 # host-setools -> host-libsepol

..

config BR2_PACKAGE_LINUX_PAM
        bool "linux-pam"
        depends on BR2_ENABLE_LOCALE
        depends on BR2_USE_WCHAR
        depends on !BR2_STATIC_LIBS
        depends on BR2_USE_MMU # fork()
        depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C11/stdatomic.h

So there is no guarantee that locale, wchar and !static are
available. You either need to propagate these dependencies to openssh if
the standard refpolicy is used or only select if they are / display a
warning otherwise.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2023-11-09 11:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-09 14:34 [Buildroot] [PATCH 1/1] package/openssh: select linux-pam if refpolicy upstream is selected Adam Duskett
2023-11-04 18:22 ` Thomas Petazzoni via buildroot
2023-11-09 11:10 ` Peter Korsgaard [this message]
2023-11-09 12:53   ` Thomas Petazzoni via buildroot

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=87cywjp4h0.fsf@48ers.dk \
    --to=peter@korsgaard.com \
    --cc=adam.duskett@amarulasolutions.com \
    --cc=buildroot@buildroot.org \
    --cc=thomas.petazzoni@bootlin.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox