delta: catch error when parsing delta line. Reported by sarumpaet [1] [1] uci fails to handle long values properly, https://github.com/openwrt/packages/issues/1231 Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
delta: fix adding new savedir. Newly added savedir should be at the last position while uci_add_delta_path() will add it to the position second to the last. Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Fix delta path handling. - Make ctx->savedir sit at the end of ctx->delta_path. - Add notes to uci_set_savedir() and uci_add_delta_path() to document the behaviour changes.
delta: fix outputing of delta entries occupying multiple lines. Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
delta: use a table for converting between UCI_CMD_XXX and prefixes. Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
delta: preprocess delta line with uci_parse_argument(). Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
delta: add a simple duplication check when adding delta path. Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Use offset into parser buffer to avoid potential heap overflow. Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Preserve original permissions when rewriting config files on commit Patch provided by Patrick Grimm <patrick@lunatiki.de> Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
style: fix whitespace errors Signed-off-by: Luka Perkov <luka@openwrt.org>
style: free(NULL) is perfectly valid so we can drop some checks Signed-off-by: Luka Perkov <luka@openwrt.org>
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
Change delta encoding of list deletions When encoding list_del commands in delta files, '_' is used as prefix but this breaks any command operating on files starting with an underscore since the command prefix becomes indistinguishable from the filename. The regression was introduced with ec8cbbbe0f20e67cbd3bd471b9ac55ceacaef7b8. Avoid this problem by using '~' as command prefix for list deletions.
remove unused hook support Signed-off-by: Felix Fietkau <nbd@openwrt.org>
extend delete command so it can delete list elemets using index
add new command del_list
fix lgpl license headers
split off and compile delta.c separately
uci_history -> uci_delta