Luka Perkov
73aea9b8b6
file: add myself in Copyright header
...
Signed-off-by: Luka Perkov <luka@openwrt.org>
2016-04-12 17:15:27 +02:00
Luka Perkov
2350c6fa91
file: handle return output of b64_decode
...
Solve this compile warning:
file.c:300:16: error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare]
if (data_len < 0)
Signed-off-by: Luka Perkov <luka@openwrt.org>
2016-04-12 17:15:08 +02:00
Luka Perkov
c8c8f7d014
file: add append write support
...
Signed-off-by: Luka Perkov <luka@openwrt.org>
2016-04-12 17:14:42 +02:00
Jo-Philipp Wich
e64cbdd9b4
uci: allow setting zero-length values (to delete an option)
...
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-11-23 19:11:44 +01:00
Javier Domingo Cansino
fb6e4604fb
paths: substitute literal with macro
...
Signed-off-by: Javier Domingo Cansino <javierdo1@gmail.com>
2015-11-20 18:00:28 +01:00
John Crispin
f00890cd6e
add a reload_config method to the uci object
...
Signed-off-by: John Crispin <blogic@openwrt.org>
2015-08-25 23:56:32 +02:00
John Crispin
032346f479
add a system object that allows us to set passwords and trigger sysupgrade
...
Signed-off-by: John Crispin <blogic@openwrt.org>
2015-08-25 23:56:32 +02:00
Luka Perkov
410802e106
file: be consistent with string termination character
...
Signed-off-by: Luka Perkov <luka@openwrt.org>
2015-07-15 00:21:39 +02:00
Luka Perkov
4db5df8a96
file: add support for setting mode when writing files
...
Signed-off-by: Luka Perkov <luka@openwrt.org>
2015-07-15 00:21:28 +02:00
Luka Perkov
fc895bb1e2
file: add support for base64
...
Signed-off-by: Luka Perkov <luka@openwrt.org>
2015-07-15 00:20:17 +02:00
Jo-Philipp Wich
3d655417ab
uci: unload package on revert
...
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-05-17 14:13:02 +02:00
Luka Perkov
9a6bfa110a
file: add md5sum support
...
Signed-off-by: Luka Perkov <luka@openwrt.org>
2015-04-12 21:24:39 +02:00
John Crispin
311c85e7d9
properly handle return codes
...
Signed-off-by: John Crispin <blogic@openwrt.org>
2015-03-28 18:36:40 +01:00
Luka Perkov
361b823e8d
file: free memory after opendir()
...
Signed-off-by: Luka Perkov <luka@openwrt.org>
2015-03-11 16:25:41 +01:00
Luka Perkov
b65f6a844f
file: use blob_buf_free()
...
Signed-off-by: Luka Perkov <luka@openwrt.org>
2015-03-11 16:25:36 +01:00
Luka Perkov
e2d37b7e40
file: show "data" ubus parameter only when used
...
The ubus calls for file read, list and stat do not use data parameter, so lets
remove them to avoid confusion.
Signed-off-by: Luka Perkov <luka@openwrt.org>
2015-03-11 16:25:29 +01:00
John Crispin
b71df5b75f
fix for json 0.12
...
Signed-off-by: John Crispin <blogic@openwrt.org>
2015-03-08 15:04:13 +01:00
Jo-Philipp Wich
805e8ce891
cmake: fix libcrypt test
...
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-02-26 16:34:31 +01:00
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