diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-03-23 21:01:01 +1100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2012-05-02 13:18:02 +0200 |
commit | 583b104d4b9a6ae65e4b43afaba665398a34c72f (patch) | |
tree | 57adfe71a9d11c1e925aa4c7dfd4f78614248f58 /source3/lib/idmap_cache.h | |
parent | 0cad493412c034a7dec36db5dfb11425d897547a (diff) | |
download | samba-583b104d4b9a6ae65e4b43afaba665398a34c72f.tar.gz samba-583b104d4b9a6ae65e4b43afaba665398a34c72f.tar.bz2 samba-583b104d4b9a6ae65e4b43afaba665398a34c72f.zip |
s3-idmap: Rework idmap_cache to store ID_TYPE_BOTH values
This required that the lower level cache store a UID/GID and a type, and that
we operate on struct unixid rather than just uid/gid.
The ID_TYPE_BOTH is then handled as being a positive mapping for both
a UID and GID value. Wrapper functions are provided so that callers are not
changed in this patch.
Andrew Bartlett
Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/lib/idmap_cache.h')
-rw-r--r-- | source3/lib/idmap_cache.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source3/lib/idmap_cache.h b/source3/lib/idmap_cache.h index 4c87139770..afb8c16940 100644 --- a/source3/lib/idmap_cache.h +++ b/source3/lib/idmap_cache.h @@ -22,16 +22,19 @@ #define _LIB_IDMAP_CACHE_H_ /* The following definitions come from lib/idmap_cache.c */ - +struct unixid; +bool idmap_cache_find_sid2unixid(const struct dom_sid *sid, struct unixid *id, + bool *expired); bool idmap_cache_find_sid2uid(const struct dom_sid *sid, uid_t *puid, bool *expired); -bool idmap_cache_find_uid2sid(uid_t uid, struct dom_sid *sid, bool *expired); -void idmap_cache_set_sid2uid(const struct dom_sid *sid, uid_t uid); bool idmap_cache_find_sid2gid(const struct dom_sid *sid, gid_t *pgid, bool *expired); +bool idmap_cache_find_uid2sid(uid_t uid, struct dom_sid *sid, bool *expired); bool idmap_cache_find_gid2sid(gid_t gid, struct dom_sid *sid, bool *expired); +void idmap_cache_set_sid2unixid(const struct dom_sid *sid, struct unixid *unix_id); +void idmap_cache_set_sid2uid(const struct dom_sid *sid, uid_t uid); void idmap_cache_set_sid2gid(const struct dom_sid *sid, gid_t gid); -void idmap_cache_set_sid2both(const struct dom_sid *sid, uid_t id); +void idmap_cache_set_sid2both(const struct dom_sid *sid, uid_t uid); bool idmap_cache_del_uid(uid_t uid); bool idmap_cache_del_gid(gid_t gid); |