s3-talloc Change TALLOC_ARRAY() to talloc_array()
[samba.git] / source3 / groupdb / mapping_tdb.c
index a5fa1b7a249f8ba233bc171f032853566ce9df7d..cf8857cda541990cff878745933d5ea41b361999 100644 (file)
@@ -145,7 +145,7 @@ static bool add_mapping_entry(GROUP_MAP *map, int flag)
        len = tdb_pack(NULL, 0, "ddff",
                map->gid, map->sid_name_use, map->nt_name, map->comment);
 
-       buf = TALLOC_ARRAY(key, char, len);
+       buf = talloc_array(key, char, len);
        if (!buf) {
                TALLOC_FREE(key);
                return false;
@@ -849,7 +849,7 @@ static int convert_ldb_record(TDB_CONTEXT *ltdb, TDB_DATA key,
                p += len + 1;
 
                num_vals = pull_uint32(p, 0);
-               if (StrCaseCmp(name, "member") == 0) {
+               if (strcasecmp_m(name, "member") == 0) {
                        num_mem = num_vals;
                        members = talloc_array(tmp_ctx, struct dom_sid, num_mem);
                        if (members == NULL) {
@@ -882,30 +882,30 @@ static int convert_ldb_record(TDB_CONTEXT *ltdb, TDB_DATA key,
 
                        /* we ignore unknown or uninteresting attributes
                         * (objectclass, etc.) */
-                       if (StrCaseCmp(name, "gidNumber") == 0) {
+                       if (strcasecmp_m(name, "gidNumber") == 0) {
                                map.gid = strtoul(val, &q, 10);
                                if (*q) {
                                        errno = EIO;
                                        goto failed;
                                }
-                       } else if (StrCaseCmp(name, "sid") == 0) {
+                       } else if (strcasecmp_m(name, "sid") == 0) {
                                if (!string_to_sid(&map.sid, val)) {
                                        errno = EIO;
                                        goto failed;
                                }
-                       } else if (StrCaseCmp(name, "sidNameUse") == 0) {
+                       } else if (strcasecmp_m(name, "sidNameUse") == 0) {
                                map.sid_name_use = strtoul(val, &q, 10);
                                if (*q) {
                                        errno = EIO;
                                        goto failed;
                                }
-                       } else if (StrCaseCmp(name, "ntname") == 0) {
+                       } else if (strcasecmp_m(name, "ntname") == 0) {
                                strlcpy(map.nt_name, val,
                                        sizeof(map.nt_name));
-                       } else if (StrCaseCmp(name, "comment") == 0) {
+                       } else if (strcasecmp_m(name, "comment") == 0) {
                                strlcpy(map.comment, val,
                                        sizeof(map.comment));
-                       } else if (StrCaseCmp(name, "member") == 0) {
+                       } else if (strcasecmp_m(name, "member") == 0) {
                                if (!string_to_sid(&members[j], val)) {
                                        errno = EIO;
                                        goto failed;