change socket permission to allow !root users to connect

Signed-off-by: John Crispin <blogic@openwrt.org>
This commit is contained in:
John Crispin 2015-04-13 18:31:28 +02:00
parent 3df5b18af2
commit b2e629a4e9

View file

@ -384,7 +384,7 @@ int main(int argc, char **argv)
}
unlink(ubus_socket);
umask(0177);
umask(0111);
server_fd.fd = usock(USOCK_UNIX | USOCK_SERVER | USOCK_NONBLOCK, ubus_socket, NULL);
if (server_fd.fd < 0) {
perror("usock");