summaryrefslogtreecommitdiffstats
path: root/source3/winbindd/idmap_util.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-07-11 17:42:48 +0200
committerVolker Lendecke <vl@samba.org>2008-07-11 17:53:24 +0200
commitebb2d70a607cf33f3d2084d715c2d9d4329f2e7b (patch)
treeb13f99517ecd3f3b31cfa14a992c7251ac05456a /source3/winbindd/idmap_util.c
parent6c3c068716c9b7a3a7fe041fc605bcd00b376ec9 (diff)
downloadsamba-ebb2d70a607cf33f3d2084d715c2d9d4329f2e7b.tar.gz
samba-ebb2d70a607cf33f3d2084d715c2d9d4329f2e7b.tar.xz
samba-ebb2d70a607cf33f3d2084d715c2d9d4329f2e7b.zip
Revert "Make use of ADD_TO_ARRAY"
This reverts commit 81f334bd6da601a040f754c46705cfa2fd4f8c45. (This used to be commit d4d106776af3f475d46a4dd78794b7b48a3572af)
Diffstat (limited to 'source3/winbindd/idmap_util.c')
-rw-r--r--source3/winbindd/idmap_util.c34
1 files changed, 21 insertions, 13 deletions
diff --git a/source3/winbindd/idmap_util.c b/source3/winbindd/idmap_util.c
index 9819fe15f0a..78f4d13ec1e 100644
--- a/source3/winbindd/idmap_util.c
+++ b/source3/winbindd/idmap_util.c
@@ -31,16 +31,18 @@ NTSTATUS idmap_uid_to_sid(DOM_SID *sid, uid_t uid)
{
NTSTATUS ret;
struct id_map map;
- struct id_map *maps;
+ struct id_map *maps[2];
DEBUG(10,("uid = [%lu]\n", (unsigned long)uid));
map.sid = sid;
map.xid.type = ID_TYPE_UID;
map.xid.id = uid;
- maps = &map;
- ret = idmap_unixids_to_sids(&maps, 1);
+ maps[0] = &map;
+ maps[1] = NULL;
+
+ ret = idmap_unixids_to_sids(maps);
if ( ! NT_STATUS_IS_OK(ret)) {
DEBUG(10, ("error mapping uid [%lu]\n", (unsigned long)uid));
return ret;
@@ -63,16 +65,18 @@ NTSTATUS idmap_gid_to_sid(DOM_SID *sid, gid_t gid)
{
NTSTATUS ret;
struct id_map map;
- struct id_map *maps;
+ struct id_map *maps[2];
DEBUG(10,("gid = [%lu]\n", (unsigned long)gid));
map.sid = sid;
map.xid.type = ID_TYPE_GID;
map.xid.id = gid;
- maps = &map;
- ret = idmap_unixids_to_sids(&maps, 1);
+ maps[0] = &map;
+ maps[1] = NULL;
+
+ ret = idmap_unixids_to_sids(maps);
if ( ! NT_STATUS_IS_OK(ret)) {
DEBUG(10, ("error mapping gid [%lu]\n", (unsigned long)gid));
return ret;
@@ -95,15 +99,17 @@ NTSTATUS idmap_sid_to_uid(DOM_SID *sid, uid_t *uid)
{
NTSTATUS ret;
struct id_map map;
- struct id_map *maps;
+ struct id_map *maps[2];
DEBUG(10,("idmap_sid_to_uid: sid = [%s]\n", sid_string_dbg(sid)));
map.sid = sid;
- map.xid.type = ID_TYPE_UID;
- maps = &map;
+ map.xid.type = ID_TYPE_UID;
- ret = idmap_sids_to_unixids(&maps, 1);
+ maps[0] = &map;
+ maps[1] = NULL;
+
+ ret = idmap_sids_to_unixids(maps);
if ( ! NT_STATUS_IS_OK(ret)) {
DEBUG(10, ("error mapping sid [%s] to uid\n",
sid_string_dbg(sid)));
@@ -133,15 +139,17 @@ NTSTATUS idmap_sid_to_gid(DOM_SID *sid, gid_t *gid)
{
NTSTATUS ret;
struct id_map map;
- struct id_map *maps;
+ struct id_map *maps[2];
DEBUG(10,("idmap_sid_to_gid: sid = [%s]\n", sid_string_dbg(sid)));
map.sid = sid;
map.xid.type = ID_TYPE_GID;
- maps = &map;
- ret = idmap_sids_to_unixids(&maps, 1);
+ maps[0] = &map;
+ maps[1] = NULL;
+
+ ret = idmap_sids_to_unixids(maps);
if ( ! NT_STATUS_IS_OK(ret)) {
DEBUG(10, ("error mapping sid [%s] to gid\n",
sid_string_dbg(sid)));