]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/listensocket.cpp
Add a way to disable older SSL versions with ssl_openssl.
[user/henk/code/inspircd.git] / src / listensocket.cpp
index 5ecaab460c4850949e689bff6b5baa77afedfee5..811c6c8aca33ce496a6ceadf71a625d3596549ed 100644 (file)
@@ -66,6 +66,14 @@ ListenSocket::ListenSocket(ConfigTag* tag, const irc::sockets::sockaddrs& bind_t
 #endif
        }
 
+       if (bind_to.family() == AF_UNIX)
+       {
+               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);
+       }
+
        SocketEngine::SetReuse(fd);
        int rv = SocketEngine::Bind(this->fd, bind_to);
        if (rv >= 0)
@@ -183,7 +191,7 @@ void ListenSocket::OnEventHandlerRead()
        if (res == MOD_RES_PASSTHRU)
        {
                std::string type = bind_tag->getString("type", "clients");
-               if (type == "clients")
+               if (stdalgo::string::equalsci(type, "clients"))
                {
                        ServerInstance->Users->AddUser(incomingSockfd, this, &client, &server);
                        res = MOD_RES_ALLOW;