netapi: add samr_rid_to_priv_level().
authorGünther Deschner <gd@samba.org>
Wed, 27 Aug 2008 22:56:25 +0000 (00:56 +0200)
committerGünther Deschner <gd@samba.org>
Fri, 29 Aug 2008 11:58:02 +0000 (13:58 +0200)
Guenther
(This used to be commit 51afae499974f3ad73a1c9bdfbc41e3130966ebc)

source3/lib/netapi/user.c

index 593434f999f25177b213aef52a9ff2b8dc2b2b38..7f259195a591539adbeb03e09ad97b0cb5410045 100644 (file)
@@ -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 */