mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #48296 from rallytime/bp-48258
Back-port #48258 to 2018.3
This commit is contained in:
commit
27207fc510
1 changed files with 5 additions and 3 deletions
|
@ -411,7 +411,8 @@ def add(connect_spec, dn, attributes):
|
|||
|
||||
modlist = salt.utils.data.decode(
|
||||
ldap.modlist.addModlist(attributes),
|
||||
to_str=True
|
||||
to_str=True,
|
||||
preserve_tuples=True
|
||||
)
|
||||
try:
|
||||
l.c.add_s(dn, modlist)
|
||||
|
@ -512,7 +513,7 @@ def modify(connect_spec, dn, directives):
|
|||
modlist[idx] = (mod[0], mod[1],
|
||||
[_format_unicode_password(x) for x in mod[2]])
|
||||
|
||||
modlist = salt.utils.data.decode(modlist, to_str=True)
|
||||
modlist = salt.utils.data.decode(modlist, to_str=True, preserve_tuples=True)
|
||||
try:
|
||||
l.c.modify_s(dn, modlist)
|
||||
except ldap.LDAPError as e:
|
||||
|
@ -581,7 +582,8 @@ def change(connect_spec, dn, before, after):
|
|||
|
||||
modlist = salt.utils.data.decode(
|
||||
ldap.modlist.modifyModlist(before, after),
|
||||
to_str=True
|
||||
to_str=True,
|
||||
preserve_tuples=True
|
||||
)
|
||||
try:
|
||||
l.c.modify_s(dn, modlist)
|
||||
|
|
Loading…
Add table
Reference in a new issue