summaryrefslogtreecommitdiff
path: root/source3/lib/netapi/user.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-08-28 00:56:25 +0200
committerGünther Deschner <gd@samba.org>2008-08-29 13:58:02 +0200
commitc750f8c40036f04ff0ae533aeb97d5948b31ed54 (patch)
tree15ecb9f479517886579c6c9a313a074650ea3e9f /source3/lib/netapi/user.c
parentff21cceecc66c0aa86557e99fbcbd825e3d9454c (diff)
downloadsamba-c750f8c40036f04ff0ae533aeb97d5948b31ed54.tar.gz
samba-c750f8c40036f04ff0ae533aeb97d5948b31ed54.tar.bz2
samba-c750f8c40036f04ff0ae533aeb97d5948b31ed54.zip
netapi: add samr_rid_to_priv_level().
Guenther (This used to be commit 51afae499974f3ad73a1c9bdfbc41e3130966ebc)
Diffstat (limited to 'source3/lib/netapi/user.c')
-rw-r--r--source3/lib/netapi/user.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source3/lib/netapi/user.c b/source3/lib/netapi/user.c
index 593434f999..7f259195a5 100644
--- a/source3/lib/netapi/user.c
+++ b/source3/lib/netapi/user.c
@@ -675,6 +675,21 @@ static NTSTATUS libnetapi_samr_lookup_user(TALLOC_CTX *mem_ctx,
/****************************************************************
****************************************************************/
+static uint32_t samr_rid_to_priv_level(uint32_t rid)
+{
+ switch (rid) {
+ case DOMAIN_RID_ADMINISTRATOR:
+ return USER_PRIV_ADMIN;
+ case DOMAIN_RID_GUEST:
+ return USER_PRIV_GUEST;
+ default:
+ return USER_PRIV_USER;
+ }
+}
+
+/****************************************************************
+****************************************************************/
+
static uint32_t samr_acb_flags_to_netapi_flags(uint32_t acb)
{
uint32_t fl = UF_SCRIPT; /* god knows why */