Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion init.groovy.d/ldap.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ def env = System.getenv()
// Variables
def ldap_server = env['LDAP_SERVER']
def ldap_rootDN = env['LDAP_ROOTDN']
def ldap_inhibitInferRootDN = env['LDAP_INHIBIT_INFER_ROOTDN'].toBoolean()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this line is not a good idea.

def configXmlFile = "/var/jenkins_home/config.xml"

// Constants
Expand All @@ -22,6 +21,7 @@ Thread.start {
sleep 10000

if (ldap_server && (ldap_rootDN || ldap_inhibitInferRootDN)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ldap_inhibitInferRootDN would be NULL here which makes this logic useless and would be dangerous.

def ldap_inhibitInferRootDN = env['LDAP_INHIBIT_INFER_ROOTDN'].toBoolean()
init_ldap_parameter = true
def configXmlString = new File(configXmlFile).getText('UTF-8')
def rootNode = new XmlSlurper().parseText(configXmlString)
Expand Down