All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/usbguard: enforce the right permissions on the configuration file
@ 2021-06-18  9:47 Miquel Raynal
  2021-07-18 21:31 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Miquel Raynal @ 2021-06-18  9:47 UTC (permalink / raw)
  To: buildroot

Only 0600 rights are allowed for the rules.conf. This file is read when the
usbguard daemon starts and will prevent it to run otherwise.

As Git only tracks the executable bit, setting the right permissions in the
package makefile is the cleanest solution, in particular when providing this
file from a rootfs overlay.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
 package/usbguard/usbguard.mk | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/usbguard/usbguard.mk b/package/usbguard/usbguard.mk
index 0626a7cc88..ea1be0dc48 100644
--- a/package/usbguard/usbguard.mk
+++ b/package/usbguard/usbguard.mk
@@ -47,5 +47,8 @@ define USBGUARD_INSTALL_INIT_SYSV
 		$(TARGET_DIR)/etc/init.d/S20usbguard
 endef
 
+define USBGUARD_PERMISSIONS
+	/etc/usbguard/rules.conf f 0600 0 0 - - - - -
+endef
 
 $(eval $(autotools-package))
-- 
2.27.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [PATCH] package/usbguard: enforce the right permissions on the configuration file
  2021-06-18  9:47 [Buildroot] [PATCH] package/usbguard: enforce the right permissions on the configuration file Miquel Raynal
@ 2021-07-18 21:31 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2021-07-18 21:31 UTC (permalink / raw)
  To: buildroot

On Fri, 18 Jun 2021 11:47:10 +0200
Miquel Raynal <miquel.raynal@bootlin.com> wrote:

> Only 0600 rights are allowed for the rules.conf. This file is read when the
> usbguard daemon starts and will prevent it to run otherwise.
> 
> As Git only tracks the executable bit, setting the right permissions in the
> package makefile is the cleanest solution, in particular when providing this
> file from a rootfs overlay.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
>  package/usbguard/usbguard.mk | 3 +++
>  1 file changed, 3 insertions(+)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-18 21:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-18  9:47 [Buildroot] [PATCH] package/usbguard: enforce the right permissions on the configuration file Miquel Raynal
2021-07-18 21:31 ` Thomas Petazzoni

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.