summaryrefslogtreecommitdiff
path: root/ubusd_main.c
Commit message (Collapse)AuthorAgeFilesLines
* ubusd: attempt to create socket folderDaniel Golle2020-12-041-0/+16
| | | | | | | | | | | When ubus is running as root, /var/run/ubus most likely hasn't been created as well (as that's the homedir of user ubus, and if a user ubus was found, then ubus would run being that user). Blindly attempt to create the directory (which won't do any harm if it does exist and/or ubus is not running as root) to still be able to start ubus in case of user ubus not existing. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* ubusd/libubus-io: fix socket descriptor passingPetr Štetiar2019-12-271-19/+22
| | | | | | | | | | | | | | | In commit 5d7ca8309d0a ("ubusd/libubus-io: fix variable sized struct position warning") the position of cmsghdr struct has been changed in order to fix clang-9 compiler warning, but it has introduced regression in at least `logread` which hanged indefinitely. So this patch reworks the socket descriptor passing in a way recommended in the `cmsg(3)` manual page. Ref: http://lists.infradead.org/pipermail/openwrt-devel/2019-December/020840.html Fixes: 5d7ca8309d0a ("ubusd/libubus-io: fix variable sized struct position warning") Reported-by: Hannu Nyman <hannu.nyman@welho.com> Signed-off-by: Petr Štetiar <ynezz@true.cz>
* refactor ubusd.c into reusable ubusd_libraryPetr Štetiar2019-12-161-0/+271
In order to allow reusability in unit testing & fuzzing. Signed-off-by: Petr Štetiar <ynezz@true.cz>