s3-lsa Use sec_privilege_id() to lookup name to LUID
authorAndrew Bartlett <abartlet@samba.org>
Fri, 27 Aug 2010 02:12:10 +0000 (12:12 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 9 Sep 2010 04:45:59 +0000 (14:45 +1000)
Signed-off-by: Andrew Tridgell <tridge@samba.org>
source3/rpc_server/srv_lsa_nt.c

index 663f6fec9f5ab9a3393bfbc83958530cbc9345cd..6eee899530507c9684ea014f551d9c446575fabf 100644 (file)
@@ -2400,8 +2400,6 @@ NTSTATUS _lsa_LookupPrivValue(struct pipes_struct *p,
 {
        struct lsa_info *info = NULL;
        const char *name = NULL;
-       struct lsa_LUIDAttribute priv_luid;
-       uint64_t mask;
 
        /* find the connection policy handle. */
 
@@ -2419,14 +2417,11 @@ NTSTATUS _lsa_LookupPrivValue(struct pipes_struct *p,
 
        DEBUG(10,("_lsa_lookup_priv_value: name = %s\n", name));
 
-       if ( !se_priv_from_name( name, &mask ) )
+       r->out.luid->low = sec_privilege_id(name);
+       r->out.luid->high = 0;
+       if (r->out.luid->low == -1) {
                return NT_STATUS_NO_SUCH_PRIVILEGE;
-
-       priv_luid = get_privilege_luid( &mask );
-
-       r->out.luid->low = priv_luid.luid.low;
-       r->out.luid->high = priv_luid.luid.high;
-
+       }
        return NT_STATUS_OK;
 }