inspircd

A modular C++ IRC daemon (ircd). https://www.inspircd.org/
Log | Files | Refs | README

commit 97e03b761faf0e0e44665a83acc6079de255d8ed
parent f7a5b4fa74192338012b5174748e2ce4d796d46d
Author: Peter Powell <petpow@saberuk.com>
Date:   Fri, 31 May 2019 16:24:15 +0100

Fix parsing <bind:permissions> as base 10 instead of base 8.

Diffstat:
Msrc/listensocket.cpp | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 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); }