Skip to contentSkip to conversation

fs: set packages permissions even with no system device tables

PATCH New Yann E. MORIN 2 participants 3 messages Dec 14, 2016 – Dec 15, 2016 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs: set packages permissions even with no system device tables

Currently, when there is no sytem device table (permissions or static devices) defined, then package permissions are not applied, because they are guarded by the check on the system device tables being non empty.

Fix that by narrowing the guarding condition.

Note that the dependency on host-makedevs was not conditional; we always build it even if we don;t need it. Making it conditional is not possible, because we don't know all the packages permissions by the time the fs infra is parsed (packages from br2-external are parsed after it).

Cc Thomas Petazzoni <[email protected]>
Cc Peter Korsgaard <[email protected]>
---
 fs/common.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/common.mk +1 -1
index 7515fdc..396b1c2 100644
@@ -89,9 +89,9 @@ ifneq ($$(ROOTFS_DEVICE_TABLES),)
 ifeq ($$(BR2_ROOTFS_DEVICE_CREATION_STATIC),y)
 	$$(call PRINTF,$$(PACKAGES_DEVICES_TABLE)) >> $$(FULL_DEVICE_TABLE)
 endif
+endif
 	$$(call PRINTF,$$(PACKAGES_PERMISSIONS_TABLE)) >> $$(FULL_DEVICE_TABLE)
 	echo "$$(HOST_DIR)/usr/bin/makedevs -d $$(FULL_DEVICE_TABLE) $$(TARGET_DIR)" >> $$(FAKEROOT_SCRIPT)
-endif
 	$$(foreach s,$$(call qstrip,$$(BR2_ROOTFS_POST_FAKEROOT_SCRIPT)),\
 		echo "echo '$$(TERM_BOLD)>>>   Executing fakeroot script $$(s)$$(TERM_RESET)'" >> $$(FAKEROOT_SCRIPT); \
 		echo $$(s) $$(TARGET_DIR) $$(BR2_ROOTFS_POST_SCRIPT_ARGS) >> $$(FAKEROOT_SCRIPT)$$(sep))
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 fs: set packages permissions even with no system device tables

Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

Currently, when there is no sytem device table (permissions or static devices) defined, then package permissions are not applied, because they are guarded by the check on the system device tables being non empty.

Fix that by narrowing the guarding condition.

Quoted 8 lines

Note that the dependency on host-makedevs was not conditional; we always build it even if we don;t need it. Making it conditional is not possible, because we don't know all the packages permissions by the time the fs infra is parsed (packages from br2-external are parsed after it).

Cc Thomas Petazzoni <[email protected]>
Cc Peter Korsgaard <[email protected]>

Committed, thanks.

Out of interest, what is your use case for NOT having any system device table?

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

PATCH 1/1 fs: set packages permissions even with no system device tables

Peter, All,

On 2016-12-14 23:47 +0100, Peter Korsgaard spake thusly:

Quoted 13 lines
Quoted 12 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

Currently, when there is no sytem device table (permissions or static devices) defined, then package permissions are not applied, because they are guarded by the check on the system device tables being non empty.

Fix that by narrowing the guarding condition.

Note that the dependency on host-makedevs was not conditional; we always build it even if we don;t need it. Making it conditional is not possible, because we don't know all the packages permissions by the time the fs infra is parsed (packages from br2-external are parsed after it).

Quoted 8 lines
Quoted 3 lines
Cc Thomas Petazzoni <[email protected]>
Cc Peter Korsgaard <[email protected]>

Committed, thanks.

Out of interest, what is your use case for NOT having any system device table?

It's a combo:
- custom skeleton
- custom init system
- running in a chroot
- /chroot/dev bind-mounted from the real /dev

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'