FreeCalypso > hg > themwi-system-sw
diff mgw/ctrl_sock.c @ 35:db7ed6a55ba4
themwi-{mgw,mncc}: chmod connection-accepting sockets to 775
I am making this change in order to be able to run themwi-test-mtc
as my regular user, without having to su or sudo to gsmserv.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 09 Jul 2022 23:29:54 -0800 |
parents | b3f74df7b808 |
children | f280328e7e2e |
line wrap: on
line diff
--- a/mgw/ctrl_sock.c Sat Jul 09 23:17:15 2022 -0800 +++ b/mgw/ctrl_sock.c Sat Jul 09 23:29:54 2022 -0800 @@ -4,6 +4,7 @@ */ #include <sys/types.h> +#include <sys/stat.h> #include <sys/socket.h> #include <sys/un.h> #include <netinet/in.h> @@ -71,6 +72,7 @@ syslog(LOG_CRIT, "listen on UNIX socket: %m"); return(-1); } + chmod(ctrl_socket_pathname, 0775); update_max_fd(fd); FD_SET(fd, &select_for_read); select_handlers[fd] = ctrlsock_accept_handler;