diff options
author | Peter Powell <petpow@saberuk.com> | 2019-05-31 16:24:15 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2019-05-31 16:24:15 +0100 |
commit | 97e03b761faf0e0e44665a83acc6079de255d8ed (patch) | |
tree | 11c59d451ed2128c85d529a23fba9e6988d2d880 /src | |
parent | f7a5b4fa74192338012b5174748e2ce4d796d46d (diff) |
Fix parsing <bind:permissions> as base 10 instead of base 8.
Diffstat (limited to 'src')
-rw-r--r-- | src/listensocket.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/listensocket.cpp b/src/listensocket.cpp index 3d6b11568..811c6c8ac 100644 --- a/src/listensocket.cpp +++ b/src/listensocket.cpp @@ -68,8 +68,9 @@ ListenSocket::ListenSocket(ConfigTag* tag, const irc::sockets::sockaddrs& bind_t if (bind_to.family() == AF_UNIX) { - unsigned int permissions = tag->getUInt("permissions", 0, 0, 777); - if (permissions) + const std::string permissionstr = tag->getString("permissions"); + unsigned int permissions = strtoul(permissionstr.c_str(), NULL, 8); + if (permissions && permissions <= 07777) chmod(bind_to.str().c_str(), permissions); } |