[Buildroot] [PATCH] sudo: fix main executable permissions

spdawson at gmail.com spdawson at gmail.com
Fri Aug 3 12:48:31 UTC 2012


From: Simon Dawson <spdawson at gmail.com>

The sudo executable is installed without the setuid bit set, which prevents
sudo from working.

This patch adds a post-install hook to fix the permissions of the sudo
executable.

Signed-off-by: Simon Dawson <spdawson at gmail.com>
---
 package/sudo/sudo.mk |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/package/sudo/sudo.mk b/package/sudo/sudo.mk
index 9b0ebed..542edb6 100644
--- a/package/sudo/sudo.mk
+++ b/package/sudo/sudo.mk
@@ -14,4 +14,10 @@ SUDO_CONF_OPT = \
 		--without-interfaces \
 		--without-pam
 
+define SUDO_FIX_PERMISSIONS
+  chmod 4755 $(TARGET_DIR)/usr/bin/sudo
+endef
+
+SUDO_POST_INSTALL_TARGET_HOOKS += SUDO_FIX_PERMISSIONS
+
 $(eval $(autotools-package))
-- 
1.7.9.5



More information about the buildroot mailing list