pdb_ldap: Use dom_sid_str_buf
authorVolker Lendecke <vl@samba.org>
Sat, 8 Dec 2018 14:23:15 +0000 (15:23 +0100)
committerJeremy Allison <jra@samba.org>
Mon, 10 Dec 2018 23:40:30 +0000 (00:40 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/passdb/pdb_ldap.c

index 60bedad85b4e4fb84f452ed71857cffe6690d47d..5850236374fd50f2664534cb7c5fe612c996d8c6 100644 (file)
@@ -6304,6 +6304,7 @@ static bool ldapsam_set_trusteddom_pw(struct pdb_methods *methods,
        LDAPMod **mods = NULL;
        char *prev_pwd = NULL;
        char *trusted_dn = NULL;
+       struct dom_sid_buf buf;
        int rc;
 
        DEBUG(10, ("ldapsam_set_trusteddom_pw called for domain %s\n", domain));
@@ -6322,7 +6323,7 @@ static bool ldapsam_set_trusteddom_pw(struct pdb_methods *methods,
        smbldap_make_mod(priv2ld(ldap_state), entry, &mods, "sambaDomainName",
                         domain);
        smbldap_make_mod(priv2ld(ldap_state), entry, &mods, "sambaSID",
-                        sid_string_tos(sid));
+                        dom_sid_str_buf(sid, &buf));
        smbldap_make_mod(priv2ld(ldap_state), entry, &mods, "sambaPwdLastSet",
                         talloc_asprintf(talloc_tos(), "%li", (long int)time(NULL)));
        smbldap_make_mod(priv2ld(ldap_state), entry, &mods,