Fixed issue #1155 - Group and User filter detection for freeIPA LDAP fails.
This commit is contained in:
parent
8cef58b4da
commit
118ed9d58b
3 changed files with 3 additions and 2 deletions
|
@ -137,6 +137,7 @@ class Ldap
|
||||||
result = ldap.get_operation_result
|
result = ldap.get_operation_result
|
||||||
raise Exceptions::UnprocessableEntity, "Can't bind to '#{@host}', #{result.code}, #{result.message}"
|
raise Exceptions::UnprocessableEntity, "Can't bind to '#{@host}', #{result.code}, #{result.message}"
|
||||||
rescue => e
|
rescue => e
|
||||||
|
Rails.logger.error e
|
||||||
raise Exceptions::UnprocessableEntity, "Can't connect to '#{@host}' on port '#{@port}', #{e}"
|
raise Exceptions::UnprocessableEntity, "Can't connect to '#{@host}' on port '#{@port}', #{e}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -112,7 +112,7 @@ class Ldap
|
||||||
#
|
#
|
||||||
# @return [String, nil] The active or found filter or nil if none could be found.
|
# @return [String, nil] The active or found filter or nil if none could be found.
|
||||||
def filter
|
def filter
|
||||||
@filter ||= lookup_filter(['(objectClass=group)'])
|
@filter ||= lookup_filter(['(objectClass=group)', '(objectClass=posixgroup)'])
|
||||||
end
|
end
|
||||||
|
|
||||||
# The active uid attribute of the instance. If none give on initialization an automatic lookup is performed.
|
# The active uid attribute of the instance. If none give on initialization an automatic lookup is performed.
|
||||||
|
|
|
@ -162,7 +162,7 @@ class Ldap
|
||||||
#
|
#
|
||||||
# @return [String, nil] The active or found filter or nil if none could be found.
|
# @return [String, nil] The active or found filter or nil if none could be found.
|
||||||
def filter
|
def filter
|
||||||
@filter ||= lookup_filter(['(&(objectClass=user)(samaccountname=*)(!(samaccountname=*$)))', '(objectClass=user)'])
|
@filter ||= lookup_filter(['(&(objectClass=user)(samaccountname=*)(!(samaccountname=*$)))', '(objectClass=user)', '(objectClass=posixaccount)'])
|
||||||
end
|
end
|
||||||
|
|
||||||
# The active uid attribute of the instance. If none give on initialization an automatic lookup is performed.
|
# The active uid attribute of the instance. If none give on initialization an automatic lookup is performed.
|
||||||
|
|
Loading…
Reference in a new issue