Remove unused marshalling for SAMR_CREATE_USER.
authorGünther Deschner <gd@samba.org>
Fri, 1 Feb 2008 13:53:58 +0000 (14:53 +0100)
committerGünther Deschner <gd@samba.org>
Fri, 1 Feb 2008 15:29:21 +0000 (16:29 +0100)
Guenther
(This used to be commit 69e8a83093149201c36ffc2b7fadfa469aabf7bd)

source3/include/rpc_samr.h
source3/rpc_client/cli_samr.c
source3/rpc_parse/parse_samr.c

index 2e4598e38959fd7d511fe15c832d44e1e18f9293..fa8bf07564f9c62f7beef836d9f0da399ff36ac9 100644 (file)
@@ -1406,32 +1406,6 @@ typedef struct r_samr_lookup_rids_info
 } SAMR_R_LOOKUP_RIDS;
 
 
-/* SAMR_Q_CREATE_USER - probably a create */
-typedef struct q_samr_create_user_info
-{
-       POLICY_HND domain_pol;       /* policy handle */
-
-       UNIHDR  hdr_name;       /* unicode account name header */
-       UNISTR2 uni_name;       /* unicode account name */
-
-       uint32 acb_info;      /* account control info */
-       uint32 acct_flags;     /* 0xe005 00b0 */
-
-} SAMR_Q_CREATE_USER;
-
-
-/* SAMR_R_CREATE_USER - probably a create */
-typedef struct r_samr_create_user_info
-{
-       POLICY_HND user_pol;       /* policy handle associated with user */
-
-       uint32 access_granted;
-       uint32 user_rid;      /* user RID */
-       NTSTATUS status;         /* return status */
-
-} SAMR_R_CREATE_USER;
-
-
 /* SAMR_Q_QUERY_GROUPMEM - query group members */
 typedef struct q_samr_query_groupmem_info
 {
index e25ea81c603e1313be74390071baf734d0d5bcf1..fa1e5a645bf96b10097e1475ad928998120c09dc 100644 (file)
@@ -1368,51 +1368,6 @@ NTSTATUS rpccli_samr_lookup_names(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c
        return result;
 }
 
-/* Create a domain user */
-
-NTSTATUS rpccli_samr_create_dom_user(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, 
-                                  POLICY_HND *domain_pol, const char *acct_name,
-                                  uint32 acb_info, uint32 acct_flags,
-                                  POLICY_HND *user_pol, uint32 *rid)
-{
-       prs_struct qbuf, rbuf;
-       SAMR_Q_CREATE_USER q;
-       SAMR_R_CREATE_USER r;
-       NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
-
-       DEBUG(10,("cli_samr_create_dom_user %s\n", acct_name));
-
-       ZERO_STRUCT(q);
-       ZERO_STRUCT(r);
-
-       /* Marshall data and send request */
-
-       init_samr_q_create_user(&q, domain_pol, acct_name, acb_info, acct_flags);
-
-       CLI_DO_RPC(cli, mem_ctx, PI_SAMR, SAMR_CREATE_USER,
-               q, r,
-               qbuf, rbuf,
-               samr_io_q_create_user,
-               samr_io_r_create_user,
-               NT_STATUS_UNSUCCESSFUL); 
-
-       /* Return output parameters */
-
-       if (!NT_STATUS_IS_OK(result = r.status)) {
-               goto done;
-       }
-
-       if (user_pol)
-               *user_pol = r.user_pol;
-
-       if (rid)
-               *rid = r.user_rid;
-
- done:
-
-       return result;
-}
-
 /* Set userinfo */
 
 NTSTATUS rpccli_samr_set_userinfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, 
index 8600d879b4fa2d5b9281a38fed8bcb1e3cf9792b..9924a164a1b26ad5ab71d4001d8e860d671af9e3 100644 (file)
@@ -4440,89 +4440,6 @@ bool samr_io_r_lookup_names(const char *desc, SAMR_R_LOOKUP_NAMES * r_u,
        return True;
 }
 
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-
-void init_samr_q_create_user(SAMR_Q_CREATE_USER * q_u,
-                            POLICY_HND *pol,
-                            const char *name,
-                            uint32 acb_info, uint32 acct_flags)
-{
-       DEBUG(5, ("samr_init_samr_q_create_user\n"));
-
-       q_u->domain_pol = *pol;
-
-       init_unistr2(&q_u->uni_name, name, UNI_FLAGS_NONE);
-       init_uni_hdr(&q_u->hdr_name, &q_u->uni_name);
-
-       q_u->acb_info = acb_info;
-       q_u->acct_flags = acct_flags;
-}
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-
-bool samr_io_q_create_user(const char *desc, SAMR_Q_CREATE_USER * q_u,
-                          prs_struct *ps, int depth)
-{
-       if (q_u == NULL)
-               return False;
-
-       prs_debug(ps, depth, desc, "samr_io_q_create_user");
-       depth++;
-
-       if(!prs_align(ps))
-               return False;
-
-       if(!smb_io_pol_hnd("domain_pol", &q_u->domain_pol, ps, depth))
-               return False;
-
-       if(!smb_io_unihdr("hdr_name", &q_u->hdr_name, ps, depth))
-               return False;
-       if(!smb_io_unistr2("uni_name", &q_u->uni_name, q_u->hdr_name.buffer, ps, depth))
-               return False;
-
-       if(!prs_align(ps))
-               return False;
-       if(!prs_uint32("acb_info   ", ps, depth, &q_u->acb_info))
-               return False;
-       if(!prs_uint32("acct_flags", ps, depth, &q_u->acct_flags))
-               return False;
-
-       return True;
-}
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-
-bool samr_io_r_create_user(const char *desc, SAMR_R_CREATE_USER * r_u,
-                          prs_struct *ps, int depth)
-{
-       if (r_u == NULL)
-               return False;
-
-       prs_debug(ps, depth, desc, "samr_io_r_create_user");
-       depth++;
-
-       if(!prs_align(ps))
-               return False;
-
-       if(!smb_io_pol_hnd("user_pol", &r_u->user_pol, ps, depth))
-               return False;
-
-       if(!prs_uint32("access_granted", ps, depth, &r_u->access_granted))
-               return False;
-       if(!prs_uint32("user_rid ", ps, depth, &r_u->user_rid))
-               return False;
-       if(!prs_ntstatus("status", ps, depth, &r_u->status))
-               return False;
-
-       return True;
-}
-
 /*******************************************************************
 inits a SAMR_Q_QUERY_USERINFO structure.
 ********************************************************************/