* [Buildroot] [PATCH] sudo: fix main executable permissions
@ 2012-08-03 12:48 spdawson at gmail.com
2012-08-04 12:43 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: spdawson at gmail.com @ 2012-08-03 12:48 UTC (permalink / raw)
To: buildroot
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>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] sudo: fix main executable permissions
2012-08-03 12:48 [Buildroot] [PATCH] sudo: fix main executable permissions spdawson at gmail.com
@ 2012-08-04 12:43 ` Thomas Petazzoni
2012-08-04 20:10 ` Simon Dawson
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2012-08-04 12:43 UTC (permalink / raw)
To: buildroot
Le Fri, 3 Aug 2012 13:48:31 +0100,
spdawson at gmail.com a ?crit :
> +define SUDO_FIX_PERMISSIONS
> + chmod 4755 $(TARGET_DIR)/usr/bin/sudo
> +endef
> +
> +SUDO_POST_INSTALL_TARGET_HOOKS += SUDO_FIX_PERMISSIONS
The principle is good, but not the way it is implemented. Please use
the <pkg>_PERMISSIONS infrastructure instead. See the documentation, or
package/busybox/busybox.mk for an example.
Thanks!
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] sudo: fix main executable permissions
2012-08-04 12:43 ` Thomas Petazzoni
@ 2012-08-04 20:10 ` Simon Dawson
0 siblings, 0 replies; 3+ messages in thread
From: Simon Dawson @ 2012-08-04 20:10 UTC (permalink / raw)
To: buildroot
On 4 August 2012 13:43, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> The principle is good, but not the way it is implemented. Please use
> the <pkg>_PERMISSIONS infrastructure instead. See the documentation, or
> package/busybox/busybox.mk for an example.
Okay, thanks Thomas.
Simon.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-08-04 20:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-03 12:48 [Buildroot] [PATCH] sudo: fix main executable permissions spdawson at gmail.com
2012-08-04 12:43 ` Thomas Petazzoni
2012-08-04 20:10 ` Simon Dawson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox