]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Remove unused marshalling for LSA_ADDPRIVS and LSA_REMOVEPRIVS.
authorGünther Deschner <gd@samba.org>
Thu, 14 Feb 2008 13:01:49 +0000 (14:01 +0100)
committerGünther Deschner <gd@samba.org>
Thu, 14 Feb 2008 13:01:49 +0000 (14:01 +0100)
Guenther

source/include/rpc_lsa.h
source/rpc_parse/parse_lsa.c

index 4e6a1e16cc472431ea34f1210b9af073fb037e9c..e7e013f8aa63a1a4b1e031815a46a3925eb18631 100644 (file)
@@ -494,37 +494,4 @@ typedef struct
        NTSTATUS status;
 } LSA_R_REMOVE_ACCT_RIGHTS;
 
-
-typedef struct {
-       UNIHDR hdr;
-       UNISTR2 unistring;
-} LSA_STRING;
-
-typedef struct lsa_q_addprivs
-{
-       POLICY_HND pol; /* policy handle */
-       uint32 count;
-       PRIVILEGE_SET set;
-} LSA_Q_ADDPRIVS;
-
-typedef struct lsa_r_addprivs
-{
-       NTSTATUS status;
-} LSA_R_ADDPRIVS;
-
-
-typedef struct lsa_q_removeprivs
-{
-       POLICY_HND pol; /* policy handle */
-       uint32 allrights;
-       uint32 ptr;
-       uint32 count;
-       PRIVILEGE_SET set;
-} LSA_Q_REMOVEPRIVS;
-
-typedef struct lsa_r_removeprivs
-{
-       NTSTATUS status;
-} LSA_R_REMOVEPRIVS;
-
 #endif /* _RPC_LSA_H */
index 602021146f5d208424093fd41e7d0068bc9097e3..d4d32531a06305ac5b70eed030c4cad0336bab5c 100644 (file)
@@ -1207,188 +1207,10 @@ bool lsa_io_r_lookup_names4(const char *desc, LSA_R_LOOKUP_NAMES4 *out, prs_stru
        return True;
 }
 
-/*******************************************************************
- Reads or writes an LUID structure.
-********************************************************************/
-
-static bool lsa_io_luid(const char *desc, LUID *out, prs_struct *ps, int depth)
-{
-       prs_debug(ps, depth, desc, "lsa_io_luid");
-       depth++;
-
-       if(!prs_align(ps))
-               return False;
-       if(!prs_uint32("low", ps, depth, &out->low))
-               return False;
-
-       if(!prs_uint32("high", ps, depth, &out->high))
-               return False;
-
-       return True;
-}
-
 /*******************************************************************
  Reads or writes an LUID_ATTR structure.
 ********************************************************************/
 
-static bool lsa_io_luid_attr(const char *desc, LUID_ATTR *out, prs_struct *ps, int depth)
-{
-       prs_debug(ps, depth, desc, "lsa_io_luid_attr");
-       depth++;
-
-       if(!prs_align(ps))
-               return False;
-       if (!lsa_io_luid(desc, &out->luid, ps, depth))
-               return False;
-
-       if(!prs_uint32("attr", ps, depth, &out->attr))
-               return False;
-
-       return True;
-}
-
-/*******************************************************************
- Reads or writes an PRIVILEGE_SET structure.
-********************************************************************/
-
-static bool lsa_io_privilege_set(const char *desc, PRIVILEGE_SET *out, prs_struct *ps, int depth)
-{
-       uint32 i, dummy;
-
-       prs_debug(ps, depth, desc, "lsa_io_privilege_set");
-       depth++;
-
-       if(!prs_align(ps))
-               return False;
-       if(!prs_uint32("count", ps, depth, &dummy))
-               return False;
-       if(!prs_uint32("control", ps, depth, &out->control))
-               return False;
-
-       for (i=0; i<out->count; i++) {
-               if (!lsa_io_luid_attr(desc, &out->set[i], ps, depth))
-                       return False;
-       }
-       
-       return True;
-}
-
-/*******************************************************************
- Reads or writes an LSA_Q_ADDPRIVS structure.
-********************************************************************/
-
-bool lsa_io_q_addprivs(const char *desc, LSA_Q_ADDPRIVS *out, prs_struct *ps, int depth)
-{
-       prs_debug(ps, depth, desc, "lsa_io_q_addprivs");
-       depth++;
-
-       if(!prs_align(ps))
-               return False;
-       if(!smb_io_pol_hnd("pol", &out->pol, ps, depth))
-               return False;
-       
-       if(!prs_uint32("count", ps, depth, &out->count))
-               return False;
-
-       if (UNMARSHALLING(ps) && out->count!=0) {
-               if (!NT_STATUS_IS_OK(privilege_set_init_by_ctx(ps->mem_ctx, &(out->set))))
-                       return False;
-               
-               if (!(out->set.set = PRS_ALLOC_MEM(ps, LUID_ATTR, out->count)))
-                       return False;
-       }
-       
-       if(!lsa_io_privilege_set(desc, &out->set, ps, depth))
-               return False;
-       
-       return True;
-}
-
-/*******************************************************************
- Reads or writes an LSA_R_ADDPRIVS structure.
-********************************************************************/
-
-bool lsa_io_r_addprivs(const char *desc, LSA_R_ADDPRIVS *out, prs_struct *ps, int depth)
-{
-       prs_debug(ps, depth, desc, "lsa_io_r_addprivs");
-       depth++;
-
-       if(!prs_align(ps))
-               return False;
-       if(!prs_ntstatus("status", ps, depth, &out->status))
-               return False;
-
-       return True;
-}
-
-/*******************************************************************
- Reads or writes an LSA_Q_REMOVEPRIVS structure.
-********************************************************************/
-
-bool lsa_io_q_removeprivs(const char *desc, LSA_Q_REMOVEPRIVS *out, prs_struct *ps, int depth)
-{
-       prs_debug(ps, depth, desc, "lsa_io_q_removeprivs");
-       depth++;
-
-       if(!prs_align(ps))
-               return False;
-       if(!smb_io_pol_hnd("pol", &out->pol, ps, depth))
-               return False;
-       
-       if(!prs_uint32("allrights", ps, depth, &out->allrights))
-               return False;
-
-       if(!prs_uint32("ptr", ps, depth, &out->ptr))
-               return False;
-
-       /* 
-        * JFM: I'm not sure at all if the count is inside the ptr
-        * never seen one with ptr=0
-        */
-
-       if (out->ptr!=0) {
-               if(!prs_uint32("count", ps, depth, &out->count))
-                       return False;
-
-               if (UNMARSHALLING(ps) && out->count!=0) {
-                       if (!NT_STATUS_IS_OK(privilege_set_init_by_ctx(ps->mem_ctx, &(out->set))))
-                               return False;
-
-                       if (!(out->set.set = PRS_ALLOC_MEM(ps, LUID_ATTR, out->count)))
-                               return False;
-               }
-
-               if(!lsa_io_privilege_set(desc, &out->set, ps, depth))
-                       return False;
-       }
-
-       return True;
-}
-
-/*******************************************************************
- Reads or writes an LSA_R_REMOVEPRIVS structure.
-********************************************************************/
-
-bool lsa_io_r_removeprivs(const char *desc, LSA_R_REMOVEPRIVS *out, prs_struct *ps, int depth)
-{
-       prs_debug(ps, depth, desc, "lsa_io_r_removeprivs");
-       depth++;
-
-       if(!prs_align(ps))
-               return False;
-       if(!prs_ntstatus("status", ps, depth, &out->status))
-               return False;
-
-       return True;
-}
-
 bool policy_handle_is_valid(const POLICY_HND *hnd)
 {
        POLICY_HND zero_pol;