summaryrefslogtreecommitdiff
path: root/util.c
Commit message (Collapse)AuthorAgeFilesLines
* Replace malloc() + memset() with calloc()Hauke Mehrtens2020-10-061-2/+1
| | | | | | Instead of manually clearing the memory with memset() use calloc(). Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* util: Fix error pathHauke Mehrtens2019-11-011-2/+6
| | | | | | | Unlock and close the stream in case some file operations in uci_open_stream() fail. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* allow "-" in package namesFelix Fietkau2014-12-181-7/+11
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* fix a few formatting issuesFelix Fietkau2014-11-251-5/+3
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* Use offset into parser buffer to avoid potential heap overflow.Yousong Zhou2014-11-251-4/+7
| | | | Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
* Preserve original permissions when rewriting config files on commitJo-Philipp Wich2014-04-111-2/+6
| | | | | | Patch provided by Patrick Grimm <patrick@lunatiki.de> Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
* file: make uci commits atomicLuka Perkov2013-10-151-2/+2
| | | | | | | | | Avoids issues with UBIFS file system. http://www.linux-mtd.infradead.org/faq/ubifs.html#L_atomic_change Signed-off-by: Luka Perkov <luka@openwrt.org> Reported-by: Tim Harvey <tharvey@gateworks.com>
* util: fix compile errorFelix Fietkau2013-06-101-1/+2
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* uci: copy permisions of /etc/config/ files for temp filesEtienne CHAMPETIER2013-04-241-5/+18
| | | | | | | | | | | | | | | | 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
* remove plugin support, it has been unused for a long time and should not be ↵Felix Fietkau2013-01-041-4/+4
| | | | | | used for any new code Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* fix lgpl license headersFelix Fietkau2011-08-311-1/+1
|
* split off and compile util.c separatelyFelix Fietkau2010-08-201-16/+6
|
* split off and compile file.c separatelyFelix Fietkau2010-08-201-252/+4
|
* don't bail out on locking errors, when flock() is not supportedv0.7.5Felix Fietkau2009-04-231-1/+3
|
* add missing fflush() on close - fixes a bug in the lock/unlock order (thx, ↵v0.7.4Felix Fietkau2009-03-241-0/+1
| | | | Cyrus)
* fix signed vs unsigned char validation bugv0.7.3Felix Fietkau2009-01-201-3/+4
|
* overhaul package and section type validation - makes it easier to read and ↵Felix Fietkau2008-09-051-1/+11
| | | | fixes some bugs in uci changes and uci show without explicit package references
* fix segfault in uci batchFelix Fietkau2008-08-311-7/+7
|
* add an extra option check for tuple parsingFelix2008-08-261-0/+5
|
* remove uci_parse_tuple, preparation for adding a new api for lookupsFelix Fietkau2008-08-221-28/+26
|
* implement extended uci lookup syntaxFelix Fietkau2008-08-171-2/+3
|
* another onev0.4.8Felix Fietkau2008-07-311-2/+3
|
* fix a really stupid bugv0.4.7Felix Fietkau2008-07-311-0/+1
|
* some more input validationv0.4.5Felix Fietkau2008-07-301-0/+14
|
* allow more types of characters for uci package namesv0.3.4Felix Fietkau2008-05-031-1/+1
|
* parser: fix precedence of quoting over ; as command terminator, thx to ↵v0.3.1Felix Fietkau2008-04-081-2/+11
| | | | netprince for spotting the bug
* more functionality for pluginsFelix Fietkau2008-02-121-1/+1
|
* more plugin supportFelix Fietkau2008-02-121-3/+3
|
* fix uci_setFelix Fietkau2008-02-121-1/+0
|
* reorganize some code, add an extra command for adding unnamed sectionsFelix Fietkau2008-02-091-3/+19
|
* use strsep instead of strtok to avoid a segfaultFelix Fietkau2008-02-061-3/+3
|
* fix uci_parse_tuplev0.2.4Felix Fietkau2008-02-051-7/+6
|
* fix an off-by-one error that prevented the open() check from succeeding, if ↵v0.2.2Felix Fietkau2008-02-051-1/+1
| | | | stdin is closed
* improve the argument parserFelix Fietkau2008-02-051-6/+18
|
* export a function for parsing shell-style arguments in libuciFelix Fietkau2008-02-041-1/+174
|
* improve validation, accept more characters in the section typev0.1.2Felix Fietkau2008-02-041-3/+16
|
* implement uci revertFelix Fietkau2008-02-031-0/+5
|
* move history code into history.cFelix Fietkau2008-02-031-0/+113
|
* constifyFelix Fietkau2008-02-021-1/+1
|
* fix updated parse_tuple functionFelix Fietkau2008-01-291-0/+1
|
* more input validationFelix Fietkau2008-01-291-4/+4
|
* cleanup, move parse_tuple to libuci, add some input validationFelix Fietkau2008-01-291-0/+63
|
* implement more suggestions by lorenz schoriFelix Fietkau2008-01-231-0/+52