diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-03-23 21:11:33 +1100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2012-05-02 13:18:03 +0200 |
commit | c844f657793c0f8df3b2afcf710166b628e8233b (patch) | |
tree | 52d0e4bd4fb6066dd84e789c9c1ef66cf1a7b4ae /source3/winbindd/idmap_util.c | |
parent | 583b104d4b9a6ae65e4b43afaba665398a34c72f (diff) | |
download | samba-c844f657793c0f8df3b2afcf710166b628e8233b.tar.gz samba-c844f657793c0f8df3b2afcf710166b628e8233b.tar.bz2 samba-c844f657793c0f8df3b2afcf710166b628e8233b.zip |
s3-idmap: convert most idmap_cache callers to unixid API
This will eventually allow the struct unixid to be passed all the way up
and down the stack.
Andrew Bartlett
Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/winbindd/idmap_util.c')
-rw-r--r-- | source3/winbindd/idmap_util.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/source3/winbindd/idmap_util.c b/source3/winbindd/idmap_util.c index 2ddf576dc8..8e9d468dc5 100644 --- a/source3/winbindd/idmap_util.c +++ b/source3/winbindd/idmap_util.c @@ -74,15 +74,18 @@ backend: if (map.status != ID_MAPPED) { if (winbindd_use_idmap_cache()) { struct dom_sid null_sid; + struct unixid id; + id.type = ID_TYPE_UID; + id.id = uid; ZERO_STRUCT(null_sid); - idmap_cache_set_sid2uid(&null_sid, uid); + idmap_cache_set_sid2unixid(&null_sid, &id); } DEBUG(10, ("uid [%lu] not mapped\n", (unsigned long)uid)); return NT_STATUS_NONE_MAPPED; } if (winbindd_use_idmap_cache()) { - idmap_cache_set_sid2uid(sid, uid); + idmap_cache_set_sid2unixid(sid, &map.xid); } return NT_STATUS_OK; @@ -134,15 +137,18 @@ backend: if (map.status != ID_MAPPED) { if (winbindd_use_idmap_cache()) { struct dom_sid null_sid; + struct unixid id; + id.type = ID_TYPE_GID; + id.id = gid; ZERO_STRUCT(null_sid); - idmap_cache_set_sid2gid(&null_sid, gid); + idmap_cache_set_sid2unixid(&null_sid, &id); } DEBUG(10, ("gid [%lu] not mapped\n", (unsigned long)gid)); return NT_STATUS_NONE_MAPPED; } if (winbindd_use_idmap_cache()) { - idmap_cache_set_sid2gid(sid, gid); + idmap_cache_set_sid2unixid(sid, &map.xid); } return NT_STATUS_OK; @@ -217,7 +223,7 @@ backend: *uid = (uid_t)map.xid.id; if (winbindd_use_idmap_cache()) { - idmap_cache_set_sid2uid(sid, *uid); + idmap_cache_set_sid2unixid(sid, &map.xid); } return NT_STATUS_OK; } @@ -291,7 +297,7 @@ backend: *gid = map.xid.id; if (winbindd_use_idmap_cache()) { - idmap_cache_set_sid2gid(sid, *gid); + idmap_cache_set_sid2unixid(sid, &map.xid); } return NT_STATUS_OK; } |