diff options
author | Volker Lendecke <vlendec@samba.org> | 2005-11-26 21:02:48 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:05:35 -0500 |
commit | d36eb68cb5be37423a98eb1a122c14f45d4fdaa0 (patch) | |
tree | da6109033c6ed239beb07d4db1e78b9a01162c26 /source3/passdb/util_sam_sid.c | |
parent | add1493a86d62c298f4a9e0686e8e81deab70c57 (diff) | |
download | samba-d36eb68cb5be37423a98eb1a122c14f45d4fdaa0.tar.gz samba-d36eb68cb5be37423a98eb1a122c14f45d4fdaa0.tar.bz2 samba-d36eb68cb5be37423a98eb1a122c14f45d4fdaa0.zip |
r11920: Rename local_lookup_rid to lookup_global_sam_rid, add lookup_builtin_rid.
Volker
(This used to be commit bc8836d5d7361041ce935f65bf2d172e1eb43299)
Diffstat (limited to 'source3/passdb/util_sam_sid.c')
-rw-r--r-- | source3/passdb/util_sam_sid.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source3/passdb/util_sam_sid.c b/source3/passdb/util_sam_sid.c index afbc2edcde..822b7f6a34 100644 --- a/source3/passdb/util_sam_sid.c +++ b/source3/passdb/util_sam_sid.c @@ -164,6 +164,24 @@ BOOL lookup_special_sid(const DOM_SID *sid, const char **domain, return False; } +/******************************************************************* + Look up a rid in the BUILTIN domain + ********************************************************************/ +BOOL lookup_builtin_rid(uint32 rid, fstring name) +{ + const known_sid_users *aliases = builtin_groups; + int i; + + for (i=0; aliases[i].known_user_name != NULL; i++) { + if (rid == aliases[i].rid) { + fstrcpy(name, aliases[i].known_user_name); + return True; + } + } + + return False; +} + /***************************************************************** Check if the SID is our domain SID (S-1-5-21-x-y-z). *****************************************************************/ |