mirror of
https://github.com/samba-team/samba.git
synced 2025-01-27 14:04:05 +03:00
Use pidl for _srvsvc_NetNameValidate.
Guenther (This used to be commit 2e1df306785296979ea064006402254e318e946b)
This commit is contained in:
parent
5e6e3ccd00
commit
9beec265bc
@ -301,30 +301,9 @@ static bool api_srv_net_disk_enum(pipes_struct *p)
|
|||||||
NetValidateName (opnum 0x21)
|
NetValidateName (opnum 0x21)
|
||||||
*******************************************************************/
|
*******************************************************************/
|
||||||
|
|
||||||
static bool api_srv_net_name_validate(pipes_struct *p)
|
static bool api_srv_net_name_validate(pipes_struct *p)
|
||||||
{
|
{
|
||||||
SRV_Q_NET_NAME_VALIDATE q_u;
|
return proxy_srvsvc_call(p, NDR_SRVSVC_NETNAMEVALIDATE);
|
||||||
SRV_R_NET_NAME_VALIDATE r_u;
|
|
||||||
prs_struct *data = &p->in_data.data;
|
|
||||||
prs_struct *rdata = &p->out_data.rdata;
|
|
||||||
|
|
||||||
ZERO_STRUCT(q_u);
|
|
||||||
ZERO_STRUCT(r_u);
|
|
||||||
|
|
||||||
/* Unmarshall the net server disk enum. */
|
|
||||||
if(!srv_io_q_net_name_validate("", &q_u, data, 0)) {
|
|
||||||
DEBUG(0,("api_srv_net_name_validate: Failed to unmarshall SRV_Q_NET_NAME_VALIDATE.\n"));
|
|
||||||
return False;
|
|
||||||
}
|
|
||||||
|
|
||||||
r_u.status = _srv_net_name_validate(p, &q_u, &r_u);
|
|
||||||
|
|
||||||
if(!srv_io_r_net_name_validate("", &r_u, rdata, 0)) {
|
|
||||||
DEBUG(0,("api_srv_net_name_validate: Failed to marshall SRV_R_NET_NAME_VALIDATE.\n"));
|
|
||||||
return False;
|
|
||||||
}
|
|
||||||
|
|
||||||
return True;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*******************************************************************
|
/*******************************************************************
|
||||||
|
@ -2380,17 +2380,19 @@ WERROR _srv_net_disk_enum(pipes_struct *p, SRV_Q_NET_DISK_ENUM *q_u, SRV_R_NET_D
|
|||||||
}
|
}
|
||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
|
_srvsvc_NetNameValidate
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
|
|
||||||
WERROR _srv_net_name_validate(pipes_struct *p, SRV_Q_NET_NAME_VALIDATE *q_u, SRV_R_NET_NAME_VALIDATE *r_u)
|
WERROR _srvsvc_NetNameValidate(pipes_struct *p,
|
||||||
|
struct srvsvc_NetNameValidate *r)
|
||||||
{
|
{
|
||||||
fstring sharename;
|
switch (r->in.name_type) {
|
||||||
|
|
||||||
switch ( q_u->type ) {
|
|
||||||
case 0x9:
|
case 0x9:
|
||||||
rpcstr_pull(sharename, q_u->sharename.buffer, sizeof(sharename), q_u->sharename.uni_str_len*2, 0);
|
if (!validate_net_name(r->in.name, INVALID_SHARENAME_CHARS,
|
||||||
if ( !validate_net_name( sharename, INVALID_SHARENAME_CHARS, sizeof(sharename) ) ) {
|
strlen_m(r->in.name)))
|
||||||
DEBUG(5,("_srv_net_name_validate: Bad sharename \"%s\"\n", sharename));
|
{
|
||||||
|
DEBUG(5,("_srvsvc_NetNameValidate: Bad sharename \"%s\"\n",
|
||||||
|
r->in.name));
|
||||||
return WERR_INVALID_NAME;
|
return WERR_INVALID_NAME;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -2402,7 +2404,6 @@ WERROR _srv_net_name_validate(pipes_struct *p, SRV_Q_NET_NAME_VALIDATE *q_u, SRV
|
|||||||
return WERR_OK;
|
return WERR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
|
|
||||||
@ -2559,12 +2560,6 @@ WERROR _srvsvc_NetPathCompare(pipes_struct *p, struct srvsvc_NetPathCompare *r)
|
|||||||
return WERR_NOT_SUPPORTED;
|
return WERR_NOT_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
WERROR _srvsvc_NetNameValidate(pipes_struct *p, struct srvsvc_NetNameValidate *r)
|
|
||||||
{
|
|
||||||
p->rng_fault_state = True;
|
|
||||||
return WERR_NOT_SUPPORTED;
|
|
||||||
}
|
|
||||||
|
|
||||||
WERROR _srvsvc_NETRPRNAMECANONICALIZE(pipes_struct *p, struct srvsvc_NETRPRNAMECANONICALIZE *r)
|
WERROR _srvsvc_NETRPRNAMECANONICALIZE(pipes_struct *p, struct srvsvc_NETRPRNAMECANONICALIZE *r)
|
||||||
{
|
{
|
||||||
p->rng_fault_state = True;
|
p->rng_fault_state = True;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user