X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_ldapoper.cpp;h=4304ad8d5bf4caed4b61f359f37c72d606a5839b;hb=1bf7ca389426e196697eba9a8b60277db03fbedb;hp=b2a1c1f0d4d7aa7679419ffe3b4fdd2733b14cf3;hpb=478a092258718cd75fa23a0ba67af42a6e1a0fda;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_ldapoper.cpp b/src/modules/m_ldapoper.cpp index b2a1c1f0d..4304ad8d5 100644 --- a/src/modules/m_ldapoper.cpp +++ b/src/modules/m_ldapoper.cpp @@ -1,11 +1,10 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2013 Adam - * Copyright (C) 2009 Robin Burchell - * Copyright (C) 2008 Pippijn van Steenhoven - * Copyright (C) 2008 Craig Edwards - * Copyright (C) 2007 Carsten Valdemar Munk + * Copyright (C) 2020 Christos Triantafyllidis + * Copyright (C) 2018-2020 Sadie Powell + * Copyright (C) 2014, 2018 Attila Molnar + * Copyright (C) 2013-2014 Adam * * This file is part of InspIRCd. InspIRCd is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public @@ -152,7 +151,13 @@ class AdminBindInterface : public LDAPInterface public: AdminBindInterface(Module* c, const std::string& p, const std::string& u, const std::string& o, const std::string& pa, const std::string& b, const std::string& w) - : LDAPInterface(c), provider(p), user(u), opername(p), password(pa), base(b), what(w) + : LDAPInterface(c) + , provider(p) + , user(u) + , opername(o) + , password(pa) + , base(b) + , what(w) { } @@ -218,8 +223,7 @@ class ModuleLDAPOper : public Module return MOD_RES_PASSTHRU; std::string acceptedhosts = tag->getString("host"); - std::string hostname = user->ident + "@" + user->GetRealHost(); - if (!InspIRCd::MatchMask(acceptedhosts, hostname, user->GetIPString())) + if (!InspIRCd::MatchMask(acceptedhosts, user->MakeHost(), user->MakeHostIP())) return MOD_RES_PASSTHRU; if (!LDAP) @@ -242,7 +246,7 @@ class ModuleLDAPOper : public Module Version GetVersion() CXX11_OVERRIDE { - return Version("Adds the ability to authenticate opers via LDAP", VF_VENDOR); + return Version("Allows server operators to be authenticated against an LDAP database.", VF_VENDOR); } };