Jo-Philipp Wich
a75c310e7c
iwinfo: add phyname procedure
...
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-02-11 14:07:31 +01:00
Jo-Philipp Wich
7b7f254682
session: fix method signatures for create, list and destroy
...
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-02-09 12:51:44 +01:00
Felix Fietkau
1ceab6196f
iwinfo: add support for requesting assoc info for a specific mac address
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-11-29 19:43:00 +01:00
Felix Fietkau
d99e8adc4f
iwinfo: add 802.11ac hw mode
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-10-20 15:49:24 +02:00
Felix Fietkau
ed7d16a3e0
iwinfo: use UBUS_METHOD_NOARG
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-10-04 19:55:58 +02:00
Felix Fietkau
c1ed6d7856
plugin.h: explicitly include json.h
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-10-04 19:54:58 +02:00
Jo-Philipp Wich
7fd4564b8a
plugin: fix parsing libexec plugin output
...
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2014-07-04 00:06:43 +02:00
Felix Fietkau
3c55504336
session: add missing include
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-06-29 23:22:50 +02:00
Luka Perkov
7c789622a6
uci: rework variable usage
...
Signed-off-by: Luka Perkov <luka@openwrt.org>
2014-05-29 13:04:21 +02:00
Luka Perkov
4cc6a9deb8
fix segmentation fault when plugins are loaded
...
Function rpc_plugin_register_library() is modifying the struct's contents in
list_add() call. That said, the rpc_plugin struct should not be defined as
const. This caused segmentation fault when built on up-to-date Arch Linux.
Signed-off-by: Luka Perkov <luka@openwrt.org>
2014-01-29 13:29:57 +00:00
Luka Perkov
835b8b768d
file: when writing a file make sure it's contents are stored
...
Fixes problems with ubi(fs).
Signed-off-by: Luka Perkov <luka@openwrt.org>
2014-01-29 13:29:48 +00:00
Luka Perkov
11f5072bb1
file: create a file on write if it does not exist
...
Signed-off-by: Luka Perkov <luka@openwrt.org>
2014-01-29 13:29:40 +00:00
Luka Perkov
ec21f653b9
fix whitespaces
...
Signed-off-by: Luka Perkov <luka@openwrt.org>
2014-01-29 13:29:32 +00:00
Jo-Philipp Wich
967d815022
session: make object and function arguments of session.access optional, dump effective acls in this case
2014-01-19 19:45:25 +00:00
Jo-Philipp Wich
49f6e218a4
uci: fix same buffer reuse introduced by previous commit
2014-01-12 17:43:48 +00:00
Jo-Philipp Wich
b0254d1203
debug
2014-01-12 17:42:05 +00:00
Jo-Philipp Wich
7cac6af5ed
uci: grant access to confirm and rollback methods only to initiating session
...
Previously any session with access permissions for the corresponding method
was able to confirm or rollback commits initiated by another session.
Change those methods to only grant access to the initiating session.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2014-01-12 17:23:27 +00:00
Jo-Philipp Wich
0239c345ca
uci: introduce confirm method to cancel pending rollbacks without side effects
...
Calling commit with rollback=false to cancel a pending rollback timer can
potentially trigger another commit if no rollback is actually pending.
This introduces a new method "confirm" which cancels the rollback timer
without any other possible side effects.
While being at it, change the return code when trying to commit during
a pending rollback or when trying to rollback without a pending timeout to
UBUS_STATUS_NO_DATA. This is needed to be able to differentiate between a
denied request and an inappropriate state.
Also change the error return code for glob() failures to the more
appropriate UBUS_STATUS_NOT_FOUND.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2014-01-12 17:02:43 +00:00
Jo-Philipp Wich
0c4e97b4e7
Extend copyright
2014-01-12 12:48:58 +00:00
Jo-Philipp Wich
64633f3136
uci: rename uci.apply "commit" attribute to "roolback" and invert its logic
2014-01-12 12:45:11 +00:00
John Crispin
bbaaa41f8c
config.change triggers should only run if the config is valid
...
Signed-off-by: John Crispin <blogic@openwrt.org>
2013-12-18 14:01:33 +01:00
John Crispin
326f5bcaf6
fix inverted apply_running check
...
Signed-off-by: John Crispin <blogic@openwrt.org>
2013-12-18 13:56:54 +01:00
Jo-Philipp Wich
065d8f47fc
uci: make config argument of changes call optional to allow listing all changes in all files
2013-11-23 20:38:09 +00:00
Jo-Philipp Wich
2f5a613718
uci: add state call to retrieve uci state variables
2013-11-23 19:30:29 +00:00
Jo-Philipp Wich
a7ef5ca736
session: fix file descriptor leak in rpc_blob_from_file()
2013-10-26 14:16:29 +00:00
Alexander Couzens
a511e620c8
rpcd: CMake: fix out of tree builds
...
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
2013-10-10 12:19:01 +00:00
Jo-Philipp Wich
095b1058c8
uci: clear ptr.value in rpc_uci_merge_set(), this fixes missing delete deltas if multiple options are merged
2013-09-29 13:11:37 +00:00
Jo-Philipp Wich
a23010d407
session: change "sid" attribute to "ubus_rpc_session", this ensures that exposed session calls are confined to the calling session context
2013-09-13 14:52:35 +02:00
Jo-Philipp Wich
6b189b2201
plugin: use blobmsg_type() instead of blob_id()
2013-09-12 13:36:49 +02:00
Jo-Philipp Wich
22c7c2675d
session.c: use blobmsg_type() instead of blob_id()
2013-09-12 13:31:21 +02:00
Jo-Philipp Wich
296c9d9ceb
session: support negative group expressions
...
This change allows excluding specific groups after a wildcard expression.
The following example would grant read access to any acl group except the
group named "example".
list read '*'
list read '!example'
2013-09-12 13:10:30 +02:00
Jo-Philipp Wich
b76addec87
session: restore ACL dumping for session get and session list calls
2013-09-12 12:13:05 +02:00
Jo-Philipp Wich
4c9f178ad6
session: fix enum mismatch in rpc_handle_get() and rpc_handle_set()
2013-09-12 12:04:14 +02:00
Jo-Philipp Wich
6128bf647c
session: remove unused ctx argument from rpc_session_grant() and rpc_session_destroy()
2013-09-12 12:04:14 +02:00
Jo-Philipp Wich
d0d1a92432
session: do not dump and restore session ACLs but recalculate them when restoring the session
2013-09-12 12:04:06 +02:00
Jo-Philipp Wich
00a3ec2e52
session: disallow destroying the null session
2013-09-12 10:35:55 +02:00
Jo-Philipp Wich
ae63188069
uci: properly deal with uci_load() failures
2013-09-11 13:16:27 +02:00
Jo-Philipp Wich
4d618b2e3b
session: fix argument order of crypt() and prevent segfault if /etc/config/rpcd does not exist
2013-09-10 20:12:39 +02:00
Jo-Philipp Wich
4bf5d60f65
session: use correct policy for rpc_handle_login()
2013-09-10 20:01:05 +02:00
Jo-Philipp Wich
5a101fcc08
session: setup a persistent NULL section and implement login procedure
2013-09-10 19:56:36 +02:00
Jo-Philipp Wich
22fbf13086
Drop LuCI2 backend, it will move to its own repository
2013-09-09 16:32:53 +02:00
John Crispin
6f78bfbbdf
add config transaction support
...
Signed-off-by: John Crispin <blogic@openwrt.org>
2013-09-06 01:42:02 +02:00
John Crispin
7abfa9bc05
make uci commit calls trigger config.change events
...
Signed-off-by: John Crispin <blogic@openwrt.org>
2013-09-06 01:31:23 +02:00
John Crispin
f1882ac5bd
rename rpc_uci_purge_savedir to rpc_uci_purge_dir
...
Signed-off-by: John Crispin <blogic@openwrt.org>
2013-09-06 01:31:16 +02:00
Jo-Philipp Wich
334a067a74
Fix rpcd includes in plugin.h
2013-09-05 17:00:23 +02:00
Jo-Philipp Wich
b86774de65
Set umask to 0077 on daemon startup to prevent libuci from making world-readable directories
2013-09-05 16:14:30 +02:00
Jo-Philipp Wich
fa53571f2b
Use common /var/run/rpcd base directory to store runtime information
2013-09-05 15:14:00 +02:00
Jo-Philipp Wich
b4649c9fda
main: only purge uci savedirs if not reloading
2013-09-05 14:38:01 +02:00
Jo-Philipp Wich
fc1b008e08
uci: expose rpc_uci_purge_savedirs() helper
2013-09-05 14:38:01 +02:00
Jo-Philipp Wich
524032c291
main: store session data to disk on receipt of SIGUSR1 or SIGHUP. On HUP terminate self and re-exec
2013-09-05 14:37:56 +02:00