The branch, v3-2-test has been updated
       via  54bdd22a07e885f896a8f784bc12096f65afac75 (commit)
       via  aa3de6f9f5b5375ca9f1e8a60a378afba1c0848b (commit)
       via  5bfb33f1c5a16d10f77cb76962df4a949626a062 (commit)
       via  f2fb3473455f20e7314a9d33f5a1c923d3057d97 (commit)
       via  153e4dd162423a846dbd4a9a1be1fd747792bdbf (commit)
      from  9a435b510f8ccfd0ca3b3d100d6176e643273578 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit 54bdd22a07e885f896a8f784bc12096f65afac75
Author: Günther Deschner <[EMAIL PROTECTED]>
Date:   Mon Jan 14 15:39:51 2008 +0100

    Fix rpcclient display_trust_dom_info().
    
    Guenther

commit aa3de6f9f5b5375ca9f1e8a60a378afba1c0848b
Author: Günther Deschner <[EMAIL PROTECTED]>
Date:   Mon Jan 14 15:33:26 2008 +0100

    Use pidl generated rpccli_lsa_QueryTrustedDomainInfoBySid when vampiring 
trusted
    domain secrets.
    
    Guenther

commit 5bfb33f1c5a16d10f77cb76962df4a949626a062
Author: Günther Deschner <[EMAIL PROTECTED]>
Date:   Mon Jan 14 15:27:57 2008 +0100

    Remove some more hand written LSA rpc.
    
    (rpccli_lsa_open_trusted_domain,
    rpccli_lsa_query_trusted_domain_info,
    cli_lsa_query_domain_info_policy).
    
    Guenther

commit f2fb3473455f20e7314a9d33f5a1c923d3057d97
Author: Günther Deschner <[EMAIL PROTECTED]>
Date:   Mon Jan 14 15:19:30 2008 +0100

    Start removing hand-written lsa marshalling code (namely
    rpccli_lsa_open_trusted_domain_by_name,
    rpccli_lsa_query_trusted_domain_info_by_sid and
    rpccli_lsa_query_trusted_domain_info_by_name).
    
    Guenther

commit 153e4dd162423a846dbd4a9a1be1fd747792bdbf
Author: Günther Deschner <[EMAIL PROTECTED]>
Date:   Mon Jan 14 15:15:47 2008 +0100

    Use some more pidl generated LSA rpc in rpcclient.
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 source/include/rpc_lsa.h       |   38 -------
 source/rpc_client/cli_lsarpc.c |  219 ----------------------------------------
 source/rpc_parse/parse_lsa.c   |  158 -----------------------------
 source/rpcclient/cmd_lsarpc.c  |  114 ++++++++++-----------
 source/utils/net_rpc.c         |   22 +++--
 5 files changed, 66 insertions(+), 485 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/include/rpc_lsa.h b/source/include/rpc_lsa.h
