From: Jo-Philipp Wich Date: Sat, 28 Sep 2013 17:23:01 +0000 (+0000) Subject: ubusd: use umask of 0177 for now to prevent a world- and group-writable unix socket X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fubus.git;a=commitdiff_plain;h=6ae17d0298a8f1c24f16a68c8d1884091fb5c39f ubusd: use umask of 0177 for now to prevent a world- and group-writable unix socket --- diff --git a/ubusd.c b/ubusd.c index 03215b3..59dee3e 100644 --- a/ubusd.c +++ b/ubusd.c @@ -12,6 +12,7 @@ */ #include +#include #include #include #include @@ -321,6 +322,7 @@ int main(int argc, char **argv) } unlink(ubus_socket); + umask(0177); server_fd.fd = usock(USOCK_UNIX | USOCK_SERVER | USOCK_NONBLOCK, ubus_socket, NULL); if (server_fd.fd < 0) { perror("usock");