From 4a142953ea943245ffbe7ea7f707f8ba87ab59bc Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 23 Oct 2007 06:23:26 +0000 Subject: [PATCH] Use current UID for initramfs root user:group Set the CONFIG_INITRAMFS_ROOT_{U,G}ID kernel variables to the current user, so that all files end up being owned by root in the final initramfs image. Signed-off-by: Jeremy Kerr SVN-Revision: 9409 --- include/kernel-defaults.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk index 977992133055..cab8352994be 100644 --- a/include/kernel-defaults.mk +++ b/include/kernel-defaults.mk @@ -79,8 +79,8 @@ ifeq ($(KERNEL),2.6) mv $(LINUX_DIR)/.config $(LINUX_DIR)/.config.old grep -v INITRAMFS $(LINUX_DIR)/.config.old > $(LINUX_DIR)/.config echo 'CONFIG_INITRAMFS_SOURCE="$(TARGET_DIR)"' >> $(LINUX_DIR)/.config - echo 'CONFIG_INITRAMFS_ROOT_UID=0' >> $(LINUX_DIR)/.config - echo 'CONFIG_INITRAMFS_ROOT_GID=0' >> $(LINUX_DIR)/.config + echo 'CONFIG_INITRAMFS_ROOT_UID=$(shell id -u)' >> $(LINUX_DIR)/.config + echo 'CONFIG_INITRAMFS_ROOT_GID=$(shell id -g)' >> $(LINUX_DIR)/.config endef else define Kernel/SetInitramfs -- 2.30.2