Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dcoutadeur dcoutadeur
lemonldap-ng
Commits
fcb8e6b3
Commit
fcb8e6b3
authored
Oct 09, 2020
by
Maxime Besson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use keepalive for LDAP connections (#2344)
parent
ca97628c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
+8
-5
lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/Backends/LDAP.pm
...p-ng-common/lib/Lemonldap/NG/Common/Conf/Backends/LDAP.pm
+3
-2
lemonldap-ng-common/lib/Lemonldap/NG/Common/Notifications/LDAP.pm
...p-ng-common/lib/Lemonldap/NG/Common/Notifications/LDAP.pm
+2
-1
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Net/LDAP.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Net/LDAP.pm
+3
-2
No files found.
lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/Backends/LDAP.pm
View file @
fcb8e6b3
...
...
@@ -91,8 +91,9 @@ sub ldap {
# Connect
my
$ldap
=
Net::
LDAP
->
new
(
\
@servers
,
onerror
=>
undef
,
verify
=>
(
$self
->
{
ldapVerify
}
||
"
require
"
),
keepalive
=>
1
,
onerror
=>
undef
,
verify
=>
(
$self
->
{
ldapVerify
}
||
"
require
"
),
(
$self
->
{
ldapCAFile
}
?
(
cafile
=>
$self
->
{
ldapCAFile
}
)
:
()
),
(
$self
->
{
ldapCAPath
}
?
(
capath
=>
$self
->
{
ldapCAPath
}
)
:
()
),
(
$self
->
{
ldapPort
}
?
(
port
=>
$self
->
{
ldapPort
}
)
:
()
),
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/Notifications/LDAP.pm
View file @
fcb8e6b3
...
...
@@ -486,7 +486,8 @@ sub _ldap {
# Connect
my
$ldap
=
Net::
LDAP
->
new
(
\
@servers
,
onerror
=>
undef
,
onerror
=>
undef
,
keepalive
=>
1
,
(
$self
->
ldapPort
?
(
port
=>
$self
->
ldapPort
)
:
()
),
(
$self
->
ldapVerify
?
(
verify
=>
$self
->
ldapVerify
)
:
()
),
(
$self
->
ldapCAFile
?
(
cafile
=>
$self
->
ldapCAFile
)
:
()
),
...
...
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Net/LDAP.pm
View file @
fcb8e6b3
...
...
@@ -47,7 +47,8 @@ sub new {
}
$self
=
Net::
LDAP
->
new
(
\
@servers
,
onerror
=>
undef
,
onerror
=>
undef
,
keepalive
=>
1
,
(
$conf
->
{
ldapPort
}
?
(
port
=>
$conf
->
{
ldapPort
}
)
:
()
),
(
$conf
->
{
ldapTimeout
}
?
(
timeout
=>
$conf
->
{
ldapTimeout
}
)
:
()
),
(
$conf
->
{
ldapVersion
}
?
(
version
=>
$conf
->
{
ldapVersion
}
)
:
()
),
...
...
@@ -66,7 +67,7 @@ sub new {
# socket when certificate validation fails. Net::LDAP does not catch
# it, and the process ends up crashing.
# As a precaution, make sure the underlying socket is doing fine:
if
(
$self
->
socket
->
isa
('
IO::Socket::SSL
')
if
(
$self
->
socket
->
isa
('
IO::Socket::SSL
')
and
$self
->
socket
->
errstr
<
0
)
{
$portal
->
logger
->
error
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment