]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Use pidl for _lsa_LookupPrivValue().
authorGünther Deschner <gd@samba.org>
Thu, 14 Feb 2008 12:25:42 +0000 (13:25 +0100)
committerGünther Deschner <gd@samba.org>
Thu, 14 Feb 2008 12:53:27 +0000 (13:53 +0100)
Guenther

source/rpc_server/srv_lsa.c
source/rpc_server/srv_lsa_nt.c

index 60a3bd3671de81aaf96c705df62a47943b83876f..c4ca22f401f622c110bf71c2994f61a8b135e4db 100644 (file)
@@ -413,29 +413,7 @@ static bool api_lsa_enum_acct_rights(pipes_struct *p)
 
 static bool api_lsa_lookup_priv_value(pipes_struct *p)
 {
-       LSA_Q_LOOKUP_PRIV_VALUE q_u;
-       LSA_R_LOOKUP_PRIV_VALUE r_u;
-       
-       prs_struct *data = &p->in_data.data;
-       prs_struct *rdata = &p->out_data.rdata;
-
-       ZERO_STRUCT(q_u);
-       ZERO_STRUCT(r_u);
-
-       if(!lsa_io_q_lookup_priv_value("", &q_u, data, 0)) {
-               DEBUG(0,("api_lsa_lookup_priv_value: failed to unmarshall LSA_Q_LOOKUP_PRIV_VALUE .\n"));
-               return False;
-       }
-
-       r_u.status = _lsa_lookup_priv_value(p, &q_u, &r_u);
-
-       /* store the response in the SMB stream */
-       if(!lsa_io_r_lookup_priv_value("", &r_u, rdata, 0)) {
-               DEBUG(0,("api_lsa_lookup_priv_value: Failed to marshall LSA_R_LOOKUP_PRIV_VALUE.\n"));
-               return False;
-       }
-
-       return True;
+       return proxy_lsa_call(p, NDR_LSA_LOOKUPPRIVVALUE);
 }
 
 /***************************************************************************
index ef09b28dde84dde715079445db2dd1c103c051a8..a8f6e15e232918610d6b58c55f9f4a968ab47386 100644 (file)
@@ -2198,21 +2198,23 @@ NTSTATUS _lsa_enum_acct_rights(pipes_struct *p, LSA_Q_ENUM_ACCT_RIGHTS *q_u, LSA
 
 
 /***************************************************************************
+ _lsa_LookupPrivValue
  ***************************************************************************/
 
-NTSTATUS _lsa_lookup_priv_value(pipes_struct *p, LSA_Q_LOOKUP_PRIV_VALUE *q_u, LSA_R_LOOKUP_PRIV_VALUE *r_u)
+NTSTATUS _lsa_LookupPrivValue(pipes_struct *p,
+                             struct lsa_LookupPrivValue *r)
 {
        struct lsa_info *info = NULL;
-       fstring name;
+       const char *name = NULL;
        LUID_ATTR priv_luid;
        SE_PRIV mask;
 
        /* find the connection policy handle. */
 
-       if (!find_policy_by_hnd(p, &q_u->pol, (void **)(void *)&info))
+       if (!find_policy_by_hnd(p, r->in.handle, (void **)(void *)&info))
                return NT_STATUS_INVALID_HANDLE;
 
-       unistr2_to_ascii(name, &q_u->privname.unistring, sizeof(name));
+       name = r->in.name->string;
 
        DEBUG(10,("_lsa_lookup_priv_value: name = %s\n", name));
 
@@ -2221,14 +2223,12 @@ NTSTATUS _lsa_lookup_priv_value(pipes_struct *p, LSA_Q_LOOKUP_PRIV_VALUE *q_u, L
 
        priv_luid = get_privilege_luid( &mask );
 
-       r_u->luid.low  = priv_luid.luid.low;
-       r_u->luid.high = priv_luid.luid.high;
-
+       r->out.luid->low = priv_luid.luid.low;
+       r->out.luid->high = priv_luid.luid.high;
 
        return NT_STATUS_OK;
 }
 
-
 /*
  * From here on the server routines are just dummy ones to make smbd link with
  * librpc/gen_ndr/srv_lsa.c. These routines are actually never called, we are
@@ -2319,12 +2319,6 @@ NTSTATUS _lsa_QuerySecret(pipes_struct *p, struct lsa_QuerySecret *r)
        return NT_STATUS_NOT_IMPLEMENTED;
 }
 
-NTSTATUS _lsa_LookupPrivValue(pipes_struct *p, struct lsa_LookupPrivValue *r)
-{
-       p->rng_fault_state = True;
-       return NT_STATUS_NOT_IMPLEMENTED;
-}
-
 NTSTATUS _lsa_LookupPrivName(pipes_struct *p, struct lsa_LookupPrivName *r)
 {
        p->rng_fault_state = True;