diff options
author | Vladislav Grishenko <themiron@mail.ru> | 2018-02-27 22:35:41 +0500 |
---|---|---|
committer | Vladislav Grishenko <themiron@mail.ru> | 2018-02-27 22:35:41 +0500 |
commit | f526e8e7fd22c00734c5ce17a1cb4bf8e540af92 (patch) | |
tree | 4c562be4b8491e2f0d03f2ac9e95f84e83851a78 /accel-pppd/ctrl | |
parent | 65d874361c6a054bc99c3d4e94310e64feec504e (diff) | |
download | accel-ppp-f526e8e7fd22c00734c5ce17a1cb4bf8e540af92.tar.gz accel-ppp-f526e8e7fd22c00734c5ce17a1cb4bf8e540af92.zip |
sstp: allow access to unix socket to anyone
almost the same as ipv4/ipv6 is accessible by anyone for
easier access under multiple proxy effective users.
Diffstat (limited to 'accel-pppd/ctrl')
-rw-r--r-- | accel-pppd/ctrl/sstp/sstp.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/accel-pppd/ctrl/sstp/sstp.c b/accel-pppd/ctrl/sstp/sstp.c index 71accc3d..1edbc66b 100644 --- a/accel-pppd/ctrl/sstp/sstp.c +++ b/accel-pppd/ctrl/sstp/sstp.c @@ -2430,6 +2430,12 @@ static void sstp_init(void) goto error_close; } + if (addr->u.sa.sa_family == AF_UNIX && addr->u.sun.sun_path[0] && + chmod(addr->u.sun.sun_path, + S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH) < 0) { + log_warn("sstp: failed to set socket permissions: %s\n", strerror(errno)); + } + if (listen(serv.hnd.fd, 10) < 0) { log_emerg("sstp: failed to listen socket: %s\n", strerror(errno)); goto error_unlink; |