mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
Remove unused marshalling for NET_GETANYDCNAME and NET_GETANYDCNAME.
Guenther (This used to be commit a495e0e7c1eb91dd700a7d0fe9832fd0811cb2bb)
This commit is contained in:
parent
bca0ef0ed7
commit
f79051fe19
@ -398,40 +398,6 @@ typedef struct net_r_logon_ctrl2_info {
|
||||
NTSTATUS status; /* return code */
|
||||
} NET_R_LOGON_CTRL2;
|
||||
|
||||
/* NET_Q_GETANYDCNAME - Ask a DC for a trusted DC name */
|
||||
|
||||
typedef struct net_q_getanydcname {
|
||||
uint32 ptr_logon_server;
|
||||
UNISTR2 uni_logon_server;
|
||||
uint32 ptr_domainname;
|
||||
UNISTR2 uni_domainname;
|
||||
} NET_Q_GETANYDCNAME;
|
||||
|
||||
/* NET_R_GETANYDCNAME - Ask a DC for a trusted DC name */
|
||||
|
||||
typedef struct net_r_getanydcname {
|
||||
uint32 ptr_dcname;
|
||||
UNISTR2 uni_dcname;
|
||||
WERROR status;
|
||||
} NET_R_GETANYDCNAME;
|
||||
|
||||
|
||||
/* NET_Q_GETDCNAME - Ask a DC for a trusted DC name */
|
||||
|
||||
typedef struct net_q_getdcname {
|
||||
UNISTR2 uni_logon_server;
|
||||
uint32 ptr_domainname;
|
||||
UNISTR2 uni_domainname;
|
||||
} NET_Q_GETDCNAME;
|
||||
|
||||
/* NET_R_GETDCNAME - Ask a DC for a trusted DC name */
|
||||
|
||||
typedef struct net_r_getdcname {
|
||||
uint32 ptr_dcname;
|
||||
UNISTR2 uni_dcname;
|
||||
WERROR status;
|
||||
} NET_R_GETDCNAME;
|
||||
|
||||
/* NET_Q_TRUST_DOM_LIST - LSA Query Trusted Domains */
|
||||
typedef struct net_q_trust_dom_info {
|
||||
uint32 ptr; /* undocumented buffer pointer */
|
||||
|
@ -379,84 +379,6 @@ NTSTATUS rpccli_netlogon_logon_ctrl2(struct rpc_pipe_client *cli, TALLOC_CTX *me
|
||||
return result;
|
||||
}
|
||||
|
||||
/* GetAnyDCName */
|
||||
|
||||
WERROR rpccli_netlogon_getanydcname(struct rpc_pipe_client *cli,
|
||||
TALLOC_CTX *mem_ctx, const char *mydcname,
|
||||
const char *domainname, char **newdcname)
|
||||
{
|
||||
prs_struct qbuf, rbuf;
|
||||
NET_Q_GETANYDCNAME q;
|
||||
NET_R_GETANYDCNAME r;
|
||||
WERROR result;
|
||||
fstring mydcname_slash;
|
||||
|
||||
ZERO_STRUCT(q);
|
||||
ZERO_STRUCT(r);
|
||||
|
||||
/* Initialise input parameters */
|
||||
|
||||
slprintf(mydcname_slash, sizeof(fstring)-1, "\\\\%s", mydcname);
|
||||
init_net_q_getanydcname(&q, mydcname_slash, domainname);
|
||||
|
||||
/* Marshall data and send request */
|
||||
|
||||
CLI_DO_RPC_WERR(cli, mem_ctx, PI_NETLOGON, NET_GETANYDCNAME,
|
||||
q, r,
|
||||
qbuf, rbuf,
|
||||
net_io_q_getanydcname,
|
||||
net_io_r_getanydcname,
|
||||
WERR_GENERAL_FAILURE);
|
||||
|
||||
result = r.status;
|
||||
|
||||
if (W_ERROR_IS_OK(result) && newdcname) {
|
||||
*newdcname = rpcstr_pull_unistr2_talloc(mem_ctx, &r.uni_dcname);
|
||||
W_ERROR_HAVE_NO_MEMORY(*newdcname);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/* GetDCName */
|
||||
|
||||
WERROR rpccli_netlogon_getdcname(struct rpc_pipe_client *cli,
|
||||
TALLOC_CTX *mem_ctx, const char *mydcname,
|
||||
const char *domainname, char **newdcname)
|
||||
{
|
||||
prs_struct qbuf, rbuf;
|
||||
NET_Q_GETDCNAME q;
|
||||
NET_R_GETDCNAME r;
|
||||
WERROR result;
|
||||
fstring mydcname_slash;
|
||||
|
||||
ZERO_STRUCT(q);
|
||||
ZERO_STRUCT(r);
|
||||
|
||||
/* Initialise input parameters */
|
||||
|
||||
slprintf(mydcname_slash, sizeof(fstring)-1, "\\\\%s", mydcname);
|
||||
init_net_q_getdcname(&q, mydcname_slash, domainname);
|
||||
|
||||
/* Marshall data and send request */
|
||||
|
||||
CLI_DO_RPC_WERR(cli, mem_ctx, PI_NETLOGON, NET_GETDCNAME,
|
||||
q, r,
|
||||
qbuf, rbuf,
|
||||
net_io_q_getdcname,
|
||||
net_io_r_getdcname,
|
||||
WERR_GENERAL_FAILURE);
|
||||
|
||||
result = r.status;
|
||||
|
||||
if (W_ERROR_IS_OK(result) && newdcname) {
|
||||
*newdcname = rpcstr_pull_unistr2_talloc(mem_ctx, &r.uni_dcname);
|
||||
W_ERROR_HAVE_NO_MEMORY(*newdcname);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static WERROR pull_domain_controller_info_from_getdcname_reply(TALLOC_CTX *mem_ctx,
|
||||
struct DS_DOMAIN_CONTROLLER_INFO **info_out,
|
||||
NET_R_DSR_GETDCNAME *r)
|
||||
|
@ -478,177 +478,6 @@ bool net_io_r_logon_ctrl(const char *desc, NET_R_LOGON_CTRL *r_l, prs_struct *ps
|
||||
return True;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
Inits an NET_R_GETANYDCNAME structure.
|
||||
********************************************************************/
|
||||
void init_net_q_getanydcname(NET_Q_GETANYDCNAME *r_t, const char *logon_server,
|
||||
const char *domainname)
|
||||
{
|
||||
DEBUG(5,("init_q_getanydcname\n"));
|
||||
|
||||
r_t->ptr_logon_server = (logon_server != NULL);
|
||||
init_unistr2(&r_t->uni_logon_server, logon_server, UNI_STR_TERMINATE);
|
||||
r_t->ptr_domainname = (domainname != NULL);
|
||||
init_unistr2(&r_t->uni_domainname, domainname, UNI_STR_TERMINATE);
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
Reads or writes an NET_Q_GETANYDCNAME structure.
|
||||
********************************************************************/
|
||||
|
||||
bool net_io_q_getanydcname(const char *desc, NET_Q_GETANYDCNAME *r_t, prs_struct *ps,
|
||||
int depth)
|
||||
{
|
||||
if (r_t == NULL)
|
||||
return False;
|
||||
|
||||
prs_debug(ps, depth, desc, "net_io_q_getanydcname");
|
||||
depth++;
|
||||
|
||||
if (!prs_uint32("ptr_logon_server", ps, depth, &r_t->ptr_logon_server))
|
||||
return False;
|
||||
|
||||
if (!smb_io_unistr2("logon_server", &r_t->uni_logon_server,
|
||||
r_t->ptr_logon_server, ps, depth))
|
||||
return False;
|
||||
|
||||
if (!prs_align(ps))
|
||||
return False;
|
||||
|
||||
if (!prs_uint32("ptr_domainname", ps, depth, &r_t->ptr_domainname))
|
||||
return False;
|
||||
|
||||
if (!smb_io_unistr2("domainname", &r_t->uni_domainname,
|
||||
r_t->ptr_domainname, ps, depth))
|
||||
return False;
|
||||
|
||||
return True;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
Inits an NET_R_GETANYDCNAME structure.
|
||||
********************************************************************/
|
||||
void init_net_r_getanydcname(NET_R_GETANYDCNAME *r_t, const char *dcname)
|
||||
{
|
||||
DEBUG(5,("init_r_getanydcname\n"));
|
||||
|
||||
init_unistr2(&r_t->uni_dcname, dcname, UNI_STR_TERMINATE);
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
Reads or writes an NET_R_GETANYDCNAME structure.
|
||||
********************************************************************/
|
||||
|
||||
bool net_io_r_getanydcname(const char *desc, NET_R_GETANYDCNAME *r_t, prs_struct *ps,
|
||||
int depth)
|
||||
{
|
||||
if (r_t == NULL)
|
||||
return False;
|
||||
|
||||
prs_debug(ps, depth, desc, "net_io_r_getanydcname");
|
||||
depth++;
|
||||
|
||||
if (!prs_uint32("ptr_dcname", ps, depth, &r_t->ptr_dcname))
|
||||
return False;
|
||||
|
||||
if (!smb_io_unistr2("dcname", &r_t->uni_dcname,
|
||||
r_t->ptr_dcname, ps, depth))
|
||||
return False;
|
||||
|
||||
if (!prs_align(ps))
|
||||
return False;
|
||||
|
||||
if (!prs_werror("status", ps, depth, &r_t->status))
|
||||
return False;
|
||||
|
||||
return True;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
Inits an NET_R_GETDCNAME structure.
|
||||
********************************************************************/
|
||||
void init_net_q_getdcname(NET_Q_GETDCNAME *r_t, const char *logon_server,
|
||||
const char *domainname)
|
||||
{
|
||||
DEBUG(5,("init_q_getdcname\n"));
|
||||
|
||||
init_unistr2(&r_t->uni_logon_server, logon_server, UNI_STR_TERMINATE);
|
||||
r_t->ptr_domainname = (domainname != NULL);
|
||||
init_unistr2(&r_t->uni_domainname, domainname, UNI_STR_TERMINATE);
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
Reads or writes an NET_Q_GETDCNAME structure.
|
||||
********************************************************************/
|
||||
|
||||
bool net_io_q_getdcname(const char *desc, NET_Q_GETDCNAME *r_t, prs_struct *ps,
|
||||
int depth)
|
||||
{
|
||||
if (r_t == NULL)
|
||||
return False;
|
||||
|
||||
prs_debug(ps, depth, desc, "net_io_q_getdcname");
|
||||
depth++;
|
||||
|
||||
if (!smb_io_unistr2("logon_server", &r_t->uni_logon_server,
|
||||
1, ps, depth))
|
||||
return False;
|
||||
|
||||
if (!prs_align(ps))
|
||||
return False;
|
||||
|
||||
if (!prs_uint32("ptr_domainname", ps, depth, &r_t->ptr_domainname))
|
||||
return False;
|
||||
|
||||
if (!smb_io_unistr2("domainname", &r_t->uni_domainname,
|
||||
r_t->ptr_domainname, ps, depth))
|
||||
return False;
|
||||
|
||||
return True;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
Inits an NET_R_GETDCNAME structure.
|
||||
********************************************************************/
|
||||
void init_net_r_getdcname(NET_R_GETDCNAME *r_t, const char *dcname)
|
||||
{
|
||||
DEBUG(5,("init_r_getdcname\n"));
|
||||
|
||||
init_unistr2(&r_t->uni_dcname, dcname, UNI_STR_TERMINATE);
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
Reads or writes an NET_R_GETDCNAME structure.
|
||||
********************************************************************/
|
||||
|
||||
bool net_io_r_getdcname(const char *desc, NET_R_GETDCNAME *r_t, prs_struct *ps,
|
||||
int depth)
|
||||
{
|
||||
if (r_t == NULL)
|
||||
return False;
|
||||
|
||||
prs_debug(ps, depth, desc, "net_io_r_getdcname");
|
||||
depth++;
|
||||
|
||||
if (!prs_uint32("ptr_dcname", ps, depth, &r_t->ptr_dcname))
|
||||
return False;
|
||||
|
||||
if (!smb_io_unistr2("dcname", &r_t->uni_dcname,
|
||||
r_t->ptr_dcname, ps, depth))
|
||||
return False;
|
||||
|
||||
if (!prs_align(ps))
|
||||
return False;
|
||||
|
||||
if (!prs_werror("status", ps, depth, &r_t->status))
|
||||
return False;
|
||||
|
||||
return True;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
Inits an NET_R_TRUST_DOM_LIST structure.
|
||||
********************************************************************/
|
||||
|
Loading…
x
Reference in New Issue
Block a user