luci-app-cjdns: Add rpcd acl file (#576)
authorWilliam Fleurant <meshnet@protonmail.com>
Wed, 10 Jun 2020 03:20:43 +0000 (23:20 -0400)
committerGitHub <noreply@github.com>
Wed, 10 Jun 2020 03:20:43 +0000 (23:20 -0400)
Signed-off-by: William Fleurant <meshnet@protonmail.com>
luci-app-cjdns/Makefile
luci-app-cjdns/files/luci-app-cjdns.json [new file with mode: 0644]

index bbc367e39a3636edfb872231d0c795981522efa3..9396528017e3dd2cec64c256eb0d6d3df8ef3584 100644 (file)
@@ -18,7 +18,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=luci-app-cjdns
 PKG_VERSION:=1.3
-PKG_RELEASE:=7
+PKG_RELEASE:=8
 
 PKG_MAINTAINER:=William Fleurant <meshnet@protonmail.com>
 PKG_LICENSE:=GPL-3.0-or-later
@@ -45,8 +45,9 @@ define Build/Compile
 endef
 
 define Package/luci-app-cjdns/install
-       $(INSTALL_DIR) $(1)/usr/lib/lua/luci
+       $(INSTALL_DIR) $(1)/usr/lib/lua/luci $(1)/usr/share/rpcd/acl.d
        $(CP) ./luasrc/* $(1)/usr/lib/lua/luci
+       $(CP) ./files/luci-app-cjdns.json $(1)/usr/share/rpcd/acl.d
 endef
 
 $(eval $(call BuildPackage,luci-app-cjdns))
diff --git a/luci-app-cjdns/files/luci-app-cjdns.json b/luci-app-cjdns/files/luci-app-cjdns.json
new file mode 100644 (file)
index 0000000..5ec2170
--- /dev/null
@@ -0,0 +1,15 @@
+{
+        "luci-app-cjdns": {
+                "description": "Grant access to LuCI app cjdns",
+                "read": {
+                        "uci": [ "cjdns" ]
+                },
+                "write": {
+                        "file": {
+                                "/usr/bin/cjdrouteconf": [ "exec" ]
+                        },
+                        "uci": [ "cjdns" ]
+                }
+        }
+}
+