From patchwork Fri Aug 3 12:48:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Dawson X-Patchwork-Id: 174986 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id E94A42C008B for ; Fri, 3 Aug 2012 22:48:48 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id BFEBF319EA; Fri, 3 Aug 2012 12:48:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qzQ1OtHwtkEj; Fri, 3 Aug 2012 12:48:46 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id DBA1331987; Fri, 3 Aug 2012 12:48:45 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 874858F753 for ; Fri, 3 Aug 2012 12:48:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 621C38FA05 for ; Fri, 3 Aug 2012 12:48:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GkK2y3b64-7N for ; Fri, 3 Aug 2012 12:48:42 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) by whitealder.osuosl.org (Postfix) with ESMTPS id 5DB468FA03 for ; Fri, 3 Aug 2012 12:48:42 +0000 (UTC) Received: by wibhm2 with SMTP id hm2so4707642wib.10 for ; Fri, 03 Aug 2012 05:48:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:x-mailer; bh=Dla2ej93tOVJK8PLKF1WdrR90HvH6QcnJfe2GwEUOJY=; b=ni7EWj7FRQkE+tf6e7pnbqJeGa76Pftk9aLboPp/L5051mEgW3MYyuKdjEQAaoxFC8 8N0Z7gooXj2Q3ZvDnpOL6hdpE0LrsosoB1iN++SuprkKoozx4IMC1L3MNsVjncvlbPsv Gqb1bvShGlE9/weFlvWPUT0J+FCuBN/RkY/WcaSqxD5SLcCHWlJrM3rIlMSpS+4Z2asu hAAWu/A8dXphsLa4grLKRNZWmyI80qeIyWtOL4xGyQWT7bumPy/RNgAWXsin2+/Q1Svl yF9WOJxhtpp4o8t9RPQyW79KiU6MG25unX4EaRbrS9WLaAJO/Bbl3uYxJze8clJxPZrr gR7A== Received: by 10.216.136.72 with SMTP id v50mr784188wei.203.1343998120134; Fri, 03 Aug 2012 05:48:40 -0700 (PDT) Received: from percy.train.local ([213.170.149.177]) by mx.google.com with ESMTPS id o2sm25691446wiz.11.2012.08.03.05.48.36 (version=SSLv3 cipher=OTHER); Fri, 03 Aug 2012 05:48:39 -0700 (PDT) From: spdawson@gmail.com To: buildroot@busybox.net Date: Fri, 3 Aug 2012 13:48:31 +0100 Message-Id: <1343998111-15331-1-git-send-email-spdawson@gmail.com> X-Mailer: git-send-email 1.7.9.5 Subject: [Buildroot] [PATCH] sudo: fix main executable permissions X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net From: Simon Dawson 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 --- 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))