[SCM] Samba Shared Repository - branch v3-2-test updated -
initial-v3-2-test-1757-gf34c0e7
Günther Deschner
gd at samba.org
Fri Feb 1 11:36:04 GMT 2008
The branch, v3-2-test has been updated
via f34c0e7ada8ce625ee20e3d776e41dabbad71ce5 (commit)
via da90eb7653554d242da83ed98adae35ced3a2938 (commit)
via c00d629d4e557e5efd7c339904e228ca76504e7a (commit)
via f66facc0f82e3d4c470d584d8ab0494fcb4ff5a2 (commit)
via 9660a341b6b32609b28770130e974d674ab31215 (commit)
via d019fc69a986937880121c2587d3fe37f995edae (commit)
via ebf9caa004899281d0fb44cac2e2494d322810bd (commit)
via e4e9d72724d547e1405b2ed4cec509d50ec88c8d (commit)
from 905b3898e0ac7a1f9cca4575246df419b0a1c7f1 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit f34c0e7ada8ce625ee20e3d776e41dabbad71ce5
Author: Günther Deschner <gd at samba.org>
Date: Fri Feb 1 12:03:00 2008 +0100
Remove unused marshalling for SAMR_OPEN_USER.
Guenther
commit da90eb7653554d242da83ed98adae35ced3a2938
Author: Günther Deschner <gd at samba.org>
Date: Fri Feb 1 11:57:53 2008 +0100
Use rpccli_samr_OpenUser() all over the place.
Guenther
commit c00d629d4e557e5efd7c339904e228ca76504e7a
Author: Günther Deschner <gd at samba.org>
Date: Fri Feb 1 11:39:49 2008 +0100
Remove unused marshalling for SAMR_OPEN_ALIAS.
Guenther
commit f66facc0f82e3d4c470d584d8ab0494fcb4ff5a2
Author: Günther Deschner <gd at samba.org>
Date: Fri Feb 1 11:38:29 2008 +0100
Use rpccli_samr_OpenAlias() in net and rpcclient.
Guenther
commit 9660a341b6b32609b28770130e974d674ab31215
Author: Günther Deschner <gd at samba.org>
Date: Fri Feb 1 12:21:15 2008 +0100
Remove unused marshalling for SAMR_OPEN_GROUP.
Guenther
commit d019fc69a986937880121c2587d3fe37f995edae
Author: Günther Deschner <gd at samba.org>
Date: Fri Feb 1 11:24:01 2008 +0100
Use rpccli_samr_OpenGroup() all over the place.
Guenther
commit ebf9caa004899281d0fb44cac2e2494d322810bd
Author: Günther Deschner <gd at samba.org>
Date: Fri Feb 1 11:14:49 2008 +0100
Remove unused marshalling for SAMR_OPEN_DOMAIN.
Guenther
commit e4e9d72724d547e1405b2ed4cec509d50ec88c8d
Author: Günther Deschner <gd at samba.org>
Date: Fri Feb 1 11:12:05 2008 +0100
Use rpccli_samr_OpenDomain() all over the place.
Guenther
-----------------------------------------------------------------------
Summary of changes:
source/include/rpc_samr.h | 84 ---------
source/libnet/libnet_join.c | 34 ++--
source/rpc_client/cli_samr.c | 159 ----------------
source/rpc_parse/parse_samr.c | 269 ---------------------------
source/rpcclient/cmd_samr.c | 332 +++++++++++++++++++++-------------
source/utils/net_domain.c | 32 +++-
source/utils/net_rpc.c | 397 ++++++++++++++++++++++++----------------
source/utils/net_rpc_join.c | 18 +-
source/utils/net_rpc_sh_acct.c | 10 +-
source/winbindd/winbindd_cm.c | 12 +-
source/winbindd/winbindd_pam.c | 9 +-
source/winbindd/winbindd_rpc.c | 22 ++-
12 files changed, 532 insertions(+), 846 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/include/rpc_samr.h b/source/include/rpc_samr.h
index 429a717..9139a62 100644
--- a/source/include/rpc_samr.h
+++ b/source/include/rpc_samr.h
@@ -684,31 +684,6 @@ typedef struct r_samr_lookup_domain_info
} SAMR_R_LOOKUP_DOMAIN;
-/****************************************************************************
-SAMR_Q_OPEN_DOMAIN - unknown_0 values seen associated with SIDs:
-
-0x0000 03f1 and a specific domain sid - S-1-5-21-44c01ca6-797e5c3d-33f83fd0
-0x0000 0200 and a specific domain sid - S-1-5-21-44c01ca6-797e5c3d-33f83fd0
-*****************************************************************************/
-
-/* SAMR_Q_OPEN_DOMAIN */
-typedef struct q_samr_open_domain_info
-{
- POLICY_HND pol; /* policy handle */
- uint32 flags; /* 0x2000 0000; 0x0000 0211; 0x0000 0280; 0x0000 0200 - flags? */
- DOM_SID2 dom_sid; /* domain SID */
-
-} SAMR_Q_OPEN_DOMAIN;
-
-
-/* SAMR_R_OPEN_DOMAIN - probably an open */
-typedef struct r_samr_open_domain_info
-{
- POLICY_HND domain_pol; /* policy handle associated with the SID */
- NTSTATUS status; /* return status */
-
-} SAMR_R_OPEN_DOMAIN;
-
#define MAX_SAM_ENTRIES_W2K 0x400
#define MAX_SAM_ENTRIES_W95 50
/* The following should be the greater of the preceeding two. */
@@ -1476,25 +1451,6 @@ typedef struct r_samr_lookup_rids_info
} SAMR_R_LOOKUP_RIDS;
-/* SAMR_Q_OPEN_USER - probably an open */
-typedef struct q_samr_open_user_info
-{
- POLICY_HND domain_pol; /* policy handle */
- uint32 access_mask; /* 32 bit unknown - 0x02011b */
- uint32 user_rid; /* user RID */
-
-} SAMR_Q_OPEN_USER;
-
-
-/* SAMR_R_OPEN_USER - probably an open */
-typedef struct r_samr_open_user_info
-{
- POLICY_HND user_pol; /* policy handle associated with unknown id */
- NTSTATUS status; /* return status */
-
-} SAMR_R_OPEN_USER;
-
-
/* SAMR_Q_CREATE_USER - probably a create */
typedef struct q_samr_create_user_info
{
@@ -1585,25 +1541,6 @@ typedef struct r_samr_add_group_mem_info
} SAMR_R_ADD_GROUPMEM;
-/* SAMR_Q_OPEN_GROUP - probably an open */
-typedef struct q_samr_open_group_info
-{
- POLICY_HND domain_pol; /* policy handle */
- uint32 access_mask; /* 0x0000 0001, 0x0000 0003, 0x0000 001f */
- uint32 rid_group; /* rid */
-
-} SAMR_Q_OPEN_GROUP;
-
-
-/* SAMR_R_OPEN_GROUP - probably an open */
-typedef struct r_samr_open_group_info
-{
- POLICY_HND pol; /* policy handle */
- NTSTATUS status; /* return status */
-
-} SAMR_R_OPEN_GROUP;
-
-
/* SAMR_Q_QUERY_ALIASMEM - query alias members */
typedef struct q_samr_query_aliasmem_info
{
@@ -1662,27 +1599,6 @@ typedef struct r_samr_del_alias_mem_info
} SAMR_R_DEL_ALIASMEM;
-
-/* SAMR_Q_OPEN_ALIAS - probably an open */
-typedef struct q_samr_open_alias_info
-{
- POLICY_HND dom_pol;
-
- uint32 access_mask;
- uint32 rid_alias;
-
-} SAMR_Q_OPEN_ALIAS;
-
-
-/* SAMR_R_OPEN_ALIAS - probably an open */
-typedef struct r_samr_open_alias_info
-{
- POLICY_HND pol; /* policy handle */
- NTSTATUS status; /* return status */
-
-} SAMR_R_OPEN_ALIAS;
-
-
/* SAMR_Q_CONNECT_ANON - probably an open */
typedef struct q_samr_connect_anon_info {
uint32 ptr; /* ptr? */
diff --git a/source/libnet/libnet_join.c b/source/libnet/libnet_join.c
index c34afc7..bbbf11a 100644
--- a/source/libnet/libnet_join.c
+++ b/source/libnet/libnet_join.c
@@ -671,10 +671,11 @@ static NTSTATUS libnet_join_joindomain_rpc(TALLOC_CTX *mem_ctx,
goto done;
}
- status = rpccli_samr_open_domain(pipe_hnd, mem_ctx, &sam_pol,
- SEC_RIGHTS_MAXIMUM_ALLOWED,
- r->out.domain_sid,
- &domain_pol);
+ status = rpccli_samr_OpenDomain(pipe_hnd, mem_ctx,
+ &sam_pol,
+ SEC_RIGHTS_MAXIMUM_ALLOWED,
+ r->out.domain_sid,
+ &domain_pol);
if (!NT_STATUS_IS_OK(status)) {
goto done;
}
@@ -723,9 +724,11 @@ static NTSTATUS libnet_join_joindomain_rpc(TALLOC_CTX *mem_ctx,
user_rid = user_rids[0];
- status = rpccli_samr_open_user(pipe_hnd, mem_ctx, &domain_pol,
- SEC_RIGHTS_MAXIMUM_ALLOWED, user_rid,
- &user_pol);
+ status = rpccli_samr_OpenUser(pipe_hnd, mem_ctx,
+ &domain_pol,
+ SEC_RIGHTS_MAXIMUM_ALLOWED,
+ user_rid,
+ &user_pol);
if (!NT_STATUS_IS_OK(status)) {
goto done;
}
@@ -840,10 +843,11 @@ static NTSTATUS libnet_join_unjoindomain_rpc(TALLOC_CTX *mem_ctx,
goto done;
}
- status = rpccli_samr_open_domain(pipe_hnd, mem_ctx, &sam_pol,
- SEC_RIGHTS_MAXIMUM_ALLOWED,
- r->in.domain_sid,
- &domain_pol);
+ status = rpccli_samr_OpenDomain(pipe_hnd, mem_ctx,
+ &sam_pol,
+ SEC_RIGHTS_MAXIMUM_ALLOWED,
+ r->in.domain_sid,
+ &domain_pol);
if (!NT_STATUS_IS_OK(status)) {
goto done;
}
@@ -867,9 +871,11 @@ static NTSTATUS libnet_join_unjoindomain_rpc(TALLOC_CTX *mem_ctx,
user_rid = user_rids[0];
- status = rpccli_samr_open_user(pipe_hnd, mem_ctx, &domain_pol,
- SEC_RIGHTS_MAXIMUM_ALLOWED,
- user_rid, &user_pol);
+ status = rpccli_samr_OpenUser(pipe_hnd, mem_ctx,
+ &domain_pol,
+ SEC_RIGHTS_MAXIMUM_ALLOWED,
+ user_rid,
+ &user_pol);
if (!NT_STATUS_IS_OK(status)) {
goto done;
}
diff --git a/source/rpc_client/cli_samr.c b/source/rpc_client/cli_samr.c
index ad1991d..c00a3c2 100644
--- a/source/rpc_client/cli_samr.c
+++ b/source/rpc_client/cli_samr.c
@@ -95,125 +95,6 @@ NTSTATUS rpccli_samr_connect4(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
return result;
}
-/* Open handle on a domain */
-
-NTSTATUS rpccli_samr_open_domain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *connect_pol, uint32 access_mask,
- const DOM_SID *domain_sid,
- POLICY_HND *domain_pol)
-{
- prs_struct qbuf, rbuf;
- SAMR_Q_OPEN_DOMAIN q;
- SAMR_R_OPEN_DOMAIN r;
- NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
-
- DEBUG(10,("cli_samr_open_domain with sid %s\n",
- sid_string_dbg(domain_sid) ));
-
- ZERO_STRUCT(q);
- ZERO_STRUCT(r);
-
- /* Marshall data and send request */
-
- init_samr_q_open_domain(&q, connect_pol, access_mask, domain_sid);
-
- CLI_DO_RPC(cli, mem_ctx, PI_SAMR, SAMR_OPEN_DOMAIN,
- q, r,
- qbuf, rbuf,
- samr_io_q_open_domain,
- samr_io_r_open_domain,
- NT_STATUS_UNSUCCESSFUL);
-
- /* Return output parameters */
-
- if (NT_STATUS_IS_OK(result = r.status)) {
- *domain_pol = r.domain_pol;
-#ifdef __INSURE__
- domain_pol->marker = malloc(1);
-#endif
- }
-
- return result;
-}
-
-NTSTATUS rpccli_samr_open_user(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx,
- POLICY_HND *domain_pol, uint32 access_mask,
- uint32 user_rid, POLICY_HND *user_pol)
-{
- prs_struct qbuf, rbuf;
- SAMR_Q_OPEN_USER q;
- SAMR_R_OPEN_USER r;
- NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
-
- DEBUG(10,("cli_samr_open_user with rid 0x%x\n", user_rid ));
-
- ZERO_STRUCT(q);
- ZERO_STRUCT(r);
-
- /* Marshall data and send request */
-
- init_samr_q_open_user(&q, domain_pol, access_mask, user_rid);
-
- CLI_DO_RPC(cli, mem_ctx, PI_SAMR, SAMR_OPEN_USER,
- q, r,
- qbuf, rbuf,
- samr_io_q_open_user,
- samr_io_r_open_user,
- NT_STATUS_UNSUCCESSFUL);
-
- /* Return output parameters */
-
- if (NT_STATUS_IS_OK(result = r.status)) {
- *user_pol = r.user_pol;
-#ifdef __INSURE__
- user_pol->marker = malloc(1);
-#endif
- }
-
- return result;
-}
-
-/* Open handle on a group */
-
-NTSTATUS rpccli_samr_open_group(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx,
- POLICY_HND *domain_pol, uint32 access_mask,
- uint32 group_rid, POLICY_HND *group_pol)
-{
- prs_struct qbuf, rbuf;
- SAMR_Q_OPEN_GROUP q;
- SAMR_R_OPEN_GROUP r;
- NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
-
- DEBUG(10,("cli_samr_open_group with rid 0x%x\n", group_rid ));
-
- ZERO_STRUCT(q);
- ZERO_STRUCT(r);
-
- /* Marshall data and send request */
-
- init_samr_q_open_group(&q, domain_pol, access_mask, group_rid);
-
- CLI_DO_RPC(cli, mem_ctx, PI_SAMR, SAMR_OPEN_GROUP,
- q, r,
- qbuf, rbuf,
- samr_io_q_open_group,
- samr_io_r_open_group,
- NT_STATUS_UNSUCCESSFUL);
-
- /* Return output parameters */
-
- if (NT_STATUS_IS_OK(result = r.status)) {
- *group_pol = r.pol;
-#ifdef __INSURE__
- group_pol->marker = malloc(1);
-#endif
- }
-
- return result;
-}
-
/* Create domain group */
NTSTATUS rpccli_samr_create_dom_group(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
@@ -870,46 +751,6 @@ NTSTATUS rpccli_samr_query_aliasmem(struct rpc_pipe_client *cli,
return result;
}
-/* Open handle on an alias */
-
-NTSTATUS rpccli_samr_open_alias(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx,
- POLICY_HND *domain_pol, uint32 access_mask,
- uint32 alias_rid, POLICY_HND *alias_pol)
-{
- prs_struct qbuf, rbuf;
- SAMR_Q_OPEN_ALIAS q;
- SAMR_R_OPEN_ALIAS r;
- NTSTATUS result;
-
- DEBUG(10,("cli_samr_open_alias with rid 0x%x\n", alias_rid));
-
- ZERO_STRUCT(q);
- ZERO_STRUCT(r);
-
- /* Marshall data and send request */
-
- init_samr_q_open_alias(&q, domain_pol, access_mask, alias_rid);
-
- CLI_DO_RPC(cli, mem_ctx, PI_SAMR, SAMR_OPEN_ALIAS,
- q, r,
- qbuf, rbuf,
- samr_io_q_open_alias,
- samr_io_r_open_alias,
- NT_STATUS_UNSUCCESSFUL);
-
- /* Return output parameters */
-
- if (NT_STATUS_IS_OK(result = r.status)) {
- *alias_pol = r.pol;
-#ifdef __INSURE__
- alias_pol->marker = malloc(1);
-#endif
- }
-
- return result;
-}
-
/* Create an alias */
NTSTATUS rpccli_samr_create_dom_alias(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
diff --git a/source/rpc_parse/parse_samr.c b/source/rpc_parse/parse_samr.c
index 08a552e..c067914 100644
--- a/source/rpc_parse/parse_samr.c
+++ b/source/rpc_parse/parse_samr.c
@@ -185,74 +185,6 @@ bool samr_io_r_remove_sid_foreign_domain(const char *desc, SAMR_R_REMOVE_SID_FOR
reads or writes a structure.
********************************************************************/
-void init_samr_q_open_domain(SAMR_Q_OPEN_DOMAIN * q_u,
- POLICY_HND *pol, uint32 flags,
- const DOM_SID *sid)
-{
- DEBUG(5, ("samr_init_samr_q_open_domain\n"));
-
- q_u->pol = *pol;
- q_u->flags = flags;
- init_dom_sid2(&q_u->dom_sid, sid);
-}
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-
-bool samr_io_q_open_domain(const char *desc, SAMR_Q_OPEN_DOMAIN * q_u,
- prs_struct *ps, int depth)
-{
- if (q_u == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "samr_io_q_open_domain");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!smb_io_pol_hnd("pol", &q_u->pol, ps, depth))
- return False;
-
- if(!prs_uint32("flags", ps, depth, &q_u->flags))
- return False;
-
- if(!smb_io_dom_sid2("sid", &q_u->dom_sid, ps, depth))
- return False;
-
- return True;
-}
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-
-bool samr_io_r_open_domain(const char *desc, SAMR_R_OPEN_DOMAIN * r_u,
- prs_struct *ps, int depth)
-{
- if (r_u == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "samr_io_r_open_domain");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!smb_io_pol_hnd("domain_pol", &r_u->domain_pol, ps, depth))
- return False;
-
- if(!prs_ntstatus("status", ps, depth, &r_u->status))
- return False;
-
- return True;
-}
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-
void init_samr_q_get_usrdom_pwinfo(SAMR_Q_GET_USRDOM_PWINFO * q_u,
POLICY_HND *user_pol)
{
@@ -2117,73 +2049,6 @@ bool samr_io_r_query_dispinfo(const char *desc, SAMR_R_QUERY_DISPINFO * r_u,
}
/*******************************************************************
-inits a SAMR_Q_OPEN_GROUP structure.
-********************************************************************/
-
-void init_samr_q_open_group(SAMR_Q_OPEN_GROUP * q_c,
- POLICY_HND *hnd,
- uint32 access_mask, uint32 rid)
-{
- DEBUG(5, ("init_samr_q_open_group\n"));
-
- q_c->domain_pol = *hnd;
- q_c->access_mask = access_mask;
- q_c->rid_group = rid;
-}
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-
-bool samr_io_q_open_group(const char *desc, SAMR_Q_OPEN_GROUP * q_u,
- prs_struct *ps, int depth)
-{
- if (q_u == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "samr_io_q_open_group");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!smb_io_pol_hnd("domain_pol", &q_u->domain_pol, ps, depth))
- return False;
-
- if(!prs_uint32("access_mask", ps, depth, &q_u->access_mask))
- return False;
- if(!prs_uint32("rid_group", ps, depth, &q_u->rid_group))
- return False;
-
- return True;
-}
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-
-bool samr_io_r_open_group(const char *desc, SAMR_R_OPEN_GROUP * r_u,
- prs_struct *ps, int depth)
-{
- if (r_u == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "samr_io_r_open_group");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!smb_io_pol_hnd("pol", &r_u->pol, ps, depth))
--
Samba Shared Repository
More information about the samba-cvs
mailing list