aboutsummaryrefslogtreecommitdiff
path: root/fs/common.mk
diff options
context:
space:
mode:
authorGravatar Yann E. MORIN <yann.morin.1998@free.fr>2013-04-12 07:14:18 +0000
committerGravatar Peter Korsgaard <jacmet@sunsite.dk>2013-04-25 22:56:42 +0200
commit1f3af04db77f9e9e707bd37ee85f6508aef797f2 (patch)
treed697d2aa29aaa71c77f9e3186e6d98cb697fc21b /fs/common.mk
parent74bdc4b9ddf6d4d2ecdd238715dcbf14292b8829 (diff)
downloadbuildroot-1f3af04db77f9e9e707bd37ee85f6508aef797f2.tar.gz
buildroot-1f3af04db77f9e9e707bd37ee85f6508aef797f2.tar.bz2
packages: add ability for packages to create users
Packages that install daemons may need those daemons to run as a non-root, or an otherwise non-system (eg. 'daemon'), user. Add infrastructure for packages to create users, by declaring the FOO_USERS variable that contain a makedev-syntax-like description of the user(s) to add. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Samuel Martin <s.martin49@gmail.com> Cc: Cam Hutchison <camh@xdna.net> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'fs/common.mk')
-rw-r--r--fs/common.mk3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/common.mk b/fs/common.mk
index c6f67d831d..36da2dd645 100644
--- a/fs/common.mk
+++ b/fs/common.mk
@@ -35,6 +35,7 @@ FAKEROOT_SCRIPT = $(BUILD_DIR)/_fakeroot.fs
FULL_DEVICE_TABLE = $(BUILD_DIR)/_device_table.txt
ROOTFS_DEVICE_TABLES = $(call qstrip,$(BR2_ROOTFS_DEVICE_TABLE) \
$(BR2_ROOTFS_STATIC_DEVICE_TABLE))
+USERS_TABLE = $(BUILD_DIR)/_users_table.txt
define ROOTFS_TARGET_INTERNAL
@@ -55,6 +56,8 @@ endif
printf '$$(subst $$(sep),\n,$$(PACKAGES_PERMISSIONS_TABLE))' >> $$(FULL_DEVICE_TABLE)
echo "$$(HOST_DIR)/usr/bin/makedevs -d $$(FULL_DEVICE_TABLE) $$(TARGET_DIR)" >> $$(FAKEROOT_SCRIPT)
endif
+ printf '$(subst $(sep),\n,$(PACKAGES_USERS))' > $(USERS_TABLE)
+ $(TOPDIR)/support/scripts/mkusers $(USERS_TABLE) $(TARGET_DIR) >> $(FAKEROOT_SCRIPT)
echo "$$(ROOTFS_$(2)_CMD)" >> $$(FAKEROOT_SCRIPT)
chmod a+x $$(FAKEROOT_SCRIPT)
$$(HOST_DIR)/usr/bin/fakeroot -- $$(FAKEROOT_SCRIPT)