mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Limit passwd plugin to user container
Improve performance by specifying basedn to find_entry_by_attr() function in ldap2 and passwd plugins. https://fedorahosted.org/freeipa/ticket/1165
This commit is contained in:
parent
bc9fd7a342
commit
8d35089780
@ -85,7 +85,8 @@ class passwd(Command):
|
|||||||
principal = '%s@%s' % (principal, self.api.env.realm)
|
principal = '%s@%s' % (principal, self.api.env.realm)
|
||||||
|
|
||||||
(dn, entry_attrs) = ldap.find_entry_by_attr(
|
(dn, entry_attrs) = ldap.find_entry_by_attr(
|
||||||
'krbprincipalname', principal, 'posixaccount', ['']
|
'krbprincipalname', principal, 'posixaccount', [''],
|
||||||
|
",".join([api.env.container_user, api.env.basedn])
|
||||||
)
|
)
|
||||||
|
|
||||||
ldap.modify_password(dn, password)
|
ldap.modify_password(dn, password)
|
||||||
|
Loading…
Reference in New Issue
Block a user