rewrite all ACL files. New system is much nicer.

Acls now are of the form:
<scope> <object> <method> <perm>
This commit is contained in:
Martin Schröder 2016-02-18 00:21:21 +01:00
parent dd8efddcfc
commit a57e392514
89 changed files with 236 additions and 1021 deletions

9
juci/access.acl Normal file
View File

@ -0,0 +1,9 @@
ubus /uci get x
ubus /uci set x
ubus /uci apply x
ubus /uci revert x
ubus /uci commit x
ubus /uci rollback x
ubus /uci configs x
ubus /system board
ubus /system info

View File

@ -1,66 +0,0 @@
{
"unauthenticated": {
"description": "These extend default unauthenticated acl with some extra things for juci",
"read": {
"ubus": {
"juci.ui": [
"themes"
],
"uci": [
"get",
"state",
"configs"
]
},
"uci": [ "juci" ]
}
},
"user-admin": {
"description": "Capabilities assigned to administrator user",
"read": {
"juci": {
"capabilities": [
"can-pick-uplink-port"
]
}
}
},
"core": {
"description": "Core functions for JUCI (TODO: remove)",
"read": {
"ubus": {
"/juci/system": [
"events"
],
"juci.ui": [
"*"
],
"session": [
"access",
"destroy"
],
"uci": [
"*"
]
}
}
},
"juci-core": {
"read": {
"juci-io": {
"backup": [ "read" ]
},
"ubus": {
"juci": [
"install"
]
}
},
"write": {
"juci-io": {
"upload": [ "write" ]
}
}
}
}

View File

