summaryrefslogtreecommitdiff
path: root/src/modules/extra/m_ldapauth.cpp
AgeCommit message (Collapse)Author
2013-04-12Add LOG_ prefix to the log level enum values.Peter Powell
2013-04-01Whitespace and empty destructor removal, minor coding style changesattilamolnar
2012-12-02Dynamically determine the size of the eventlist[] passed to Attach()attilamolnar
m_sqlauth was attached to I_OnUserDisconnect but didn't provide a handler for it, remove
2012-11-29ldapauth: register both extensionsRobin Burchell
2012-11-29ldapauth: RAII returned ldap message.Robin Burchell
This ensures it is always freed, and coincidentally fixes freeing in the case of LDAP errors.
2012-11-29ldapauth: fix memory leakRobin Burchell
ldap_get_dn() results need to be freed. Use a RAII wrapper to do this. Original code by Attila Molnar
2012-11-29ldapauth: Allow setting virtual hosts on identification with m_ldapauth.Robin Burchell
<ldapauth:host>, when set, will be applied to users identifying with ldapauth. The host can also take formatters from fields set on the DN of the user.
2012-11-29ldapauth: Add missing verbose logging to required attributes.Robin Burchell
2012-11-29ldapauth: Rework required attributes code to use only one exit path.Robin Burchell
This makes the upcoming patch to add optional virtual host support cleaner.
2012-11-12Remove usage of the deprecated ConfigReaderattilamolnar
2012-10-21Make better use of User::GetFullRealHost()attilamolnar
2012-10-19m_ldapauth Allow filtering on arbitrary LDAP attributesAdrien Bustany
This commit implements filtering on LDAP attributes, in a similar way to what Apache Httpd does with "Require ldap-attribute".
2012-10-12Windows: In-depth cleanup (see details)ChrisTX
-Fix x64 builds for Windows. Now all configurations compile. -Remove the non-working rebase stuff. -Remove the Windows fork hack and instead use FreeConsole() to emulate the behavior. This directly allows us to compile with ASLR, which is turned on now. -Remove the old IPC mechanism for the removed GUI. This is not needed anymore as the GUI wasn't ever supported on anything newer than 1.2 -Remove the WIN32/WINDOWS macros. _WIN32 is supported on all x86-based VC++ targets, so that's what we need. -Enable optimizations for release builds. -De-duplicate printf_c(), it was previously copy-pasted into colors.h for configure -Add the VC++ specific bad files in .gitignore -Disable PID writing on Windows. This is only making sense for *nix builds. -Replace the CPU usage retrieval with an algorithm analogous to the *nix behavior. Also supports separated now/total values. (Tested with a dummy busy loop - seems working) -Removed certain unused functions and variables -Remove stdint defines from the windows wrapper -Remove CRT debug alloc. This is a bad idea as it would define a macro to replace free which breaks builds. -Re-evaluated the warnings list, commented it. -Moved inspircd_config/_version to include/ to match *nix -Removed the creation of inspircd_se_config, as it isn't used at all. -Made non-git builds show as "r0" instead of "r" (thanks to @SaberUK for pointing this out) -Fixed up m_spanningtree's project paths. Now all configurations (debug/release x86/x64) have been tested and build properly. -Moved FindDNS out of the wrapper and matched its log behavior with *nix. (It's pointless having it in the wrapper after the recent slimming down) -Replaced random/srandom wrappers with a mechanism that tries to use Windows' Random API first is no SSL module is loaded. -Removed more old junk from support for compilers older than VC++ 2010 (we don't have project files for these, so compiling them would be hard anyways) -Removed the unused ClearConsole() -Removed unused includes from the wrapper. Also, do not include psapi.h here if we don't link psapi.lib. This should be done where appropriate. -Made inet_aton an inline function for increased performance -C4800, performance warning about bool forcing, resolved at all occurrences. -C4701, uninitialized variable 'cached', resolved at all occurrences. -dlerror() was migrated out of the wrapper for more thread safety (no global buffer being shared) and increased performance. -Removed the wrong CRT debug flags. This drains a lot of performance. -Removed the clock_gettime/gettimeofday wrappers -Replaced all TCHAR/ANSI mix-ups of functions with the correct respective function. -Added a block of C4355 for < VS2012 -Update project files for c870714
2012-10-10Compare the result of ldap_search_ext_s to LDAP_SUCCESS....Adam
2012-09-30Fix more undefined behavior caused by referencing the returned buffer by ↵attilamolnar
std::string::c_str() when the object is temporary See 83c7cc45daf6fb1f8c36f15297a4657e45a34e88
2012-04-19Replace copyright headers with headers granting specific authors copyrightRobby-
2012-04-10extras/m_ldapauth: CIDR-based whitelistingPierre Carrier
Offer host-based whitelisting in the ldap module. Used to trust clients from internal networks, whilst requiring authentication from "outsiders".
2011-06-18Fix extras compilation under WindowsAdam
2010-02-18Compile fix for m_ldapauthdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12495 e03df62e-2008-0410-955e-edbf42e46eb7
2010-02-17Check for <user>:<password> for ldap auth in /PASS password if ↵w00t
ident/nickname method fails, this allows people with long uids/invalid uids to still auth to LDAP. Thanks to stezz. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12486 e03df62e-2008-0410-955e-edbf42e46eb7
2010-02-14Remove unused exports; counting is not for programmersdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12457 e03df62e-2008-0410-955e-edbf42e46eb7
2010-01-11...because every now and again, i have to do a massive commit.brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12248 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-21Move all local-only fields to LocalUserdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11944 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-21Change module API to use LocalUser* where correctdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11943 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-17Remove dummy API_VERSION from Version constructordanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11887 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-28Fix compilation of some extras modulesdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11776 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-26Remove InspIRCd* parameters and fieldsdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11763 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-22Describe module purpose in /MODULES outputdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11757 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-02ModResult conversion: Change return type of all module functionsdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11634 e03df62e-2008-0410-955e-edbf42e46eb7
2009-08-02Fix a few typos in here so it compiles again.peavey
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11464 e03df62e-2008-0410-955e-edbf42e46eb7
2009-08-01Reconnect to LDAP server if connection goes away, fixes bug #818.w00t
NOTE: I don't have an LDAP setup, so I'm totally in the blind on these commits. Sorry, but it seems nobody else can be arsed to do it, so I will. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11448 e03df62e-2008-0410-955e-edbf42e46eb7
2009-05-24OnRehash changes: split to multiple hooks to clarify use and prevent ↵danieldg
explosion of rehashes on a /REHASH * git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11388 e03df62e-2008-0410-955e-edbf42e46eb7
2009-04-03Use 'c' snomask instead of 'A' snomask for ldap auth failures, reported by ↵w00t
drich. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11283 e03df62e-2008-0410-955e-edbf42e46eb7
2009-03-15Update all wiki links to point to the new wiki. This was done automatically ↵psychon
with the following command, only .Makefile.inc got some indent fixups by hand. for file in $(find -type f -and -not -path '*/.svn/*' -and -not -name '*.so') ; do sed -e 's#http://www.inspircd.org/wiki#http://wiki.inspircd.org#' -e 's#http://wiki.inspircd.org/index.php/#http://wiki.inspircd.org/#' -i $file ; done git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11223 e03df62e-2008-0410-955e-edbf42e46eb7
2009-01-02Update copyrights for 2009.w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10932 e03df62e-2008-0410-955e-edbf42e46eb7
2008-09-05mysql's windows build is utter hell to get working the way we wanted. The ↵brain
packaged libs provided by mysql AB are built against statically linked libraries and for vs2003. These dont work with inspircd using dynamically linked runtime and they dont work on vs2005 or 2008! Have had to roll my own MySQL on windows which was annoying as it wouldnt compile and was missing libraries and include files, we will have to bundle our own mysql dll built for the right visual studio and right runtimes. All the headers etc fixed to build in windows. Not tested with a real db connection yet, just compiles. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10394 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-25Change module versions to use a string instead of fixed digits, and use ↵w00t
propset ID to auto-set versions, so we don't have (essentially unused) module versions. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10290 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-22Nuke last references to MatchTextw00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10217 e03df62e-2008-0410-955e-edbf42e46eb7
2008-06-11Dont even bother to do the ldap bind if the password given is empty ↵brain
(performance boost) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9889 e03df62e-2008-0410-955e-edbf42e46eb7
2008-06-11fixed some indentation and spacing in modulespippijn
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9888 e03df62e-2008-0410-955e-edbf42e46eb7
2008-05-19Convert connection::hostbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9768 e03df62e-2008-0410-955e-edbf42e46eb7
2008-05-19Fix these toobrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9760 e03df62e-2008-0410-955e-edbf42e46eb7
2008-04-09Fix thesew00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9444 e03df62e-2008-0410-955e-edbf42e46eb7
2008-04-04Apply our own version of mminds patch that doesnt have #defines in itbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9334 e03df62e-2008-0410-955e-edbf42e46eb7
2008-03-15Allow for binding to non-anonymous DN for searches.brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9093 e03df62e-2008-0410-955e-edbf42e46eb7
2008-03-14clean this up now Brain says it works :)peavey
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9089 e03df62e-2008-0410-955e-edbf42e46eb7
2008-03-14Fix deprecation in trunk toopeavey
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9088 e03df62e-2008-0410-955e-edbf42e46eb7
2008-03-14Roll back to 1.2, not 4.0 module verbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9082 e03df62e-2008-0410-955e-edbf42e46eb7
2008-03-14Fuckin finally!brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9080 e03df62e-2008-0410-955e-edbf42e46eb7
2008-03-14Grrr!!!brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9079 e03df62e-2008-0410-955e-edbf42e46eb7