index 9f90b53..beb12c2 100644
--- a/source/include/rpc_lsa.h
+++ b/source/include/rpc_lsa.h
@@ -988,25 +988,6 @@ typedef struct {
 
 /*******************************************************/
 
-/* LSA_Q_OPEN_TRUSTED_DOMAIN_BY_NAME - LSA Query Open Trusted Domain by Name*/
-typedef struct lsa_q_open_trusted_domain_by_name
-{
-       POLICY_HND      pol;    /* policy handle */
-       LSA_STRING      name;   /* domain name */
-       uint32  access_mask;    /* access mask */
-       
-} LSA_Q_OPEN_TRUSTED_DOMAIN_BY_NAME;
-
-/* LSA_R_OPEN_TRUSTED_DOMAIN_BY_NAME - response to LSA Query Open Trusted 
Domain by Name */
-typedef struct {
-       POLICY_HND      handle; /* trustdom policy handle */
-       NTSTATUS        status; /* return code */
-} LSA_R_OPEN_TRUSTED_DOMAIN_BY_NAME;
-
-
-/*******************************************************/
-
-
 typedef struct {
        POLICY_HND      handle; 
        UNISTR4         secretname;
@@ -1086,24 +1067,6 @@ typedef struct lsa_query_trusted_domain_info
 
 } LSA_Q_QUERY_TRUSTED_DOMAIN_INFO;
 
-/* LSA_Q_QUERY_TRUSTED_DOMAIN_INFO_BY_SID - LSA query trusted domain info */
-typedef struct lsa_query_trusted_domain_info_by_sid
-{
-       POLICY_HND      pol;            /* policy handle */
-       DOM_SID2        dom_sid;        /* domain sid */
-       uint16          info_class;     /* info class */
-       
-} LSA_Q_QUERY_TRUSTED_DOMAIN_INFO_BY_SID;
-
-/* LSA_Q_QUERY_TRUSTED_DOMAIN_INFO_BY_NAME - LSA query trusted domain info */
-typedef struct lsa_query_trusted_domain_info_by_name
-{
-       POLICY_HND      pol;            /* policy handle */
-       LSA_STRING      domain_name;    /* domain name */
-       uint16          info_class;     /* info class */
-       
-} LSA_Q_QUERY_TRUSTED_DOMAIN_INFO_BY_NAME;
-
 typedef struct trusted_domain_info_name {
        LSA_STRING      netbios_name; 
 } TRUSTED_DOMAIN_INFO_NAME;
@@ -1125,7 +1088,6 @@ typedef struct lsa_data_buf_hdr {
        uint32 data_ptr;
 } LSA_DATA_BUF_HDR;
 
-
 typedef struct lsa_data_buf2 {
        uint32 size;
        uint8 *data;
diff --git a/source/rpc_client/cli_lsarpc.c b/source/rpc_client/cli_lsarpc.c
index 6abc67f..a023fe7 100644
--- a/source/rpc_client/cli_lsarpc.c
+++ b/source/rpc_client/cli_lsarpc.c
@@ -1468,222 +1468,3 @@ Error was : %s.\n", remote_machine, cli_errstr(&cli) ));
 }
 
 #endif
-
-NTSTATUS rpccli_lsa_open_trusted_domain(struct rpc_pipe_client *cli, 
TALLOC_CTX *mem_ctx,
-                                    POLICY_HND *pol, DOM_SID *dom_sid, uint32 
access_mask,
-                                    POLICY_HND *trustdom_pol)
-{
-       prs_struct qbuf, rbuf;
-       LSA_Q_OPEN_TRUSTED_DOMAIN q;
-       LSA_R_OPEN_TRUSTED_DOMAIN r;
-       NTSTATUS result;
-
-       ZERO_STRUCT(q);
-       ZERO_STRUCT(r);
-
-       /* Initialise input parameters */
-
-       init_lsa_q_open_trusted_domain(&q, pol, dom_sid, access_mask);
-
-       /* Marshall data and send request */
-
-       CLI_DO_RPC( cli, mem_ctx, PI_LSARPC, LSA_OPENTRUSTDOM,
-               q, r,
-               qbuf, rbuf,
-               lsa_io_q_open_trusted_domain,
-               lsa_io_r_open_trusted_domain,
-               NT_STATUS_UNSUCCESSFUL);
-
-       /* Return output parameters */
-
-       result = r.status;
-
-       if (NT_STATUS_IS_OK(result)) {
-               *trustdom_pol = r.handle;
-       }
-
-       return result;
-}
-
-NTSTATUS rpccli_lsa_query_trusted_domain_info(struct rpc_pipe_client *cli, 
TALLOC_CTX *mem_ctx,
-                                          POLICY_HND *pol,
-                                          uint16 info_class,
-                                          LSA_TRUSTED_DOMAIN_INFO **info)
-{
-       prs_struct qbuf, rbuf;
-       LSA_Q_QUERY_TRUSTED_DOMAIN_INFO q;
-       LSA_R_QUERY_TRUSTED_DOMAIN_INFO r;
-       NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
-
-       ZERO_STRUCT(q);
-       ZERO_STRUCT(r);
-
-       /* Marshall data and send request */
-
-       init_q_query_trusted_domain_info(&q, pol, info_class);
-
-       CLI_DO_RPC( cli, mem_ctx, PI_LSARPC, LSA_QUERYTRUSTDOMINFO,
-               q, r,
-               qbuf, rbuf,
-               lsa_io_q_query_trusted_domain_info,
-               lsa_io_r_query_trusted_domain_info,
-               NT_STATUS_UNSUCCESSFUL);
-
-       result = r.status;
-
-       if (!NT_STATUS_IS_OK(result)) {
-               goto done;
-       }
-
-       *info = r.info;
-
-done:
-       return result;
-}
-
-NTSTATUS rpccli_lsa_open_trusted_domain_by_name(struct rpc_pipe_client *cli, 
TALLOC_CTX *mem_ctx,
-                                               POLICY_HND *pol, const char 
*name, uint32 access_mask,
-                                               POLICY_HND *trustdom_pol)
-{
-       prs_struct qbuf, rbuf;
-       LSA_Q_OPEN_TRUSTED_DOMAIN_BY_NAME q;
-       LSA_R_OPEN_TRUSTED_DOMAIN_BY_NAME r;
-       NTSTATUS result;
-
-       ZERO_STRUCT(q);
-       ZERO_STRUCT(r);
-
-       /* Initialise input parameters */
-
-       init_lsa_q_open_trusted_domain_by_name(&q, pol, name, access_mask);
-
-       /* Marshall data and send request */
-
-       CLI_DO_RPC( cli, mem_ctx, PI_LSARPC, LSA_OPENTRUSTDOMBYNAME,
-               q, r,
-               qbuf, rbuf,
-               lsa_io_q_open_trusted_domain_by_name,
-               lsa_io_r_open_trusted_domain_by_name,
-               NT_STATUS_UNSUCCESSFUL);
-
-       /* Return output parameters */
-
-       result = r.status;
-
-       if (NT_STATUS_IS_OK(result)) {
-               *trustdom_pol = r.handle;
-       }
-
-       return result;
-}
-
-
-NTSTATUS rpccli_lsa_query_trusted_domain_info_by_sid(struct rpc_pipe_client 
*cli, TALLOC_CTX *mem_ctx,
-                                                 POLICY_HND *pol,
-                                                 uint16 info_class, DOM_SID 
*dom_sid,
-                                                 LSA_TRUSTED_DOMAIN_INFO 
**info)
-{
-       prs_struct qbuf, rbuf;
-       LSA_Q_QUERY_TRUSTED_DOMAIN_INFO_BY_SID q;
-       LSA_R_QUERY_TRUSTED_DOMAIN_INFO r;
-       NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
-
-       ZERO_STRUCT(q);
-       ZERO_STRUCT(r);
-
-       /* Marshall data and send request */
-
-       init_q_query_trusted_domain_info_by_sid(&q, pol, info_class, dom_sid);
-
-       CLI_DO_RPC( cli, mem_ctx, PI_LSARPC, LSA_QUERYTRUSTDOMINFOBYSID,
-               q, r,
-               qbuf, rbuf,
-               lsa_io_q_query_trusted_domain_info_by_sid,
-               lsa_io_r_query_trusted_domain_info,
-               NT_STATUS_UNSUCCESSFUL);
-
-       result = r.status;
-
-       if (!NT_STATUS_IS_OK(result)) {
-               goto done;
-       }
-
-       *info = r.info;
-
-done:
-
-       return result;
-}
-
-NTSTATUS rpccli_lsa_query_trusted_domain_info_by_name(struct rpc_pipe_client 
*cli, TALLOC_CTX *mem_ctx,
-                                                  POLICY_HND *pol,
-                                                  uint16 info_class, const 
char *domain_name,
-                                                  LSA_TRUSTED_DOMAIN_INFO 
**info)
-{
-       prs_struct qbuf, rbuf;
-       LSA_Q_QUERY_TRUSTED_DOMAIN_INFO_BY_NAME q;
-       LSA_R_QUERY_TRUSTED_DOMAIN_INFO r;
-       NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
-
-       ZERO_STRUCT(q);
-       ZERO_STRUCT(r);
-
-       /* Marshall data and send request */
-
-       init_q_query_trusted_domain_info_by_name(&q, pol, info_class, 
domain_name);
-
-       CLI_DO_RPC( cli, mem_ctx, PI_LSARPC, LSA_QUERYTRUSTDOMINFOBYNAME,
-               q, r,
-               qbuf, rbuf,
-               lsa_io_q_query_trusted_domain_info_by_name,
-               lsa_io_r_query_trusted_domain_info,
-               NT_STATUS_UNSUCCESSFUL);
-
-       result = r.status;
-
-       if (!NT_STATUS_IS_OK(result)) {
-               goto done;
-       }
-
-       *info = r.info;
-
-done:
-
-       return result;
-}
-
-NTSTATUS cli_lsa_query_domain_info_policy(struct rpc_pipe_client *cli, 
TALLOC_CTX *mem_ctx,
-                                         POLICY_HND *pol,
-                                         uint16 info_class, LSA_DOM_INFO_UNION 
**info)
-{
-       prs_struct qbuf, rbuf;
-       LSA_Q_QUERY_DOM_INFO_POLICY q;
-       LSA_R_QUERY_DOM_INFO_POLICY r;
-       NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
-
-       ZERO_STRUCT(q);
-       ZERO_STRUCT(r);
-
-       /* Marshall data and send request */
-
-       init_q_query_dom_info(&q, pol, info_class);
-
-       CLI_DO_RPC( cli, mem_ctx, PI_LSARPC, LSA_QUERYDOMINFOPOL,
-               q, r,
-               qbuf, rbuf,
-               lsa_io_q_query_dom_info,
-               lsa_io_r_query_dom_info,
-               NT_STATUS_UNSUCCESSFUL);
-
-       result = r.status;
-
-       if (!NT_STATUS_IS_OK(result)) {
-               goto done;
-       }
-
-       *info = r.info;
-
-done:
-       return result;
-}
-
diff --git a/source/rpc_parse/parse_lsa.c b/source/rpc_parse/parse_lsa.c
index 59fce4a..4b087b7 100644
--- a/source/rpc_parse/parse_lsa.c
+++ b/source/rpc_parse/parse_lsa.c
@@ -3411,76 +3411,6 @@ bool lsa_io_q_open_trusted_domain(const char *desc, 
LSA_Q_OPEN_TRUSTED_DOMAIN *i
 
 
 /*******************************************************************
- Inits an LSA_Q_OPEN_TRUSTED_DOMAIN_BY_NAME structure.
-********************************************************************/
-
-void init_lsa_q_open_trusted_domain_by_name(LSA_Q_OPEN_TRUSTED_DOMAIN_BY_NAME 
*q, 
-                                           POLICY_HND *hnd, 
-                                           const char *name, 
-                                           uint32 desired_access)
-{
-       memcpy(&q->pol, hnd, sizeof(q->pol));
-
-       init_lsa_string(&q->name, name);
-       q->access_mask = desired_access;
-}
-
-/*******************************************************************
-********************************************************************/
-
-
-/*******************************************************************
- Reads or writes an LSA_Q_OPEN_TRUSTED_DOMAIN_BY_NAME structure.
-********************************************************************/
-
-bool lsa_io_q_open_trusted_domain_by_name(const char *desc, 
LSA_Q_OPEN_TRUSTED_DOMAIN_BY_NAME *q_o, prs_struct *ps, int depth)
-{
-       prs_debug(ps, depth, desc, "lsa_io_q_open_trusted_domain_by_name");
-       depth++;
-
-       if(!prs_align(ps))
-               return False;
- 
-       if(!smb_io_pol_hnd("pol", &q_o->pol, ps, depth))
-               return False;
-
-       if(!prs_align(ps))
-               return False;
-
-       if(!smb_io_lsa_string("name", &q_o->name, ps, depth))
-               return False;
-
-       if(!prs_align(ps))
-               return False;
-
-       if(!prs_uint32("access", ps, depth, &q_o->access_mask))
-               return False;
-
-       return True;
-}
-
-/*******************************************************************
- Reads or writes an LSA_R_OPEN_TRUSTED_DOMAIN_BY_NAME structure.
-********************************************************************/
-
-bool lsa_io_r_open_trusted_domain_by_name(const char *desc, 
LSA_R_OPEN_TRUSTED_DOMAIN_BY_NAME *out, prs_struct *ps, int depth)
-{
-       prs_debug(ps, depth, desc, "lsa_io_r_open_trusted_domain_by_name");
-       depth++;
-
-       if(!prs_align(ps))
-               return False;
-
-       if (!smb_io_pol_hnd("handle", &out->handle, ps, depth))
-               return False;
-
-       if(!prs_ntstatus("status", ps, depth, &out->status))
-               return False;
-
-       return True;
-}
-
-/*******************************************************************
 ********************************************************************/
 
 bool lsa_io_q_open_trusted_domain(const char *desc, LSA_Q_OPEN_TRUSTED_DOMAIN 
*q_o, prs_struct *ps, int depth)
@@ -3720,36 +3650,6 @@ void 
init_q_query_trusted_domain_info(LSA_Q_QUERY_TRUSTED_DOMAIN_INFO *q,
 }
 
 /*******************************************************************
- Inits an LSA_Q_QUERY_TRUSTED_DOMAIN_INFO_BY_NAME structure.
-********************************************************************/
-
-void 
init_q_query_trusted_domain_info_by_name(LSA_Q_QUERY_TRUSTED_DOMAIN_INFO_BY_NAME
 *q, 
-                                             POLICY_HND *hnd, uint16 
info_class, 
-                                             const char *dom_name)
-{
-       DEBUG(5, ("init_q_query_trusted_domain_info_by_name\n"));
-       
-       q->pol = *hnd;
-       init_lsa_string(&q->domain_name, dom_name );
-       q->info_class = info_class;
-}
-
-/*******************************************************************
- Inits an LSA_Q_QUERY_TRUSTED_DOMAIN_INFO_BY_SID structure.
-********************************************************************/
-
-void 
init_q_query_trusted_domain_info_by_sid(LSA_Q_QUERY_TRUSTED_DOMAIN_INFO_BY_SID 
*q, 
-                                            POLICY_HND *hnd, uint16 
info_class, 
-                                            DOM_SID *dom_sid)
-{
-       DEBUG(5, ("init_q_query_trusted_domain_info_by_sid\n"));
-       
-       q->pol = *hnd;
-       init_dom_sid2(&q->dom_sid, dom_sid);
-       q->info_class = info_class;
-}
-
-/*******************************************************************
  Reads or writes an LSA_Q_QUERY_TRUSTED_DOMAIN_INFO structure.
 ********************************************************************/
 
@@ -3774,64 +3674,6 @@ bool lsa_io_q_query_trusted_domain_info(const char *desc,
 
 
 /*******************************************************************
- Reads or writes an LSA_Q_QUERY_TRUSTED_DOMAIN_INFO_BY_SID structure.
-********************************************************************/
-
-bool lsa_io_q_query_trusted_domain_info_by_sid(const char *desc, 
-                                              
LSA_Q_QUERY_TRUSTED_DOMAIN_INFO_BY_SID *q_q,
-                                              prs_struct *ps, int depth)
-{
-       prs_debug(ps, depth, desc, "lsa_io_q_query_trusted_domain_info_by_sid");
-       depth++;
-
-       if(!prs_align(ps))
-               return False;
-
-       if(!smb_io_pol_hnd("pol", &q_q->pol, ps, depth))
-               return False;
-
-       if(!prs_align(ps))
-               return False;
-
-       if(!smb_io_dom_sid2("dom_sid", &q_q->dom_sid, ps, depth))
-               return False;
-
-       if(!prs_uint16("info_class", ps, depth, &q_q->info_class))
-               return False;
-
-       return True;
-}
-
-/*******************************************************************
- Reads or writes an LSA_Q_QUERY_TRUSTED_DOMAIN_INFO_BY_NAME structure.
-********************************************************************/
-
-bool lsa_io_q_query_trusted_domain_info_by_name(const char *desc, 
-                                               
LSA_Q_QUERY_TRUSTED_DOMAIN_INFO_BY_NAME *q_q,
-                                               prs_struct *ps, int depth)
-{
-       prs_debug(ps, depth, desc, 
"lsa_io_q_query_trusted_domain_info_by_name");
-       depth++;
-
-       if(!prs_align(ps))
-               return False;
-
-       if(!smb_io_pol_hnd("pol", &q_q->pol, ps, depth))
-               return False;
-
-       if(!prs_align(ps))
-               return False;
-
-       if(!smb_io_lsa_string("domain_name", &q_q->domain_name, ps, depth))
-               return False;
-
-       if(!prs_uint16("info_class", ps, depth, &q_q->info_class))
-               return False;
-
-       return True;
-}
-
-/*******************************************************************
 ********************************************************************/
 
 static bool smb_io_lsa_data_buf_hdr(const char *desc, LSA_DATA_BUF_HDR 
*buf_hdr, 
diff --git a/source/rpcclient/cmd_lsarpc.c b/source/rpcclient/cmd_lsarpc.c
index d54f672..7743269 100644
--- a/source/rpcclient/cmd_lsarpc.c
+++ b/source/rpcclient/cmd_lsarpc.c
@@ -893,25 +893,15 @@ static NTSTATUS cmd_lsa_query_secobj(struct 
rpc_pipe_client *cli,
        return result;
 }
 
-static void display_trust_dom_info_1(TRUSTED_DOMAIN_INFO_NAME *n)
-{
-       printf("NetBIOS Name:\t%s\n", 
unistr2_static(&n->netbios_name.unistring));
-}
-
-static void display_trust_dom_info_3(TRUSTED_DOMAIN_INFO_POSIX_OFFSET *p)
-{
-       printf("Posix Offset:\t%08x (%d)\n", p->posix_offset, p->posix_offset);
-}
-
-static void display_trust_dom_info_4(TRUSTED_DOMAIN_INFO_PASSWORD *p, const 
char *password)
+static void display_trust_dom_info_4(struct lsa_TrustDomainInfoPassword *p, 
const char *password)
 {
        char *pwd, *pwd_old;
        
-       DATA_BLOB data     = data_blob(NULL, p->password.length);
-       DATA_BLOB data_old = data_blob(NULL, p->old_password.length);
+       DATA_BLOB data     = data_blob(NULL, p->password->length);
+       DATA_BLOB data_old = data_blob(NULL, p->old_password->length);


-- 
Samba Shared Repository

Reply via email to