* [Buildroot] [PATCH 1/1] package/dhcpcd: add BR2_PACKAGE_DHCPCD_ENABLE_PRIVSEP
@ 2021-03-05 11:10 Fabrice Fontaine
2022-01-01 12:19 ` Joachim Wiberg
0 siblings, 1 reply; 3+ messages in thread
From: Fabrice Fontaine @ 2021-03-05 11:10 UTC (permalink / raw)
To: buildroot
Add BR2_PACKAGE_DHCPCD_ENABLE_PRIVSEP following Arnout feedback:
https://patchwork.ozlabs.org/project/buildroot/patch/20210303091904.467706-1-fontaine.fabrice at gmail.com
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
package/dhcpcd/Config.in | 19 +++++++++++++++++++
package/dhcpcd/dhcpcd.mk | 22 ++++------------------
2 files changed, 23 insertions(+), 18 deletions(-)
diff --git a/package/dhcpcd/Config.in b/package/dhcpcd/Config.in
index ece08d2c96..3ebacb3ba2 100644
--- a/package/dhcpcd/Config.in
+++ b/package/dhcpcd/Config.in
@@ -8,3 +8,22 @@ config BR2_PACKAGE_DHCPCD
An RFC2131 compliant DHCP client
http://roy.marples.name/projects/dhcpcd/
+
+if BR2_PACKAGE_DHCPCD
+
+config BR2_PACKAGE_DHCPCD_ENABLE_PRIVSEP
+ bool
+ default y
+ depends on BR2_USE_MMU
+ # Audit headers were only added in recent kernels for some arches
+ depends on !(BR2_arceb || BR2_arcle) || \
+ BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_2
+ depends on !(BR2_microblazeel || BR2_microblazebe) || \
+ BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
+ depends on !BR2_nds32 || BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_2
+ depends on !BR2_nios2 || BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_2
+ depends on !BR2_or1k || BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
+ depends on !BR2_sh || BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
+ depends on !BR2_xtensa || BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_0
+
+endif
diff --git a/package/dhcpcd/dhcpcd.mk b/package/dhcpcd/dhcpcd.mk
index f040610de4..30f0aab867 100644
--- a/package/dhcpcd/dhcpcd.mk
+++ b/package/dhcpcd/dhcpcd.mk
@@ -16,23 +16,9 @@ DHCPCD_CONFIG_OPTS = \
--os=linux \
--privsepuser=dhcpcd
-# AUDIT_ARCH_{OPENRISC,SH,SHEL,SH64,SHEL64} are only available with kernel >= 3.7
-ifeq ($(BR2_or1k)$(BR2_sh):$(BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7),y:)
-DHCPCD_CONFIG_OPTS += --disable-privsep
-endif
-
-# AUDIT_ARCH_MICROBLAZE is only available with kernel >= 3.18
-ifeq ($(BR2_microblazeel)$(BR2_microblazebe):$(BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18),y:)
-DHCPCD_CONFIG_OPTS += --disable-privsep
-endif
-
-# AUDIT_ARCH_XTENSA is only available with kernel >= 5.0
-ifeq ($(BR2_xtensa):$(BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_0),y:)
-DHCPCD_CONFIG_OPTS += --disable-privsep
-endif
-
-# AUDIT_ARCH_{ARCOMPACT,ARCV2,NDS32,NIOS2} are only available with kernel >= 5.2
-ifeq ($(BR2_arceb)$(BR2_arcle)$(BR2_nds32)$(BR2_nios2):$(BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_2),y:)
+ifeq ($(BR2_PACKAGE_DHCPCD_ENABLE_PRIVSEP),y)
+DHCPCD_CONFIG_OPTS += --enable-privsep
+else
DHCPCD_CONFIG_OPTS += --disable-privsep
endif
@@ -48,7 +34,7 @@ DHCPCD_CONFIG_OPTS += --enable-static
endif
ifeq ($(BR2_USE_MMU),)
-DHCPCD_CONFIG_OPTS += --disable-fork --disable-privsep
+DHCPCD_CONFIG_OPTS += --disable-fork
endif
define DHCPCD_CONFIGURE_CMDS
--
2.30.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/dhcpcd: add BR2_PACKAGE_DHCPCD_ENABLE_PRIVSEP
2021-03-05 11:10 [Buildroot] [PATCH 1/1] package/dhcpcd: add BR2_PACKAGE_DHCPCD_ENABLE_PRIVSEP Fabrice Fontaine
@ 2022-01-01 12:19 ` Joachim Wiberg
2022-01-01 13:04 ` Yann E. MORIN
0 siblings, 1 reply; 3+ messages in thread
From: Joachim Wiberg @ 2022-01-01 12:19 UTC (permalink / raw)
To: Fabrice Fontaine, buildroot; +Cc: John Stile, Fabrice Fontaine
On Fri, Mar 05, 2021 at 12:10, Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> Add BR2_PACKAGE_DHCPCD_ENABLE_PRIVSEP following Arnout feedback:
> https://patchwork.ozlabs.org/project/buildroot/patch/20210303091904.467706-1-fontaine.fabrice@gmail.com
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Looks good to me, much cleaner than what we have now.
Reviewed-by: Joachim Wiberg <troglobit@gmail.com>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/dhcpcd: add BR2_PACKAGE_DHCPCD_ENABLE_PRIVSEP
2022-01-01 12:19 ` Joachim Wiberg
@ 2022-01-01 13:04 ` Yann E. MORIN
0 siblings, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2022-01-01 13:04 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: Joachim Wiberg, John Stile, buildroot
Fabrice, All,
On 2022-01-01 13:19 +0100, Joachim Wiberg spake thusly:
> On Fri, Mar 05, 2021 at 12:10, Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> > Add BR2_PACKAGE_DHCPCD_ENABLE_PRIVSEP following Arnout feedback:
> > https://patchwork.ozlabs.org/project/buildroot/patch/20210303091904.467706-1-fontaine.fabrice@gmail.com
> >
> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
>
> Looks good to me, much cleaner than what we have now.
>
> Reviewed-by: Joachim Wiberg <troglobit@gmail.com>
Applied to master, thanks.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-01-01 13:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-05 11:10 [Buildroot] [PATCH 1/1] package/dhcpcd: add BR2_PACKAGE_DHCPCD_ENABLE_PRIVSEP Fabrice Fontaine
2022-01-01 12:19 ` Joachim Wiberg
2022-01-01 13:04 ` Yann E. MORIN
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.