aboutsummaryrefslogtreecommitdiff
path: root/net/p910nd/Makefile
diff options
context:
space:
mode:
authorDaniel F. Dickinson <cshored@thecshore.com>2019-07-26 23:47:01 -0400
committerYousong Zhou <yszhou4tech@gmail.com>2019-08-02 15:58:57 +0800
commit932c76fa740acb0d68a46b78e2bc0eafd5fe13d6 (patch)
tree12c9e1df5ea0cf9b98e738ab5c210478c7e1c6f2 /net/p910nd/Makefile
parent4832480dc0741bf14c69448329c40d4a83e4544f (diff)
p910nd: Run as non-root by default
We add the necessary Makefile, hotplug, config, and init bits so that p910nd daemon runs as user:group p910nd:lp by default. This eliminates an unnecessary root daemon. The hotplug script sets the permissions of the USB lp device(s) to read-write owner and group and no access to anyone else, and sets owner root, group lp. This is allows sufficient privileges to p910nd to do it's job. Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
Diffstat (limited to 'net/p910nd/Makefile')
-rw-r--r--net/p910nd/Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/p910nd/Makefile b/net/p910nd/Makefile
index 12b4e8637..cfe4ea7d9 100644
--- a/net/p910nd/Makefile
+++ b/net/p910nd/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=p910nd
PKG_VERSION:=0.97
-PKG_RELEASE:=7
+PKG_RELEASE:=8
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/p910nd
@@ -28,6 +28,7 @@ define Package/p910nd
SUBMENU:=Printing
TITLE:=A small non-spooling printer server
URL:=http://p910nd.sourceforge.net
+ USERID:=p910nd=393:lp=7
endef
define Package/p910nd/conffiles
@@ -54,6 +55,8 @@ define Package/p910nd/install
$(INSTALL_DATA) ./files/p910nd.config $(1)/etc/config/p910nd
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/p910nd.init $(1)/etc/init.d/p910nd
+ $(INSTALL_DIR) $(1)/etc/hotplug.d/usbmisc
+ $(INSTALL_BIN) ./files/p910nd.hotplug $(1)/etc/hotplug.d/usbmisc/20-p910nd
endef
$(eval $(call BuildPackage,p910nd))