diff options
author | Volker Lendecke <vl@samba.org> | 2007-12-15 22:47:30 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2007-12-15 22:47:30 +0100 |
commit | 2e07c2ade89f4ff281c61f74cb88e09990cf5f46 (patch) | |
tree | a1fb43117e5b3966c8113d47c37a1bdf1e8ee30b /source3/groupdb | |
parent | 79cd97cc3f496f781d809c1ab619afa2cc07293d (diff) | |
download | samba-2e07c2ade89f4ff281c61f74cb88e09990cf5f46.tar.gz samba-2e07c2ade89f4ff281c61f74cb88e09990cf5f46.tar.bz2 samba-2e07c2ade89f4ff281c61f74cb88e09990cf5f46.zip |
s/sid_to_string/sid_to_fstring/
least surprise for callers
(This used to be commit eb523ba77697346a365589101aac379febecd546)
Diffstat (limited to 'source3/groupdb')
-rw-r--r-- | source3/groupdb/mapping_ldb.c | 12 | ||||
-rw-r--r-- | source3/groupdb/mapping_tdb.c | 16 |
2 files changed, 14 insertions, 14 deletions
diff --git a/source3/groupdb/mapping_ldb.c b/source3/groupdb/mapping_ldb.c index 205111e5ac..ea46777598 100644 --- a/source3/groupdb/mapping_ldb.c +++ b/source3/groupdb/mapping_ldb.c @@ -119,7 +119,7 @@ static struct ldb_dn *mapping_dn(TALLOC_CTX *mem_ctx, const DOM_SID *sid) if (!sid_split_rid(&domsid, &rid)) { return NULL; } - if (!sid_to_string(string_sid, &domsid)) { + if (!sid_to_fstring(string_sid, &domsid)) { return NULL; } /* we split by domain and rid so we can do a subtree search @@ -149,7 +149,7 @@ static bool add_mapping_entry(GROUP_MAP *map, int flag) if (ldb_msg_add_string(msg, "objectClass", "groupMap") != LDB_SUCCESS || ldb_msg_add_string(msg, "sid", - sid_to_string(string_sid, &map->sid)) != LDB_SUCCESS || + sid_to_fstring(string_sid, &map->sid)) != LDB_SUCCESS || ldb_msg_add_fmt(msg, "gidNumber", "%u", (unsigned)map->gid) != LDB_SUCCESS || ldb_msg_add_fmt(msg, "sidNameUse", "%u", (unsigned)map->sid_name_use) != LDB_SUCCESS || ldb_msg_add_string(msg, "comment", map->comment) != LDB_SUCCESS || @@ -327,7 +327,7 @@ static bool enum_group_mapping(const DOM_SID *domsid, enum lsa_SidType sid_name_ /* we do a subtree search on the domain */ if (domsid != NULL) { - sid_to_string(name, domsid); + sid_to_fstring(name, domsid); basedn = ldb_dn_string_compose(tmp_ctx, NULL, "domain=%s", name); if (basedn == NULL) goto failed; } @@ -376,7 +376,7 @@ static NTSTATUS one_alias_membership(const DOM_SID *member, fstring string_sid; NTSTATUS status = NT_STATUS_INTERNAL_DB_CORRUPTION; - if (!sid_to_string(string_sid, member)) { + if (!sid_to_fstring(string_sid, member)) { return NT_STATUS_INVALID_PARAMETER; } @@ -427,7 +427,7 @@ static NTSTATUS modify_aliasmem(const DOM_SID *alias, const DOM_SID *member, GROUP_MAP map; if (!get_group_map_from_sid(*alias, &map)) { - sid_to_string(string_sid, alias); + sid_to_fstring(string_sid, alias); return NT_STATUS_NO_SUCH_ALIAS; } @@ -452,7 +452,7 @@ static NTSTATUS modify_aliasmem(const DOM_SID *alias, const DOM_SID *member, el.name = talloc_strdup(tmp_ctx, "member"); el.num_values = 1; el.values = &val; - sid_to_string(string_sid, member); + sid_to_fstring(string_sid, member); val.data = (uint8_t *)string_sid; val.length = strlen(string_sid); diff --git a/source3/groupdb/mapping_tdb.c b/source3/groupdb/mapping_tdb.c index ad8ed0d34d..cf9f9058af 100644 --- a/source3/groupdb/mapping_tdb.c +++ b/source3/groupdb/mapping_tdb.c @@ -97,7 +97,7 @@ static bool add_mapping_entry(GROUP_MAP *map, int flag) int len; bool ret; - sid_to_string(string_sid, &map->sid); + sid_to_fstring(string_sid, &map->sid); len = tdb_pack(NULL, sizeof(buf), "ddff", map->gid, map->sid_name_use, map->nt_name, map->comment); @@ -139,7 +139,7 @@ static bool get_group_map_from_sid(DOM_SID sid, GROUP_MAP *map) /* the key is the SID, retrieving is direct */ - sid_to_string(string_sid, &sid); + sid_to_fstring(string_sid, &sid); if (asprintf(&key, "%s%s", GROUP_PREFIX, string_sid) < 0) { return false; } @@ -271,7 +271,7 @@ static bool group_map_remove(const DOM_SID *sid) /* the key is the SID, retrieving is direct */ - sid_to_string(string_sid, sid); + sid_to_fstring(string_sid, sid); if (asprintf(&key, "%s%s", GROUP_PREFIX, string_sid) < 0) { return false; } @@ -397,7 +397,7 @@ static NTSTATUS one_alias_membership(const DOM_SID *member, TALLOC_CTX *frame; slprintf(key, sizeof(key), "%s%s", MEMBEROF_PREFIX, - sid_to_string(tmp, member)); + sid_to_fstring(tmp, member)); dbuf = tdb_fetch_bystring(tdb, key); @@ -480,14 +480,14 @@ static NTSTATUS add_aliasmem(const DOM_SID *alias, const DOM_SID *member) if (is_aliasmem(alias, member)) return NT_STATUS_MEMBER_IN_ALIAS; - sid_to_string(string_sid, member); + sid_to_fstring(string_sid, member); if (asprintf(&key, "%s%s", MEMBEROF_PREFIX, string_sid) < 0) { return NT_STATUS_NO_MEMORY; } dbuf = tdb_fetch_bystring(tdb, key); - sid_to_string(string_sid, alias); + sid_to_fstring(string_sid, alias); if (dbuf.dptr != NULL) { asprintf(&new_memberstring, "%s %s", (char *)(dbuf.dptr), @@ -624,7 +624,7 @@ static NTSTATUS del_aliasmem(const DOM_SID *alias, const DOM_SID *member) num -= 1; - sid_to_string(sid_string, member); + sid_to_fstring(sid_string, member); if (asprintf(&key, "%s%s", MEMBEROF_PREFIX, sid_string) < 0) { TALLOC_FREE(sids); return NT_STATUS_NO_MEMORY; @@ -649,7 +649,7 @@ static NTSTATUS del_aliasmem(const DOM_SID *alias, const DOM_SID *member) for (i=0; i<num; i++) { char *s = member_string; - sid_to_string(sid_string, &sids[i]); + sid_to_fstring(sid_string, &sids[i]); asprintf(&member_string, "%s %s", s, sid_string); SAFE_FREE(s); |