uci: copy permisions of /etc/config/ files for temp files
authorEtienne CHAMPETIER <etienne.champetier@free.fr>
Tue, 5 Feb 2013 17:09:34 +0000 (17:09 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Wed, 24 Apr 2013 09:23:35 +0000 (11:23 +0200)
commit07d6fd66f6a20e35490bc8b55d26fdb389016120
tree6c29ae686e0a06620b1aa5c38bb530e3e3c43803
parentef12e67516d224e9cd2ca3fd293dbe5ab385c75a
uci: copy permisions of /etc/config/ files for temp files

Hi

Using uci as a non root user i can get network configuration but not network state (for exemple).
The idea of this patch is to copy permission from config file, or if it doesn't exist use UCI_FILEMODE / UCI_DIRMODE

Tested on tplink wr1043nd. (you have to remove some mkdir from /etc/init.d/boot to fully see this patch work)
If you apply this patch (or a modified version), please also backport to AA

Signed-off-by: Etienne CHAMPETIER <etienne.champetier@free.fr>
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
delta.c
util.c