r17516: Change helper function names to make more clear what they are meant to do
[kamenim/samba.git] / source4 / dsdb / samdb / ldb_modules / samba3sam.c
index 06774780a154e054a8bd4309180798acd4d2c7c0..80cedb7b08f5b9368e011533a986062b9cf8a4d3 100644 (file)
@@ -49,7 +49,7 @@
 static struct ldb_message_element *generate_primaryGroupID(struct ldb_module *module, TALLOC_CTX *ctx, const char *attr, const struct ldb_message *remote)
 {
        struct ldb_message_element *el;
-       const char *sid = ldb_msg_find_string(remote, attr, NULL);
+       const char *sid = ldb_msg_find_attr_as_string(remote, attr, NULL);
 
        if (!sid)
                return NULL;
@@ -96,7 +96,7 @@ static void generate_sambaPrimaryGroupSID(struct ldb_module *module, const char
 
        sidstring = dom_sid_string(remote_mp, sid);
        talloc_free(sid);
-       ldb_msg_add_fmt(remote_mp, "sambaPrimaryGroupSID", "%s-%d", sidstring, ldb_msg_find_uint(local, "primaryGroupID", 0));
+       ldb_msg_add_fmt(remote_mp, "sambaPrimaryGroupSID", "%s-%d", sidstring, ldb_msg_find_attr_as_uint(local, "primaryGroupID", 0));
        talloc_free(sidstring);
 }