Skip to contentSkip to conversation

package/usbguard: enforce the right permissions on the configuration file

PATCH New Miquel Raynal 2 participants 2 messages Jun 18, 2021 – Jul 18, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/usbguard: enforce the right permissions on the configuration file

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.

---
 package/usbguard/usbguard.mk | 3 +++
 1 file changed, 3 insertions(+)
package/usbguard/usbguard.mk +3 -0
index 0626a7cc88..ea1be0dc48 100644
@@ -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))
Signature · 1 line
2.27.0
#1 lore raw

PATCH 1/1 package/usbguard: enforce the right permissions on the configuration file

Quoted 11 lines · On Fri, 18 Jun 2021 11:47:10 +0200 Miquel Raynal <[email protected]>…

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.

---
 package/usbguard/usbguard.mk | 3 +++
 1 file changed, 3 insertions(+)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com