Patchwork [v2] sudo: fix main executable permissions

login
register
mail settings
Submitter Simon Dawson
Date Aug. 4, 2012, 8:11 p.m.
Message ID <1344111062-4616-1-git-send-email-spdawson@gmail.com>
Download mbox | patch
Permalink /patch/175126/
State Accepted
Headers show

Comments

Simon Dawson - Aug. 4, 2012, 8:11 p.m.
From: Simon Dawson <spdawson@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@gmail.com>
---
 v2: Use generic package permissions mechanism, as suggested by Thomas
 Petazzoni

 package/sudo/sudo.mk |    4 ++++
 1 file changed, 4 insertions(+)

Patch

diff --git a/package/sudo/sudo.mk b/package/sudo/sudo.mk
index 9b0ebed..15e06fa 100644
--- a/package/sudo/sudo.mk
+++ b/package/sudo/sudo.mk
@@ -14,4 +14,8 @@  SUDO_CONF_OPT = \
 		--without-interfaces \
 		--without-pam
 
+define SUDO_PERMISSIONS
+/usr/bin/sudo			 f 4755	0 0 - - - - -
+endef
+
 $(eval $(autotools-package))