@ -28,9 +28,7 @@
"local.features",
"local.set_rpc_host"
];
var connect = null;
function rpc_request(type, namespace, method, data){
var sid = "";
@ -56,9 +54,9 @@
});
RPC_CACHE = retain;
data.ubus_rpc_session = RPC_SESSION_ID;
data._ubus_session_id = RPC_SESSION_ID;
//if(!connect) connect = $rpc2.$connect("ws://"+window.location.host+"/websocket/");
if(!connect) connect = $rpc2.$connect("ws://localhost:1234");
if(!connect) connect = $rpc2.$connect("ws://192.168.2.1:1234");
// if(!connect) connect = $rpc2.$connect("ws://192.168.1.1/websocket/");
connect.done(function(){
if(type == "call"){
@ -75,8 +73,9 @@
//console.log("request ("+time_taken+"ms): "+type+", object="+namespace+", method="+method+", data="+JSON.stringify(data)+", resp="+JSON.stringify(ret));
def.resolve(ret);
}
}).fail(function(){
console.log("RPC FAIL!");
}).fail(function(err){
var def = RPC_CACHE[key].deferred;
console.error("RPC ERROR ("+namespace+","+method+"): "+err);
def.reject();
});
} else if(type == "list"){
@ -158,7 +157,7 @@
var self = this;
var deferred = $.Deferred();
if(!self.session){
if(!RPC_SESSION_ID){
setTimeout(function(){ deferred.reject(); }, 0);
return deferred.promise();
}
@ -168,25 +167,13 @@
// of the new tab as well. We therefore need to take sid from the local storage so we always have latest sid!
var stored_sid = scope.localStorage.getItem("sid");
if(stored_sid !== RPC_DEFAULT_SESSION_ID) RPC_SESSION_ID = stored_sid;
self.session.access({
//"ubus_rpc_session": RPC_SESSION_ID,
"scope": "ubus"
}).done(function(result){
if(!("username" in (result.data||{}))) {
// username must be returned in the response. If it is not returned then rpcd is of wrong version.
//alert(gettext("You have been logged out due to inactivity"));
RPC_SESSION_ID = RPC_DEFAULT_SESSION_ID; // reset sid to 000..
scope.localStorage.setItem("sid", RPC_SESSION_ID);
deferred.reject();
} else {
self.$session = result;
if(!("data" in self.$session)) self.$session.data = {};
//console.log("Session: Loggedin! ");
deferred.resolve(result);
}
$rpc2.$authenticate(RPC_SESSION_ID).done(function(result){
self.$session = {};
deferred.resolve();
}).fail(function err(result){
RPC_SESSION_ID = RPC_DEFAULT_SESSION_ID;
scope.localStorage.setItem("sid", RPC_SESSION_ID);
console.error("Session access call failed: you will be logged out!");
deferred.reject();
});
@ -201,13 +188,9 @@
return deferred.promise();
}
self.session.login({
"username": opts.username,
"password": opts.password
}).done(function(result){
RPC_SESSION_ID = result.ubus_rpc_session;
$rpc2.$login(opts.username, opts.password).done(function(result){
RPC_SESSION_ID = result;
scope.localStorage.setItem("sid", RPC_SESSION_ID);
self.$session = result;
//JUCI.localStorage.setItem("sid", self.sid);
//if(result && result.acls && result.acls.ubus) setupUbusRPC(result.acls.ubus);
deferred.resolve(self.sid);

View File

@ -15,7 +15,7 @@
*/
(function(scope){
var RPC_DEFAULT_SESSION_ID = "00000000000000000000000000000000";
var RPC_DEFAULT_SESSION_ID = "";
var gettext = function(text){ return text; };
@ -24,6 +24,7 @@
this.events = {};
this.seq = parseInt(Math.random()*65535);
this.connected = false;
this.sid = RPC_DEFAULT_SESSION_ID;
}
RPC.prototype.$connect = function(address){
@ -73,7 +74,7 @@
if(!msg.jsonrpc || msg.jsonrpc != "2.0") return;
if(msg.id && msg.result != undefined && self.requests[msg.id]){
var req = self.requests[msg.id];
console.log("RPC response ("+((new Date()).getTime() - req.time)+"ms): "+JSON.stringify(msg.result));
console.log("RPC response "+req.method+" "+JSON.stringify(req.params)+" ("+((new Date()).getTime() - req.time)+"ms): "+JSON.stringify(msg.result));
req.deferred.resolve(msg.result);
} else if(msg.id && msg.error != undefined && self.requests[msg.id]){
self.requests[msg.id].deferred.reject(msg.error);
@ -87,30 +88,74 @@
}
});
}
RPC.prototype.$call = function(object, method, data){
RPC.prototype.$authenticate = function(sid){
var self = this;
self.seq++;
var req = self.requests[self.seq] = {
id: self.seq,
var def = $.Deferred();
self.$request("authenticate", [sid]).done(function(){
self.sid = sid;
def.resolve();
}).fail(function(){
def.reject();
});
return def.promise();
}
RPC.prototype.$login = function(username, password){
var self = this;
var def = $.Deferred();
self.$request("challenge").done(function(resp){
console.log("GOT CHALLENGE: "+JSON.stringify(resp));
var sha = new jsSHA("SHA-1", "TEXT");
var pwhash = new jsSHA("SHA-1", "TEXT");
pwhash.update(username);
sha.update(resp.token);
sha.update(pwhash.getHash("HEX"));
self.$request("login", [username, sha.getHash("HEX")]).done(function(resp){
console.log("LOGIN RESULT: "+JSON.stringify(resp));
if(resp.success) self.sid = resp.success;
def.resolve(resp.success);
}).fail(function(){
def.reject();
});
}).fail(function(){
def.reject();
});
return def.promise();
}
RPC.prototype.$request = function(method, params){
var self = this;
self.seq++;
var req = self.requests[self.seq] = {
id: self.seq,
time: (new Date()).getTime(),
deferred: $.Deferred()
};
var str = JSON.stringify({
jsonrpc: "2.0",
id: req.id,
method: "call",
params: [object, method, data]
})+"\n";
//console.log("websocket > "+str);
method: method,
params: params,
deferred: $.Deferred()
};
var str = JSON.stringify({
jsonrpc: "2.0",
id: req.id,
method: method,
params: params || []
})+"\n";
console.log("websocket > "+str);
try {
self.socket.send(str);
} catch(e){
console.error("Websocket error: "+e);
self.socket.onclose();
}
return req.deferred.promise();
return req.deferred.promise();
}
RPC.prototype.$call = function(object, method, data){
this.sid = localStorage.getItem("sid");
return this.$request("call", [this.sid, object, method, data]);
}
RPC.prototype.$subscribe = function(name, func){
if(!this.events[name]) this.events[name] = [];
this.events[name].push(func);
@ -124,22 +169,7 @@
}
RPC.prototype.$list = function(){
var self = this;
self.seq++;
var req = self.requests[self.seq] = {
id: self.seq,
deferred: $.Deferred()
};
var str = JSON.stringify({
jsonrpc: "2.0",
id: req.id,
method: "list",
params: ["*"]
})+"\n";
console.log("websocket > "+str);
self.socket.send(str);
return req.deferred.promise();
return this.$request("list", [this.sid, "*"]);
}
scope.UBUS2 = scope.$rpc2 = new RPC();

View File

@ -0,0 +1,3 @@
uci network * r
uci ddns * rw
ubus /juci/ddns providers x

View File

@ -1,21 +0,0 @@
{
"juci-ddns": {
"description": "JUCI DDNS module",
"read": {
"uci": [
"network",
"ddns"
],
"ubus": {
"/juci/ddns": [
"providers"
]
}
},
"write": {
"uci": [
"ddns"
]
}
}
}

View File

@ -0,0 +1,4 @@
ubus /juci/utils.speedtest run x
ubus /juci/diagnostics ping x
ubus /juci/diagnostics traceroute x
uci speedtest * rw

View File

@ -1,24 +0,0 @@
{
"juci-diagnostics": {
"description": "JUCI Diagnostics module",
"read": {
"ubus": {
"juci.utils.speedtest": [
"run"
],
"/juci/diagnostics": [
"ping",
"traceroute"
]
},
"uci": [
"speedtest"
]
},
"write": {
"uci": [
"speedtest"
]
}
}
}

View File

@ -0,0 +1,3 @@
uci dhcp * rw
ubus /juci/dhcp ipv4leases x
ubus /juci/dhcp ipv6leases x

View File

@ -1,21 +0,0 @@
{
"juci-dnsmasq-dhcp": {
"description": "JUCI DNSMasq-DHCP Server module",
"read": {
"uci": [
"dhcp"
],
"ubus": {
"/juci/dhcp": [
"ipv4leases",
"ipv6leases"
]
}
},
"write": {
"uci": [
"dhcp"
]
}
}
}

View File

@ -0,0 +1,4 @@
ubus /juci/dropbear add_public_key x
ubus /juci/dropbear get_public_key x
ubus /juci/dropbear remove_public_key x
uci dropbear * rw

View File

@ -1,22 +0,0 @@
{
"juci-dropbear": {
"description": "JUCI dropbear module",
"read": {
"ubus": {
"/juci/dropbear": [
"add_public_key",
"get_public_keys",
"remove_public_key"
]
},
"uci": [
"dropbear"
]
},
"write": {
"uci": [
"dropbear"
]
}
}
}

View File

@ -1,5 +0,0 @@
{
"juci-dynamic-translator": {
"description": "Provides a translation overrides for any translatable string."
}
}

View File

@ -0,0 +1 @@
ubus /juci/ethernet adapters x

View File

@ -1,12 +0,0 @@
{
"juci-ethernet": {
"description": "JUCI ethernet module",
"read": {
"ubus": {
"/juci/ethernet": [
"adapters"
]
}
}
}
}

View File

@ -0,0 +1 @@
ubus /juci/event poll x

View File

@ -1,12 +0,0 @@
{
"juci-event": {
"description": "JUCI event module",
"read": {
"ubus": {
"juci.event": [
"poll"
]
}
}
}
}

View File

@ -0,0 +1,4 @@
ubus /network.interface status x
ubus /juci/firewall.dmz x
ubus /juci/system.time timediff x
uci firewall * rw

View File

@ -1,26 +0,0 @@
{
"juci-firewall-fw3": {
"description": "JUCI FW3 Firewall module",
"read": {
"ubus": {
"network.interface": [
"status"
],
"/juci/firewall.dmz": [
"excluded_ports"
],
"/juci/system.time": [
"timediff"
]
},
"uci": [
"firewall"
]
},
"write": {
"uci": [
"firewall"
]
}
}
}

View File

@ -0,0 +1 @@
uci freecwmp * rw

View File

@ -1,15 +0,0 @@
{
"juci-freecwmp": {
"description": "JUCI freecwmp TR-069 module",
"read": {
"uci": [
"freecwmp"
]
},
"write": {
"uci": [
"freecwmp"
]
}
}
}

View File

@ -0,0 +1,5 @@
uci minidlna * rw
ubus /juci/minidlna folder_tree x
ubus /juci/minidlna autocomplete x
ubus /juci/minidlna status x
ubus /juci/system.service status x

View File

@ -1,25 +0,0 @@
{
"juci-generate-page": {
"description": "JUCI MiniDLNA module",
"read": {
"uci": [
"minidlna"
],
"ubus": {
"/juci/minidlna": [
"folder_tree",
"autocomplete",
"status"
],
"/juci/system.service": [
"status"
]
}
},
"write": {
"uci": [
"minidlna"
]
}
}
}

View File

@ -0,0 +1 @@
uci cwmp * rw

View File

@ -1,15 +0,0 @@
{
"juci-icwmp": {
"description": "JUCI icwmp TR-069 module",
"read": {
"uci": [
"cwmp"
]
},
"write": {
"uci": [
"cwmp"
]
}
}
}

View File

@ -0,0 +1 @@
ubus /juci/iptv igmptable x

View File

@ -1,12 +0,0 @@
{
"juci-igmpinfo": {
"description": "JUCI IPTV/IGMP module",
"read": {
"ubus": {
"/juci/iptv": [
"igmptable"
]
}
}
}
}

View File

@ -0,0 +1 @@
uci backup * rw

View File

@ -1,15 +0,0 @@
{
"juci-inteno-backup": {
"description": "JUCI Backup Configuration",
"read": {
"uci": [
"backup"
]
},
"write": {
"uci": [
"backup"
]
}
}
}

View File

@ -0,0 +1,3 @@
ubus /juci/broadcom.dsl status x
uci layer2_interface_adsl * rw
uci layer2_interface_vdsl * rw

View File

@ -1,24 +0,0 @@
{
"juci-broadcom-dsl": {
"description": "Broadcom dsl plugin",
"read": {
"ubus": {
"/juci/broadcom.dsl": [
"status"
]
},
"uci": [
"layer2_interface_adsl",
"layer2_interface_vdsl"
]
}
},
"juci-broadcom-dsl-admin": {
"write": {
"uci": [
"layer2_interface_adsl",
"layer2_interface_vdsl"
]
}
}
}

View File

@ -0,0 +1,4 @@
ubus /juci/ethernet adapters x
uci layer2_interface_ethernet * rw
uci ports * rw
uci layer2_interface_vlan * rw

View File

@ -1,44 +0,0 @@
{
"user-admin": {
"description": "Broadcom ethernet admin functions",
"read": {
"juci": {
"capabilities": [
"can-pick-uplink-port",
"can-set-pauseframes"
]
}
}
},
"user-support": {
"description": "Broadcom ethernet support functions",
"read": {
"juci": {
"capabilities": [
"can-pick-uplink-port",
"can-set-pauseframes"
]
}
}
},
"juci-broadcom-ethernet": {
"description": "Broadcom ethernet plugin",
"read": {
"ubus": {
"/juci/ethernet": [
"adapters"
]
},
"uci": [
"layer2_interface_ethernet",
"ports"
]
},
"write": {
"uci": [
"layer2_interface_vlan",
"ports"
]
}
}
}

View File

@ -0,0 +1 @@
uci mcpd * rw

View File

@ -1,15 +0,0 @@
{
"juci-broadcom-iptv": {
"description": "Broadcom iptv plugin",
"read": {
"uci": [
"mcpd"
]
},
"write": {
"uci": [
"mcpd"
]
}
}
}

View File

@ -0,0 +1 @@
uci power_mgmt * rw

View File

@ -1,15 +0,0 @@
{
"juci-broadcom-pwrmgmt": {
"description": "Broadcom power management plugin",
"read": {
"uci": [
"power_mgmt"
]
},
"write": {
"uci": [
"power_mgmt"
]
}
}
}

View File

@ -0,0 +1 @@
uci layer2_interface_vlan * rw

View File

@ -1,17 +0,0 @@
{
"juci-broadcom-vlan": {
"description": "Broadcom vlan plugin",
"read": {
"uci": [
"layer2_interface_vlan"
]
}
},
"juci-broadcom-vlan-admin": {
"write": {
"uci": [
"layer2_interface_vlan"
]
}
}
}

View File

@ -0,0 +1,16 @@
ubus /juci/wireless.wps genpin x
ubus /juci/wireless.wps pbc x
ubus /juci/wireless.wps setpin x
ubus /juci/wireless.wps showpin x
ubus /juci/wireless.wps stapin x
ubus /juci/wireless.wps status x
ubus /juci/wireless.wps stop x
ubus /juci/wireless defaults x
ubus /juci/wireless radios x
ubus /juci/wireless devices x
ubus /juci/wireless clients x
ubus /juci/wireless scan x
ubus /juci/wireless scanresults x
uci hosts * rw
uci wireless * rw
uci boardpanel * rw

View File

@ -1,44 +0,0 @@
{
"juci-broadcom-wl": {
"description": "Broadcom wireless plugin",
"read": {
"ubus": {
"/juci/wireless.wps": [
"genpin",
"pbc",
"setpin",
"showpin",
"stapin",
"status",
"stop"
],
"/juci/wireless": [
"defaults",
"radios",
"devices",
"clients",
"scan",
"scanresults"
],
"juci.broadcom.wld": [
"scan",
"scanresults"
]
},
"uci": [
"hosts",
"wireless",
"boardpanel"
]
}
},
"juci-broadcom-wl-admin": {
"write": {
"uci": [
"wireless",
"hosts",
"boardpanel"
]
}
}
}

View File

@ -0,0 +1,5 @@
ubus /sys.dect status rw
ubus /sys.dect ping rw
ubus /sys.dect pair rw
ubus /sys.dect.handset.* ping rw
uci dect * rw

View File

@ -1,25 +0,0 @@
{
"juci-natalie-dect": {
"description": "JUCI natalie-dect module",
"read": {
"ubus": {
"sys.dect": [
"status",
"ping",
"pair"
],
"sys.dect.handset.*": [
"ping"
]
},
"uci": [
"dect"
]
},
"write": {
"uci": [
"dect"
]
}
}
}

View File

View File

@ -1,24 +0,0 @@
{
"juci-iconnect": {
"description": "JUCI UBUS interconnect frontend",
"read": {
"ubus": {
"iconnect": [
"login",
"logout",
"call",
"list",
"clients"
],
},
"uci": [
"iconnect"
]
},
"write": {
"uci": [
"iconnect"
]
}
}
}

View File

@ -0,0 +1 @@
uci multiwan * rw

View File

@ -1,15 +0,0 @@
{
"juci-inteno-multiwan": {
"description": "JUCI Multiwan Configuration",
"read": {
"uci": [
"multiwan"
]
},
"write": {
"uci": [
"multiwan"
]
}
}
}

View File

@ -0,0 +1,2 @@
ubus /juci/netmode select x
uci netmode * rw

View File

@ -1,20 +0,0 @@
{
"juci-netmode": {
"description": "JUCI Netmode support module for iopsys",
"read": {
"ubus": {
"/juci/netmode": [
"select"
]
},
"uci": [
"netmode"
]
},
"write": {
"uci": [
"netmode"
]
}
}
}

View File

@ -0,0 +1,2 @@
uci provisioning * rw
iup download backup r

View File

@ -1,18 +0,0 @@
{
"juci-inteno-provisioning": {
"description": "JUCI inteno provisioning module",
"read": {
"uci": [
"provisioning"
],
"juci-backup-iup": [
"download"
]
},
"write": {
"uci": [
"provisioning"
]
}
}
}

View File

@ -0,0 +1 @@
uci qos * rw

View File

@ -1,15 +0,0 @@
{
"juci-inteno-qos": {
"description": "JUCI Quality-of-service Configuration",
"read": {
"uci": [
"qos"
]
},
"write": {
"uci": [
"qos"
]
}
}
}

View File

@ -0,0 +1 @@
ubus /juci/iptv igmptable x

View File

@ -1,12 +0,0 @@
{
"juci-inteno-router": {
"description": "JUCI Inteno Router Interface",
"read": {
"ubus": {
"/juci/iptv": [
"igmptable"
]
}
}
}
}

View File

@ -0,0 +1,6 @@
ubus asterisk status x
ubus asterisk.call_log list x
ubus /juci/voice_client get_trusted_ca x
ubus /juci/voice_client set_trusted_ca x
ubus /juci/system reboot x
uci voice_client * rw

View File

@ -1,30 +0,0 @@
{
"juci-inteno-voice-client": {
"description": "JUCI asterisk module",
"read": {
"ubus": {
"asterisk": [
"status"
],
"asterisk.call_log": [
"list"
],
"/juci/voice_client": [
"get_trusted_ca",
"set_trusted_ca"
],
"/juci/system": [
"reboot"
]
},
"uci": [
"voice_client"
]
},
"write": {
"uci": [
"voice_client"
]
}
}
}

View File

@ -0,0 +1,5 @@
uci minidlna * rw
ubus /juci/minidlna folder_tree x
ubus /juci/minidlna autocomplete x
ubus /juci/minidlna status x
ubus /juci/system.service status x

View File

@ -1,25 +0,0 @@
{
"juci-minidlna": {
"description": "JUCI MiniDLNA module",
"read": {
"uci": [
"minidlna"
],
"ubus": {
"/juci/minidlna": [
"folder_tree",
"autocomplete",
"status"
],
"/juci/system.service": [
"status"
]
}
},
"write": {
"uci": [
"minidlna"
]
}
}
}

View File

@ -0,0 +1 @@
uci snmpd * rw

View File

@ -1,15 +0,0 @@
{
"juci-minisnmpd": {
"description": "JUCI MiniSNMP module",
"read": {
"uci": [
"snmpd"
]
},
"write": {
"uci": [
"snmpd"
]
}
}
}

View File

@ -0,0 +1 @@
ubus /system info x

View File

@ -1,12 +0,0 @@
{
"juci-mod-status": {
"description": "JUCI status module",
"read": {
"ubus": {
"system": [
"info"
]
}
}
}
}

View File

@ -0,0 +1,29 @@
ubus /juci/system defaultreset x
ubus /juci/system filesystems x
ubus /juci/system log x
ubus /juci/system reboot x
ubus /juci/system info x
ubus /juci/system.upgrade check x
ubus /juci/system.upgrade test x
ubus /juci/system.upgrade start x
ubus /juci/system.upgrade clean x
ubus /juci/system.user setpassword x
ubus /juci/system.user listusers x
ubus /juci/system.time zonelist x
ubus /juci/system.time get x
ubus /juci/system.time set x
ubus /juci/system.conf restore x
ubus /juci/system.conf defaultreset x
ubus /juci/system.conf features x
ubus /juci/system.conf list x
ubus /juci/system.process list x
ubus /juci/system.service list x
ubus /juci/system.service start x
ubus /juci/system.service stop x
ubus /juci/system.service enable x
ubus /juci/system.service disable x
ubus /juci/system.service reload x
ubus /juci/system info x
ubus /juci/system board x
uci system * rw
juci backup download r

View File

@ -1,80 +0,0 @@
{
"juci-mod-system": {
"description": "JUCI system module",
"read": {
"ubus": {
"/juci/system": [
"defaultreset",
"filesystems",
"log",
"reboot",
"info"
],
"/juci/system.upgrade": [
"check",
"test",
"start",
"clean"
],
"/juci/system.user": [
"setpassword",
"listusers"
],
"/juci/system.time": [
"zonelist",
"get",
"set"
],
"/juci/system.conf": [
"restore",
"defaultreset",
"features",
"list"
],
"/juci/system.process": [
"list"
],
"/juci/system.service": [
"list",
"start",
"stop",
"enable",
"disable",
"reload"
],
"system": [
"info",
"board"
]
},
"uci": [
"system"
],
"juci-io": [
"backup"
]
},
"write": {
"juci-io": [ "upload" ],
"passwd": [ "self" ],
"ubus": {
"/juci/system.service": [
"start",
"stop",
"enable",
"disable",
"reload"
]
},
"uci": [
"system"
]
}
},
"juci-mod-system-admin": {
"write": {
"passwd": [ "otheruser" ]
}
}
}

View File

@ -0,0 +1,18 @@
ubus /juci/swconfig status x
ubus /juci/network clients x
ubus /juci/network load x
ubus /juci/network nat_table x
ubus /juci/network nameservers x
ubus /juci/network services x
ubus /juci/network protocols x
ubus /juci/modems list x
ubus /juci/modems list4g x
ubus /juci/network.status arp x
ubus /juci/network.status ipv4routes x
ubus /juci/network.status ipv6routes x
ubus /juci/network.status ipv6neigh x
ubus /network.interface dump x
ubus /router boardinfo x
ubus /router clients x
uci layer2_interface_ethernet * rw
uci network * rw

View File

@ -1,47 +0,0 @@
{
"juci-network-netifd": {
"description": "JUCI Network Configuration module",
"read": {
"ubus": {
"/juci/swconfig": [
"status"
],
"/juci/network": [
"clients",
"load",
"nat_table",
"nameservers",
"services",
"protocols"
],
"/juci/modems": [
"list",
"list4g"
],
"/juci/network.status": [
"arp",
"ipv4routes",
"ipv6routes",
"ipv6neigh"
],
"network.interface": [
"dump"
],
"router": [
"boardinfo",
"clients"
]
},
"uci": [
"layer2_interface_ethernet",
"network"
]
},
"write": {
"uci": [
"layer2_interface_ethernet",
"network"
]
}
}
}

View File

@ -0,0 +1,8 @@
ubus /juci/wireless devices x
ubus /juci/wireless caps x
ubus /juci/wireless radios x
ubus /juci/wireless clients x
ubus /juci/wireless countrylist x
ubus /juci/wireless htmodelist x
ubus /juci/wireless freqlist x
uci wireless * rw

View File

@ -1,22 +0,0 @@
{
"juci-openwrt-wireless": {
"description": "JUCI OpenWRT Wireless Configuration",
"read": {
"ubus": {
"/juci/wireless": [
"devices",
"caps",
"radios",
"clients",
"countrylist",
"htmodelist",
"freqlist"
]
},
"uci": [ "wireless" ]
},
"write": {
"uci": [ "wireless" ]
}
}
}

View File

@ -0,0 +1 @@
uci p910nd * rw

View File

@ -1,15 +0,0 @@
{
"juci-printer": {
"description": "JUCI printer module",
"read": {
"uci": [
"p910nd"
]
},
"write": {
"uci": [
"p910nd"
]
}
}
}

View File

View File

@ -0,0 +1 @@
ubus /juci/rtgraphs get x

View File

@ -1,10 +0,0 @@
{
"juci-realtime-graphs": {
"description": "JUCI Realtime Graphs Module",
"read": {
"ubus": {
"/juci/rtgraphs": [ "get" ]
}
}
}
}

View File

@ -0,0 +1,3 @@
uci sambe * rw
ubus /juci/samba folder_tree x
ubus /juci/samba autocomplete x

View File

@ -1,27 +0,0 @@
{
"juci-samba": {
"description": "JUCI Samba module",
"read": {
"uci": [
"samba"
],
"ubus": {
"/juci/samba": [
"folder_tree",
"autocomplete"
]
}
},
"write": {
"uci": [
"samba"
],
"ubus": {
"/juci/samba": [
"folder_tree",
"autocomplete"
]
}
}
}
}

View File

View File

@ -1,5 +0,0 @@
{
"juci-simple-gui": {
"description": "Provides simple versions of many standard pages for configuring things"
}
}

View File

@ -0,0 +1 @@
uci snmpd * rw

View File

@ -1,15 +0,0 @@
{
"juci-snmpd": {
"description": "JUCI SNMPD module",
"read": {
"uci": [
"snmpd"
]
},
"write": {
"uci": [
"snmpd"
]
}
}
}

View File

@ -0,0 +1,5 @@
ubus /juci/system.upgrade check x
ubus /juci/system.upgrade test x
ubus /juci/system.upgrade start x
ubus /juci/system.upgrade clean x
uci system * rw

View File

@ -1,27 +0,0 @@
{
"juci-sysupgrade": {
"description": "JUCI Sysupgrade Interface module",
"read": {
"ubus": {
"/juci/system.upgrade": [
"check",
"test",
"start",
"clean"
]
},
"uci": [ "system" ]
},
"write": {
"uci": [ "system" ],
"ubus": {
"/juci/system.upgrade": [
"check",
"test",
"start",
"clean"
]
}
}
}
}

View File

@ -0,0 +1,2 @@
uci uhttpd * rw
uci logopts * rw

View File

@ -1,17 +0,0 @@
{
"juci-uhttpd": {
"description": "JUCI uHTTPD plugin",
"read": {
"uci": [
"uhttpd",
"logopts"
]
},
"write": {
"uci": [
"uhttpd",
"logopts"
]
}
}
}

View File

@ -0,0 +1,2 @@
ubus /juci/upnpd ports x
uci upnpd * rw

View File

@ -1,20 +0,0 @@
{
"juci-upnp": {
"description": "JUCI UPNPD module",
"read": {
"ubus": {
"/juci/upnpd": [
"ports"
]
},
"uci": [
"upnpd"
]
},
"write": {
"uci": [
"upnpd"
]
}
}
}

View File

@ -0,0 +1 @@
ubus /juci/usb list x

View File

@ -1,12 +0,0 @@
{
"juci-usb": {
"description": "JUCI USB Module",
"read": {
"ubus": {
"/juci/usb": [
"list"
]
}
}
}
}