forked from Ericsson/CodeCompass
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added new LDAP authenticator plugin. It depends on the ldap-cpp wrapper of OpenLDAP which is compiled along with the source code. Adding a new CMake flag to be able to compile authentication plugins on demand.
- Loading branch information
Showing
18 changed files
with
1,850 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# - Find OpenLDAP C Libraries | ||
# | ||
# OPENLDAP_FOUND - True if found. | ||
# OPENLDAP_INCLUDE_DIR - Path to the openldap include directory | ||
# OPENLDAP_LIBRARIES - Paths to the ldap and lber libraries | ||
|
||
# Source: https://fossies.org/linux/ceph/cmake/modules/FindOpenLdap.cmake | ||
|
||
find_path(OPENLDAP_INCLUDE_DIR ldap.h PATHS | ||
/usr/include | ||
/opt/local/include | ||
/usr/local/include) | ||
|
||
find_library(LDAP_LIBRARY ldap) | ||
find_library(LBER_LIBRARY lber) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(OpenLdap DEFAULT_MSG | ||
OPENLDAP_INCLUDE_DIR LDAP_LIBRARY LBER_LIBRARY) | ||
|
||
set(OPENLDAP_LIBRARIES ${LDAP_LIBRARY} ${LBER_LIBRARY}) | ||
|
||
mark_as_advanced( | ||
OPENLDAP_INCLUDE_DIR LDAP_LIBRARY LBER_LIBRARY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
find_package(OpenLdap REQUIRED) | ||
|
||
include_directories( | ||
include | ||
${PROJECT_SOURCE_DIR}/util/include | ||
${PROJECT_SOURCE_DIR}/webserver/include | ||
${PROJECT_SOURCE_DIR}/webserver/authenticators/ldap/ldap-cpp/ | ||
${OPENLDAP_INCLUDE_DIR}) | ||
|
||
add_library(ldapauth SHARED | ||
src/plugin.cpp | ||
ldap-cpp/cldap_entry.cpp | ||
ldap-cpp/cldap_mod.cpp | ||
ldap-cpp/cldap_server.cpp) | ||
|
||
target_compile_options(ldapauth PUBLIC -Wno-unknown-pragmas) | ||
|
||
target_link_libraries(ldapauth | ||
${OPENLDAP_LIBRARIES} | ||
util) | ||
|
||
install(TARGETS ldapauth DESTINATION ${INSTALL_AUTH_DIR}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/*************************************************************************** | ||
* Copyright (C) 2012 by Andrey Afletdinov * | ||
* afletdinov@gmail.com * | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
* This program is distributed in the hope that it will be useful, * | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of * | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | ||
* GNU General Public License for more details. * | ||
* * | ||
* You should have received a copy of the GNU General Public License * | ||
* along with this program; if not, write to the * | ||
* Free Software Foundation, Inc., * | ||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * | ||
***************************************************************************/ | ||
|
||
#ifndef CLDAP_H | ||
#define CLDAP_H | ||
|
||
#include "cldap_mod.h" | ||
#include "cldap_entry.h" | ||
#include "cldap_server.h" | ||
#include "cldap_types.h" | ||
|
||
#endif |
Oops, something went wrong.