From patchwork Fri Jan 12 09:29:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Einar_J=C3=B3n?= X-Patchwork-Id: 859687 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="aRzklpyU"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zHyBd5Bxcz9s81 for ; Fri, 12 Jan 2018 20:29:45 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 7138B874C7; Fri, 12 Jan 2018 09:29:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Xmm8nzG1lZ1j; Fri, 12 Jan 2018 09:29:39 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 3879D8678B; Fri, 12 Jan 2018 09:29:39 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 9DA221C2D4A for ; Fri, 12 Jan 2018 09:29:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 9803C2634A for ; Fri, 12 Jan 2018 09:29:37 +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 rzNl3sXNe1uB for ; Fri, 12 Jan 2018 09:29:37 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-oi0-f47.google.com (mail-oi0-f47.google.com [209.85.218.47]) by silver.osuosl.org (Postfix) with ESMTPS id CF8F525C8A for ; Fri, 12 Jan 2018 09:29:36 +0000 (UTC) Received: by mail-oi0-f47.google.com with SMTP id y141so3560535oia.0 for ; Fri, 12 Jan 2018 01:29:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=DLZIR7Wv8AVjuQV123C282zFKgPMcXV+SRgHQ6c8QPY=; b=aRzklpyUC8aVpJ1uC4BeyvdFW8WOXBS68IpyxYFazBGpaCL4LIw26YAO0Pj8kAuhP0 CKateh/dlGqrqWOP541ZDtFuQvdsWp5D1jY1bhKBj2yN2W8DK4q+YoruattgKGEL1o0c ETm/6AAIvPJIhsTjctqtbvRRTdcxfNGAkYotWtmoZQIWXtUWy+VxCmmCcY+XkyvUwIe/ p4RXU2BOKyQN1iEI64bTsGK5YX+nunL/7/zxU0FUpZCTqwPg0VrD7hqm6FqpatgruVwg G/iv2U91AjNTQn/Q5m/zqpyBm069Qrwqqd1g5KgD0RhFKPfpfCFk2a0ihLmZTu6d8nYY qFoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=DLZIR7Wv8AVjuQV123C282zFKgPMcXV+SRgHQ6c8QPY=; b=FCwB7qKWWh3O2822yxkSyiJBPYKp5w7JU8q6rJ2ME6oLeBwVqziFGP4tXI3Htn36Yc PMmAb3zJeYU/llcSjuXUNUANjqJCM42Iy+TkvzAdHsazI32n+tm1OVd787ySla5TOuVC ozSigtTBnY/tcLFEa7pwLPwd0xVkIwr548Gk1m+cFmQpnZj7B2zBnTqkc0yxC+L2Ypx2 js+291Pvd5s2bMde77Cjj4gohR/HszMvkxdBswXuXYw3+g9kyYjaRS2yg6WQvmbsuFTs eyMqF95Z3To/fhlxOJv2WmjrLO5qcYyU03ACULpxGXbMN1TXrpSzH2tDuFdGl9M1oyFi 2n5A== X-Gm-Message-State: AKwxytdAXtqOwvZKRoriT+arYMW1JXrY9xR+r5w3B00zBy/5CoAI0+n3 44FR/oQnSfYVpcNaShhXIyDs8g+1WYoq2gplQcOQrw== X-Google-Smtp-Source: ACJfBov1RjbZhgjmswtHIkz96KeSxofUTVduRFpquPDntRU8dCnpqHfUoCiuDJXqS8jHQ2u49gJPt1I8Kyh97O5cMv8= X-Received: by 10.202.53.84 with SMTP id c81mr7804051oia.63.1515749375424; Fri, 12 Jan 2018 01:29:35 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.12.106 with HTTP; Fri, 12 Jan 2018 01:29:35 -0800 (PST) From: =?utf-8?q?Einar_J=C3=B3n?= Date: Fri, 12 Jan 2018 10:29:35 +0100 Message-ID: To: buildroot@buildroot.org Subject: [Buildroot] Iputils not setting suid root? X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Hello, I just changed my setup from using busybox to using iputils. Now I can't ping/traceroute6 anymore unless I use sudo. Is that normal? In my ubuntu the suid bit is set, so I just copied that behaviour, and that works. I added the patch below to package/iputils/iputils.mk to set the permissions. Is there any reason why it's not done? ------------- [user@arm ~]$ ping google.com ping: socket: Operation not permitted ping: socket: Address family not supported by protocol [user@arm ~]$ ls -l $(which ping) -rwxr-xr-x 1 root root 47620 Jan 2 12:49 /bin/ping [user@arm ~]$ sudo chmod u+s /bin/ping [user@arm ~]$ ping google.com PING google.com (216.58.212.238) 56(84) bytes of data. 64 bytes from ams16s22-in-f14.1e100.net (216.58.212.238): icmp_seq=1 ttl=55 time=5.57 ms ^C diff --git a/package/iputils/iputils.mk b/package/iputils/iputils.mk index b20cd12..13e3389 100644 --- a/package/iputils/iputils.mk +++ b/package/iputils/iputils.mk @@ -69,4 +69,9 @@ define IPUTILS_INSTALL_TARGET_CMDS $(INSTALL) -D -m 755 $(@D)/traceroute6 $(TARGET_DIR)/bin/traceroute6 endef +define IPUTILS_PERMISSIONS + /bin/ping f 4755 0 0 - - - - - + /bin/traceroute6 f 4755 0 0 - - - - - +endef + $(eval $(generic-package))