All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <petr.vorel@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] iputils: set the permissions with IPUTILS_PERMISSIONS
Date: Mon, 10 Jun 2019 01:07:02 +0200	[thread overview]
Message-ID: <20190609230702.7068-1-petr.vorel@gmail.com> (raw)

for arping, clockdiff and ping. These require root permission for
socket(). Upstream solution (script setcap-setuid.sh) requires
setcap binary on the host and cap_net_raw+ep + libcap or setting
setuid root executable which is dangerous).

This restores behavior used for version s20180629 (which was used
for ping and traceroute6, but we don't build traceroute6 since s20190515).

Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
---
Hi,

it'd be great also create symlink ping -> ping6, but don't know how.

Kind regards,
Petr
---
 package/iputils/iputils.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/package/iputils/iputils.mk b/package/iputils/iputils.mk
index d9a51ece2a..8be54b4788 100644
--- a/package/iputils/iputils.mk
+++ b/package/iputils/iputils.mk
@@ -52,4 +52,12 @@ endif
 # XSL Stylesheets for DocBook 5 not packaged for buildroot
 IPUTILS_CONF_OPTS += -DBUILD_MANS=false -DBUILD_HTML_MANS=false
 
+# handle permissions ourselves
+IPUTILS_CONF_OPTS += -DNO_SETCAP_OR_SUID=true
+define IPUTILS_PERMISSIONS
+	/bin/arping      f 4755 0 0 - - - - -
+	/bin/clockdiff   f 4755 0 0 - - - - -
+	/bin/ping        f 4755 0 0 - - - - -
+endef
+
 $(eval $(meson-package))
-- 
2.20.1

             reply	other threads:[~2019-06-09 23:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-09 23:07 Petr Vorel [this message]
2019-06-10 13:45 ` [Buildroot] [PATCH 1/1] iputils: set the permissions with IPUTILS_PERMISSIONS Arnout Vandecappelle
2019-06-10 20:06   ` Petr Vorel
2019-06-10 21:26     ` Arnout Vandecappelle
2019-06-13 19:37       ` Peter Korsgaard
2019-06-14 16:24         ` Petr Vorel
2019-06-18 12:45           ` Peter Korsgaard
2019-06-18 20:52             ` Petr Vorel
2019-06-18 21:31               ` Arnout Vandecappelle
2019-06-19  5:01                 ` Petr Vorel
2019-06-19  6:50                   ` Arnout Vandecappelle
2019-06-19  6:52                     ` Petr Vorel
2019-06-19  7:11                     ` Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190609230702.7068-1-petr.vorel@gmail.com \
    --to=petr.vorel@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.