mirror of
https://github.com/openwrt/packages.git
synced 2025-12-21 23:34:31 +04:00
fping: install fping SUID root
fping requires either root or CAP_NET_PING to work, otherwise it is useless. Use INSTALL_SUID so that fping will be setuid root, and thus it will be usable by non-root users. fping knows to drop root priviledges after it parses the command line and creates the ping socket. You actually get a lot less code running as root when you make it setuid root and run it from an unprivileged user. This is the same way net/iputils already handles "ping", which has the same requirements. Signed-off-by: Henrique de Moraes Holschuh <henrique@nic.br>
This commit is contained in:
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=fping
|
PKG_NAME:=fping
|
||||||
PKG_VERSION:=4.2
|
PKG_VERSION:=4.2
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://fping.org/dist/
|
PKG_SOURCE_URL:=https://fping.org/dist/
|
||||||
@@ -46,7 +46,7 @@ CONFIGURE_ARGS+= \
|
|||||||
|
|
||||||
define Package/fping/install
|
define Package/fping/install
|
||||||
$(INSTALL_DIR) $(1)/usr/bin
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fping $(1)/usr/bin/
|
$(INSTALL_SUID) $(PKG_INSTALL_DIR)/usr/sbin/fping $(1)/usr/bin/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,fping))
|
$(eval $(call BuildPackage,fping))
|
||||||
|
|||||||
Reference in New Issue
Block a user