summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/librpc/idl/srvsvc.idl385
-rw-r--r--source4/rpc_server/srvsvc/dcesrv_srvsvc.c410
-rw-r--r--source4/torture/rpc/srvsvc.c9
3 files changed, 372 insertions, 432 deletions
diff --git a/source4/librpc/idl/srvsvc.idl b/source4/librpc/idl/srvsvc.idl
index e13c7160f8..d573e54721 100644
--- a/source4/librpc/idl/srvsvc.idl
+++ b/source4/librpc/idl/srvsvc.idl
@@ -182,7 +182,7 @@
uint32 num_users;
uint32 conn_time;
[string,charset(UTF16)] uint16 *user;
- [string,charset(UTF16)] uint16 *client;
+ [string,charset(UTF16)] uint16 *share;
} srvsvc_NetConnInfo1;
typedef struct {
@@ -467,18 +467,48 @@
} srvsvc_NetShareInfo1004;
typedef struct {
+ uint32 count;
+ [size_is(count)] srvsvc_NetShareInfo1004 *array;
+ } srvsvc_NetShareCtr1004;
+
+ typedef struct {
uint32 dfs_flags;
} srvsvc_NetShareInfo1005;
typedef struct {
+ uint32 count;
+ [size_is(count)] srvsvc_NetShareInfo1005 *array;
+ } srvsvc_NetShareCtr1005;
+
+ typedef struct {
int32 max_users;
} srvsvc_NetShareInfo1006;
typedef struct {
+ uint32 count;
+ [size_is(count)] srvsvc_NetShareInfo1006 *array;
+ } srvsvc_NetShareCtr1006;
+
+ typedef struct {
+ uint32 flags;
+ [string,charset(UTF16)] uint16 *alternate_directory_name;
+ } srvsvc_NetShareInfo1007;
+
+ typedef struct {
+ uint32 count;
+ [size_is(count)] srvsvc_NetShareInfo1007 *array;
+ } srvsvc_NetShareCtr1007;
+
+ typedef struct {
uint32 reserved;
[subcontext(4)] security_descriptor *sd;
} srvsvc_NetShareInfo1501;
+ typedef struct {
+ uint32 count;
+ [size_is(count)] srvsvc_NetShareInfo1501 *array;
+ } srvsvc_NetShareCtr1501;
+
typedef union {
[case(0)] srvsvc_NetShareInfo0 *info0;
[case(1)] srvsvc_NetShareInfo1 *info1;
@@ -488,6 +518,7 @@
[case(1004)] srvsvc_NetShareInfo1004 *info1004;
[case(1005)] srvsvc_NetShareInfo1005 *info1005;
[case(1006)] srvsvc_NetShareInfo1006 *info1006;
+ [case(1007)] srvsvc_NetShareInfo1007 *info1007;
[case(1501)] srvsvc_NetShareInfo1501 *info1501;
[default] ;
} srvsvc_NetShareInfo;
@@ -498,6 +529,11 @@
[case(2)] srvsvc_NetShareCtr2 *ctr2;
[case(501)] srvsvc_NetShareCtr501 *ctr501;
[case(502)] srvsvc_NetShareCtr502 *ctr502;
+ [case(1004)] srvsvc_NetShareCtr1004 *ctr1004;
+ [case(1005)] srvsvc_NetShareCtr1005 *ctr1005;
+ [case(1006)] srvsvc_NetShareCtr1006 *ctr1006;
+ [case(1007)] srvsvc_NetShareCtr1007 *ctr1007;
+ [case(1501)] srvsvc_NetShareCtr1501 *ctr1501;
[default] ;
} srvsvc_NetShareCtr;
@@ -629,7 +665,7 @@
uint32 numbigbufs;
uint32 numfiletasks;
uint32 alertsched;
- uint32 eroralert;
+ uint32 erroralert;
uint32 logonalert;
uint32 accessalert;
uint32 diskalert;
@@ -741,211 +777,265 @@
} srvsvc_NetSrvInfo503;
typedef struct{
- uint32 dummy;
+ uint32 sessopen;
+ uint32 sesssvc;
+ uint32 opensearch;
+ uint32 sizereqbufs;
+ uint32 initworkitems;
+ uint32 maxworkitems;
+ uint32 rawworkitems;
+ uint32 irpstacksize;
+ uint32 maxrawbuflen;
+ uint32 sessusers;
+ uint32 sessconns;
+ uint32 maxpagedmemoryusage;
+ uint32 maxnonpagedmemoryusage;
+ uint32 enablesoftcompat;
+ uint32 enableforcedlogoff;
+ uint32 timesource;
+ uint32 acceptdownlevelapis;
+ uint32 lmannounce;
+ [string,charset(UTF16)] uint16 *domain;
+ uint32 maxcopyreadlen;
+ uint32 maxcopywritelen;
+ uint32 minkeepsearch;
+ uint32 minkeepcomplsearch;
+ uint32 maxkeepcomplsearch;
+ uint32 threadcountadd;
+ uint32 numlockthreads;
+ uint32 scavtimeout;
+ uint32 minrcvqueue;
+ uint32 minfreeworkitems;
+ uint32 xactmemsize;
+ uint32 threadpriority;
+ uint32 maxmpxct;
+ uint32 oplockbreakwait;
+ uint32 oplockbreakresponsewait;
+ uint32 enableoplocks;
+ uint32 enableoplockforceclose;
+ uint32 enablefcbopens;
+ uint32 enableraw;
+ uint32 enablesharednetdrives;
+ uint32 minfreeconnections;
+ uint32 maxfreeconnections;
+ uint32 initsesstable;
+ uint32 initconntable;
+ uint32 initfiletable;
+ uint32 initsearchtable;
+ uint32 alertsched;
+ uint32 errortreshold;
+ uint32 networkerrortreshold;
+ uint32 diskspacetreshold;
+ uint32 reserved;
+ uint32 maxlinkdelay;
+ uint32 minlinkthroughput;
+ uint32 linkinfovalidtime;
+ uint32 scavqosinfoupdatetime;
+ uint32 maxworkitemidletime;
} srvsvc_NetSrvInfo599;
typedef struct{
- uint32 dummy;
+ [string,charset(UTF16)] uint16 *comment;
} srvsvc_NetSrvInfo1005;
typedef struct{
- uint32 dummy;
+ uint32 disc;
} srvsvc_NetSrvInfo1010;
typedef struct{
- uint32 dummy;
+ uint32 hidden;
} srvsvc_NetSrvInfo1016;
typedef struct{
- uint32 dummy;
+ uint32 announce;
} srvsvc_NetSrvInfo1017;
typedef struct{
- uint32 dummy;
+ uint32 anndelta;
} srvsvc_NetSrvInfo1018;
typedef struct{
- uint32 dummy;
+ uint32 users;
} srvsvc_NetSrvInfo1107;
typedef struct{
- uint32 dummy;
+ uint32 sessopens;
} srvsvc_NetSrvInfo1501;
typedef struct{
- uint32 dummy;
+ uint32 sessvcs;
} srvsvc_NetSrvInfo1502;
typedef struct{
- uint32 dummy;
+ uint32 opensearch;
} srvsvc_NetSrvInfo1503;
typedef struct{
- uint32 dummy;
+ uint32 maxworkitems;
} srvsvc_NetSrvInfo1506;
typedef struct{
- uint32 dummy;
+ uint32 maxrawbuflen;
} srvsvc_NetSrvInfo1509;
typedef struct{
- uint32 dummy;
+ uint32 sessusers;
} srvsvc_NetSrvInfo1510;
typedef struct{
- uint32 dummy;
+ uint32 sesscons;
} srvsvc_NetSrvInfo1511;
typedef struct{
- uint32 dummy;
+ uint32 maxnonpagedmemoryusage;
} srvsvc_NetSrvInfo1512;
typedef struct{
- uint32 dummy;
+ uint32 maxpagedmemoryusage;
} srvsvc_NetSrvInfo1513;
typedef struct{
- uint32 dummy;
+ uint32 enablesoftcompat;
} srvsvc_NetSrvInfo1514;
typedef struct{
- uint32 dummy;
+ uint32 enableforcedlogoff;
} srvsvc_NetSrvInfo1515;
typedef struct{
- uint32 dummy;
+ uint32 timesource;
} srvsvc_NetSrvInfo1516;
typedef struct{
- uint32 dummy;
+ uint32 lmannounce;
} srvsvc_NetSrvInfo1518;
typedef struct{
- uint32 dummy;
+ uint32 maxcopyreadlen;
} srvsvc_NetSrvInfo1520;
typedef struct{
- uint32 dummy;
+ uint32 maxcopywritelen;
} srvsvc_NetSrvInfo1521;
typedef struct{
- uint32 dummy;
+ uint32 minkeepsearch;
} srvsvc_NetSrvInfo1522;
typedef struct{
- uint32 dummy;
+ uint32 maxkeepsearch;
} srvsvc_NetSrvInfo1523;
typedef struct{
- uint32 dummy;
+ uint32 minkeepcomplsearch;
} srvsvc_NetSrvInfo1524;
typedef struct{
- uint32 dummy;
+ uint32 maxkeepcomplsearch;
} srvsvc_NetSrvInfo1525;
typedef struct{
- uint32 dummy;
+ uint32 scavtimeout;
} srvsvc_NetSrvInfo1528;
typedef struct{
- uint32 dummy;
+ uint32 minrcvqueue;
} srvsvc_NetSrvInfo1529;
typedef struct{
- uint32 dummy;
+ uint32 minfreeworkitems;
} srvsvc_NetSrvInfo1530;
typedef struct{
- uint32 dummy;
+ uint32 maxmpxct;
} srvsvc_NetSrvInfo1533;
typedef struct{
- uint32 dummy;
+ uint32 oplockbreakwait;
} srvsvc_NetSrvInfo1534;
typedef struct{
- uint32 dummy;
+ uint32 oplockbreakresponsewait;
} srvsvc_NetSrvInfo1535;
typedef struct{
- uint32 dummy;
+ uint32 enableoplocks;
} srvsvc_NetSrvInfo1536;
typedef struct{
- uint32 dummy;
+ uint32 enableoplockforceclose;
} srvsvc_NetSrvInfo1537;
typedef struct{
- uint32 dummy;
+ uint32 enablefcbopens;
} srvsvc_NetSrvInfo1538;
typedef struct{
- uint32 dummy;
+ uint32 enableraw;
} srvsvc_NetSrvInfo1539;
typedef struct{
- uint32 dummy;
+ uint32 enablesharednetdrives;
} srvsvc_NetSrvInfo1540;
typedef struct{
- uint32 dummy;
+ uint32 minfreeconnections;
} srvsvc_NetSrvInfo1541;
typedef struct{
- uint32 dummy;
+ uint32 maxfreeconnections;
} srvsvc_NetSrvInfo1542;
typedef struct{
- uint32 dummy;
+ uint32 initsesstable;
} srvsvc_NetSrvInfo1543;
typedef struct{
- uint32 dummy;
+ uint32 initconntable;
} srvsvc_NetSrvInfo1544;
typedef struct{
- uint32 dummy;
+ uint32 initfiletable;
} srvsvc_NetSrvInfo1545;
typedef struct{
- uint32 dummy;
+ uint32 initsearchtable;
} srvsvc_NetSrvInfo1546;
typedef struct{
- uint32 dummy;
+ uint32 alertsched;
} srvsvc_NetSrvInfo1547;
typedef struct{
- uint32 dummy;
+ uint32 errortreshold;
} srvsvc_NetSrvInfo1548;
typedef struct{
- uint32 dummy;
+ uint32 networkerrortreshold;
} srvsvc_NetSrvInfo1549;
typedef struct{
- uint32 dummy;
+ uint32 diskspacetreshold;
} srvsvc_NetSrvInfo1550;
typedef struct{
- uint32 dummy;
+ uint32 maxlinkdelay;
} srvsvc_NetSrvInfo1552;
typedef struct{
- uint32 dummy;
+ uint32 minlinkthroughput;
} srvsvc_NetSrvInfo1553;
typedef struct{
- uint32 dummy;
+ uint32 linkinfovalidtime;
} srvsvc_NetSrvInfo1554;
typedef struct{
- uint32 dummy;
+ uint32 scavqosinfoupdatetime;
} srvsvc_NetSrvInfo1555;
typedef struct{
- uint32 dummy;
+ uint32 maxworkitemidletime;
} srvsvc_NetSrvInfo1556;
@@ -1033,30 +1123,21 @@
/* srvsvc_NetDisk */
/**************************/
typedef struct {
- uint32 unknown;
- lstring disk;
- uint16 unknown2;
+ [string,charset(UTF16)] uint16 *disc;
} srvsvc_NetDiskInfo0;
typedef struct {
- uint32 unknown;
uint32 count;
- [size_is(count)] srvsvc_NetDiskInfo0 array[];
- } srvsvc_NetDiskCtr0;
-
- typedef union {
- [case(0)] srvsvc_NetDiskCtr0 *ctr0;
- } srvsvc_NetDiskCtr;
+ [size_is(count), length_is(count)] srvsvc_NetDiskInfo0 *discs;
+ } srvsvc_NetDiskInfo;
/******************/
/* Function: 0x17 */
WERROR srvsvc_NetDiskEnum(
[in] [string,charset(UTF16)] uint16 *server_unc,
[in] uint32 level,
- [out] uint32 count,
- [in,switch_is(level)] srvsvc_NetDiskCtr ctr,
- [out] srvsvc_NetDiskCtr0 *ctr0,
- [in] uint32 unknown,
+ [in,out] srvsvc_NetDiskInfo disks,
+ [in] uint32 maxlen,
[out] uint32 totalentries,
[in,out] uint32 *resume_handle
);
@@ -1064,27 +1145,55 @@
/**************************/
/* srvsvc_NetStatistics */
/**************************/
+ typedef struct {
+ uint32 start;
+ uint32 fopens;
+ uint32 devopens;
+ uint32 jobsqueued;
+ uint32 sopens;
+ uint32 stimeouts;
+ uint32 serrorout;
+ uint32 pwerrors;
+ uint32 permerrors;
+ uint32 syserrors;
+ uint32 bytessent_low;
+ uint32 bytessent_high;
+ uint32 bytesrcvd_low;
+ uint32 bytesrcvd_high;
+ uint32 avresponse;
+ uint32 reqbufneed;
+ uint32 bigbufneed;
+ } srvsvc_Statistics;
+
/******************/
/* Function: 0x18 */
- WERROR srvsvc_NETRSERVERSTATISTICSGET(
+ WERROR srvsvc_NetServerStatisticsGet(
+ [in] [string,charset(UTF16)] uint16 *server_unc,
+ [in] [string,charset(UTF16)] uint16 *service,
+ [in] uint32 level,
+ [in] uint32 options,
+ [out] srvsvc_Statistics stat
);
/**************************/
/* srvsvc_NetTransport */
/**************************/
typedef struct {
- uint32 count;
- uint8 addr[count];
- } srvsvc_NetTransportAddress;
-
- typedef struct {
uint32 vcs;
[string,charset(UTF16)] uint16 *name;
- srvsvc_NetTransportAddress *addr;
+ [size_is(addr_len)] uint8 *addr;
uint32 addr_len;
[string,charset(UTF16)] uint16 *net_addr;
} srvsvc_NetTransportInfo0;
+ /******************/
+ /* Function: 0x19 */
+ WERROR srvsvc_NetTransportAdd(
+ [in] [string,charset(UTF16)] uint16 *server_unc,
+ [in] uint32 level,
+ [in,switch_is(level)] srvsvc_NetTransportInfo info
+ );
+
typedef struct {
uint32 count;
[size_is(count)] srvsvc_NetTransportInfo0 *array;
@@ -1093,7 +1202,7 @@
typedef struct {
uint32 vcs;
[string,charset(UTF16)] uint16 *name;
- srvsvc_NetTransportAddress *addr;
+ [size_is(addr_len)] uint8 *addr;
uint32 addr_len;
[string,charset(UTF16)] uint16 *net_addr;
[string,charset(UTF16)] uint16 *domain;
@@ -1105,7 +1214,13 @@
} srvsvc_NetTransportCtr1;
typedef struct {
- uint32 dummy;
+ uint32 vcs;
+ [string,charset(UTF16)] uint16 *name;
+ [size_is(addr_len)] uint8 *addr;
+ uint32 addr_len;
+ [string,charset(UTF16)] uint16 *net_addr;
+ [string,charset(UTF16)] uint16 *domain;
+ uint32 unknown;
} srvsvc_NetTransportInfo2;
typedef struct {
@@ -1114,7 +1229,15 @@
} srvsvc_NetTransportCtr2;
typedef struct {
- uint32 dummy;
+ uint32 vcs;
+ [string,charset(UTF16)] uint16 *name;
+ [size_is(addr_len)] uint8 *addr;
+ uint32 addr_len;
+ [string,charset(UTF16)] uint16 *net_addr;
+ [string,charset(UTF16)] uint16 *domain;
+ uint32 unknown1;
+ uint32 unknown2;
+ uint8 unknown3[256];
} srvsvc_NetTransportInfo3;
typedef struct {
@@ -1123,14 +1246,6 @@
} srvsvc_NetTransportCtr3;
typedef union {
- [case(0)] srvsvc_NetTransportInfo0 *info0;
- [case(1)] srvsvc_NetTransportInfo1 *info1;
- [case(2)] srvsvc_NetTransportInfo2 *info2;
- [case(3)] srvsvc_NetTransportInfo3 *info3;
- [default];
- } srvsvc_NetTransportInfo;
-
- typedef union {
[case(0)] srvsvc_NetTransportCtr0 *ctr0;
[case(1)] srvsvc_NetTransportCtr1 *ctr1;
[case(2)] srvsvc_NetTransportCtr2 *ctr2;
@@ -1139,16 +1254,11 @@
} srvsvc_NetTransportCtr;
/******************/
- /* Function: 0x19 */
- WERROR srvsvc_NETRSERVERTRANSPORTADD(
- );
-
- /******************/
/* Function: 0x1a */
WERROR srvsvc_NetTransportEnum(
[in] [string,charset(UTF16)] uint16 *server_unc,
[in,out] uint32 level,
- [in,out,switch_is(level)] srvsvc_NetTransportCtr ctr,
+ [in,out,switch_is(level)] srvsvc_NetTransportCtr transports,
[in] uint32 max_buffer,
[out] uint32 totalentries,
[in,out] uint32 *resume_handle
@@ -1156,7 +1266,10 @@
/******************/
/* Function: 0x1b */
- WERROR srvsvc_NETRSERVERTRANSPORTDEL(
+ WERROR srvsvc_NetTransportDel(
+ [in] [string,charset(UTF16)] uint16 *server_unc,
+ [in] uint32 unknown,
+ [in] srvsvc_NetTransportInfo0 transport
);
/**************************/
@@ -1189,7 +1302,11 @@
/**************************/
/******************/
/* Function: 0x1d */
- WERROR srvsvc_NETRSERVERSETSERVICEBITS(
+ WERROR srvsvc_NetSetServiceBits(
+ [in] [string,charset(UTF16)] uint16 *server_unc,
+ [in] [string,charset(UTF16)] uint16 *transport,
+ [in] uint32 servicebits,
+ [in] uint32 updateimmediately
);
/**************************/
@@ -1197,17 +1314,33 @@
/**************************/
/******************/
/* Function: 0x1e */
- WERROR srvsvc_NETRPRPATHTYPE(
+ WERROR srvsvc_NetPathType(
+ [in] [string,charset(UTF16)] uint16 *server_unc,
+ [in] [string,charset(UTF16)] uint16 path[],
+ [in] uint32 pathflags,
+ [out] uint32 pathtype
);
/******************/
/* Function: 0x1f */
- WERROR srvsvc_NETRPRPATHCANONICALIZE(
+ WERROR srvsvc_NetPathCanonicalize(
+ [in] [string,charset(UTF16)] uint16 *server_unc,
+ [in] [string,charset(UTF16)] uint16 path[],
+ [out] [size_is(maxbuf)] uint8 can_path[],
+ [in] uint32 maxbuf,
+ [in] [string,charset(UTF16)] uint16 prefix[],
+ [in,out] uint32 pathtype,
+ [in] uint32 pathflags
);
/******************/
/* Function: 0x20 */
- WERROR srvsvc_NETRPRPATHCOMPARE(
+ WERROR srvsvc_NetPathCompare(
+ [in] [string,charset(UTF16)] uint16 *server_unc,
+ [in] [string,charset(UTF16)] uint16 path1[],
+ [in] [string,charset(UTF16)] uint16 path2[],
+ [in] uint32 pathtype,
+ [in] uint32 pathflags
);
/**************************/
@@ -1215,7 +1348,11 @@
/**************************/
/******************/
/* Function: 0x21 */
- WERROR srvsvc_NET_NAME_VALIDATE(
+ WERROR srvsvc_NetNameValidate(
+ [in] [string,charset(UTF16)] uint16 *server_unc,
+ [in] [string,charset(UTF16)] uint16 path[],
+ [in] uint32 pathtype,
+ [in] uint32 pathflags
);
/******************/
@@ -1225,7 +1362,12 @@
/******************/
/* Function: 0x23 */
- WERROR srvsvc_NETRPRNAMECOMPARE(
+ WERROR srvsvc_NetPRNameCompare(
+ [in] [string,charset(UTF16)] uint16 *server_unc,
+ [in] [string,charset(UTF16)] uint16 path1[],
+ [in] [string,charset(UTF16)] uint16 path2[],
+ [in] uint32 pathtype,
+ [in] uint32 pathflags
);
/**************************/
@@ -1246,32 +1388,65 @@
/******************/
/* Function: 0x25 */
- WERROR srvsvc_NETRSHAREDELSTART(
+ WERROR srvsvc_NetShareDelStart(
+ [in] [string,charset(UTF16)] uint16 *server_unc,
+ [in] [string,charset(UTF16)] uint16 share[],
+ [in] uint32 reserved,
+ [out] policy_handle *hnd
);
/******************/
/* Function: 0x26 */
- WERROR srvsvc_NETRSHAREDELCOMMIT(
+ WERROR srvsvc_NetShareDelCommit(
+ [in, out] policy_handle *hnd
);
/******************/
/* Function: 0x27 */
- WERROR srvsvc_NET_FILE_QUERY_SECDESC(
+ WERROR srvsvc_NetGetFileSecurity(
+ [in] [string,charset(UTF16)] uint16 *server_unc,
+ [in] [string,charset(UTF16)] uint16 *share,
+ [in] [string,charset(UTF16)] uint16 file[],
+ [in] uint32 securityinformation,
+ [out, subcontext(4)] security_descriptor *sd
);
/******************/
/* Function: 0x28 */
- WERROR srvsvc_NET_FILE_SET_SECDESC(
+ WERROR srvsvc_NetSetFileSecurity(
+ [in] [string,charset(UTF16)] uint16 *server_unc,
+ [in] [string,charset(UTF16)] uint16 *share,
+ [in] [string,charset(UTF16)] uint16 file[],
+ [in] uint32 securityinformation,
+ [in, subcontext(4)] security_descriptor sd
);
+
+
+ typedef [switch_type(uint32)] union {
+ [case(0)] srvsvc_NetTransportInfo0 info0;
+ [case(1)] srvsvc_NetTransportInfo1 info1;
+ [case(2)] srvsvc_NetTransportInfo2 info2;
+ [case(3)] srvsvc_NetTransportInfo3 info3;
+ } srvsvc_NetTransportInfo;
+
/******************/
/* Function: 0x29 */
- WERROR srvsvc_NETRSERVERTRANSPORTADDEX(
+ WERROR srvsvc_NetServerTransportAddEx(
+ [in] [string,charset(UTF16)] uint16 *server_unc,
+ [in] uint32 level,
+ [in,switch_is(level)] srvsvc_NetTransportInfo info
);
/******************/
/* Function: 0x2a */
- WERROR srvsvc_NETRSERVERSETSERVICEBITSEX(
+ WERROR srvsvc_NetServerSetServiceBitsEx(
+ [in] [string,charset(UTF16)] uint16 *server_unc,
+ [in] [string,charset(UTF16)] uint16 *emulated_server_unc,
+ [in] [string,charset(UTF16)] uint16 *transport,
+ [in] uint32 servicebitsofinterest,
+ [in] uint32 servicebits,
+ [in] uint32 updateimmediately
);
/******************/
diff --git a/source4/rpc_server/srvsvc/dcesrv_srvsvc.c b/source4/rpc_server/srvsvc/dcesrv_srvsvc.c
index 3362d2f4d1..997cdc81ac 100644
--- a/source4/rpc_server/srvsvc/dcesrv_srvsvc.c
+++ b/source4/rpc_server/srvsvc/dcesrv_srvsvc.c
@@ -867,16 +867,6 @@ static WERROR srvsvc_NetShareSetInfo(struct dcesrv_call_state *dce_call, TALLOC_
/*
- srvsvc_NetShareDel
-*/
-static WERROR srvsvc_NetShareDel(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct srvsvc_NetShareDel *r)
-{
- DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/*
srvsvc_NetShareDelSticky
*/
static WERROR srvsvc_NetShareDelSticky(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
@@ -981,21 +971,14 @@ static WERROR srvsvc_NetSrvSetInfo(struct dcesrv_call_state *dce_call, TALLOC_CT
static WERROR srvsvc_NetDiskEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct srvsvc_NetDiskEnum *r)
{
- r->out.count = 0;
- r->out.ctr0 = NULL;
+ r->out.disks.discs = NULL;
+ r->out.disks.count = 0;
r->out.totalentries = 0;
r->out.resume_handle = NULL;
switch (r->in.level) {
case 0:
{
- r->out.ctr0 = talloc(mem_ctx, struct srvsvc_NetDiskCtr0);
- W_ERROR_HAVE_NO_MEMORY(r->out.ctr0);
-
- r->out.ctr0->unknown = 0x1;
- r->out.ctr0->count = 0;
- r->out.ctr0->array = NULL;
-
return WERR_NOT_SUPPORTED;
}
default:
@@ -1007,20 +990,20 @@ static WERROR srvsvc_NetDiskEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX
/*
- srvsvc_NETRSERVERSTATISTICSGET
+ srvsvc_NetServerStatisticsGet
*/
-static WERROR srvsvc_NETRSERVERSTATISTICSGET(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct srvsvc_NETRSERVERSTATISTICSGET *r)
+static WERROR srvsvc_NetServerStatisticsGet(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+ struct srvsvc_NetServerStatisticsGet *r)
{
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
/*
- srvsvc_NETRSERVERTRANSPORTADD
+ srvsvc_NetTransportAdd
*/
-static WERROR srvsvc_NETRSERVERTRANSPORTADD(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct srvsvc_NETRSERVERTRANSPORTADD *r)
+static WERROR srvsvc_NetTransportAdd(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+ struct srvsvc_NetTransportAdd *r)
{
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -1039,41 +1022,41 @@ static WERROR srvsvc_NetTransportEnum(struct dcesrv_call_state *dce_call, TALLOC
switch (r->in.level) {
case 0:
{
- r->out.ctr.ctr0 = talloc(mem_ctx, struct srvsvc_NetTransportCtr0);
- W_ERROR_HAVE_NO_MEMORY(r->out.ctr.ctr0);
+ r->out.transports.ctr0 = talloc(mem_ctx, struct srvsvc_NetTransportCtr0);
+ W_ERROR_HAVE_NO_MEMORY(r->out.transports.ctr0);
- r->out.ctr.ctr0->count = 0;
- r->out.ctr.ctr0->array = NULL;
+ r->out.transports.ctr0->count = 0;
+ r->out.transports.ctr0->array = NULL;
return WERR_NOT_SUPPORTED;
}
case 1:
{
- r->out.ctr.ctr1 = talloc(mem_ctx, struct srvsvc_NetTransportCtr1);
- W_ERROR_HAVE_NO_MEMORY(r->out.ctr.ctr1);
+ r->out.transports.ctr1 = talloc(mem_ctx, struct srvsvc_NetTransportCtr1);
+ W_ERROR_HAVE_NO_MEMORY(r->out.transports.ctr1);
- r->out.ctr.ctr1->count = 0;
- r->out.ctr.ctr1->array = NULL;
+ r->out.transports.ctr1->count = 0;
+ r->out.transports.ctr1->array = NULL;
return WERR_NOT_SUPPORTED;
}
case 2:
{
- r->out.ctr.ctr2 = talloc(mem_ctx, struct srvsvc_NetTransportCtr2);
- W_ERROR_HAVE_NO_MEMORY(r->out.ctr.ctr2);
+ r->out.transports.ctr2 = talloc(mem_ctx, struct srvsvc_NetTransportCtr2);
+ W_ERROR_HAVE_NO_MEMORY(r->out.transports.ctr2);
- r->out.ctr.ctr2->count = 0;
- r->out.ctr.ctr2->array = NULL;
+ r->out.transports.ctr2->count = 0;
+ r->out.transports.ctr2->array = NULL;
return WERR_NOT_SUPPORTED;
}
case 3:
{
- r->out.ctr.ctr3 = talloc(mem_ctx, struct srvsvc_NetTransportCtr3);
- W_ERROR_HAVE_NO_MEMORY(r->out.ctr.ctr3);
+ r->out.transports.ctr3 = talloc(mem_ctx, struct srvsvc_NetTransportCtr3);
+ W_ERROR_HAVE_NO_MEMORY(r->out.transports.ctr3);
- r->out.ctr.ctr3->count = 0;
- r->out.ctr.ctr3->array = NULL;
+ r->out.transports.ctr3->count = 0;
+ r->out.transports.ctr3->array = NULL;
return WERR_NOT_SUPPORTED;
}
@@ -1084,12 +1067,11 @@ static WERROR srvsvc_NetTransportEnum(struct dcesrv_call_state *dce_call, TALLOC
return WERR_UNKNOWN_LEVEL;
}
-
/*
- srvsvc_NETRSERVERTRANSPORTDEL
+ srvsvc_NetTransportDel
*/
-static WERROR srvsvc_NETRSERVERTRANSPORTDEL(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct srvsvc_NETRSERVERTRANSPORTDEL *r)
+static WERROR srvsvc_NetTransportDel(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+ struct srvsvc_NetTransportDel *r)
{
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -1133,72 +1115,51 @@ static WERROR srvsvc_NetRemoteTOD(struct dcesrv_call_state *dce_call, TALLOC_CTX
return WERR_OK;
}
-
-/*
- srvsvc_NETRSERVERSETSERVICEBITS
-*/
-static WERROR srvsvc_NETRSERVERSETSERVICEBITS(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct srvsvc_NETRSERVERSETSERVICEBITS *r)
-{
- DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
-/*
- srvsvc_NETRPRPATHTYPE
-*/
-static WERROR srvsvc_NETRPRPATHTYPE(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct srvsvc_NETRPRPATHTYPE *r)
-{
- DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
-}
-
-
/*
- srvsvc_NETRPRPATHCANONICALIZE
+ srvsvc_NetPathType
*/
-static WERROR srvsvc_NETRPRPATHCANONICALIZE(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct srvsvc_NETRPRPATHCANONICALIZE *r)
+static WERROR srvsvc_NetPathType(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+ struct srvsvc_NetPathType *r)
{
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
/*
- srvsvc_NETRPRPATHCOMPARE
+ srvsvc_NetPathCanonicalize
*/
-static WERROR srvsvc_NETRPRPATHCOMPARE(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct srvsvc_NETRPRPATHCOMPARE *r)
+static WERROR srvsvc_NetPathCanonicalize(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+ struct srvsvc_NetPathCanonicalize *r)
{
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
/*
- srvsvc_NET_NAME_VALIDATE
+ srvsvc_NetPathCompare
*/
-static WERROR srvsvc_NET_NAME_VALIDATE(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct srvsvc_NET_NAME_VALIDATE *r)
+static WERROR srvsvc_NetPathCompare(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+ struct srvsvc_NetPathCompare *r)
{
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
/*
- srvsvc_NETRPRNAMECANONICALIZE
+ srvsvc_NetNameValidate
*/
-static WERROR srvsvc_NETRPRNAMECANONICALIZE(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct srvsvc_NETRPRNAMECANONICALIZE *r)
+static WERROR srvsvc_NetNameValidate(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+ struct srvsvc_NetNameValidate *r)
{
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
/*
- srvsvc_NETRPRNAMECOMPARE
+ srvsvc_NetPRNameCompare
*/
-static WERROR srvsvc_NETRPRNAMECOMPARE(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct srvsvc_NETRPRNAMECOMPARE *r)
+static WERROR srvsvc_NetPRNameCompare(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+ struct srvsvc_NetPRNameCompare *r)
{
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -1208,288 +1169,67 @@ static WERROR srvsvc_NETRPRNAMECOMPARE(struct dcesrv_call_state *dce_call, TALLO
srvsvc_NetShareEnum
*/
static WERROR srvsvc_NetShareEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct srvsvc_NetShareEnum *r)
+ struct srvsvc_NetShareEnum *r)
{
- struct dcesrv_context *dce_ctx = dce_call->conn->dce_ctx;
-
- r->out.level = r->in.level;
- ZERO_STRUCT(r->out.ctr);
- r->out.totalentries = 0;
- r->out.resume_handle = NULL;
-
- /* TODO: - paging of results
- * - access check
- */
-
- switch (r->in.level) {
- case 0:
- {
- int i;
- uint32_t count;
- struct srvsvc_NetShareCtr0 *ctr0;
-
- ctr0 = talloc(mem_ctx, struct srvsvc_NetShareCtr0);
- W_ERROR_HAVE_NO_MEMORY(ctr0);
-
- ctr0->count = dcesrv_common_get_count_of_shares(mem_ctx, dce_ctx);
- ctr0->array = NULL;
-
- if (ctr0->count == 0) {
- r->out.ctr.ctr0 = ctr0;
- return WERR_OK;
- }
-
- ctr0->array = talloc_array(mem_ctx, struct srvsvc_NetShareInfo0, ctr0->count);
- W_ERROR_HAVE_NO_MEMORY(ctr0->array);
-
- count = ctr0->count;
- ctr0->count = 0;
- for (i=0; i < count; i++) {
- WERROR status;
- union srvsvc_NetShareInfo info;
-
- if (!lp_browseable(i)){
- continue;
- }
-
- info.info0 = &ctr0->array[ctr0->count++];
- status = srvsvc_fiel_ShareInfo(dce_call, mem_ctx, i, r->in.level, &info);
- if (!W_ERROR_IS_OK(status)) {
- return status;
- }
- }
-
- r->out.ctr.ctr0 = ctr0;
- r->out.totalentries = r->out.ctr.ctr0->count;
- return WERR_OK;
- }
- case 1:
- {
- int i;
- uint32_t count;
- struct srvsvc_NetShareCtr1 *ctr1;
-
- ctr1 = talloc(mem_ctx, struct srvsvc_NetShareCtr1);
- W_ERROR_HAVE_NO_MEMORY(ctr1);
-
- ctr1->count = dcesrv_common_get_count_of_shares(mem_ctx, dce_ctx);
- ctr1->array = NULL;
-
- if (ctr1->count == 0) {
- r->out.ctr.ctr1 = ctr1;
- return WERR_OK;
- }
-
- ctr1->array = talloc_array(mem_ctx, struct srvsvc_NetShareInfo1, ctr1->count);
- W_ERROR_HAVE_NO_MEMORY(ctr1->array);
-
- count = ctr1->count;
- ctr1->count = 0;
- for (i=0; i < count; i++) {
- WERROR status;
- union srvsvc_NetShareInfo info;
-
- if (!lp_browseable(i)){
- continue;
- }
-
- info.info1 = &ctr1->array[ctr1->count++];
- status = srvsvc_fiel_ShareInfo(dce_call, mem_ctx, i, r->in.level, &info);
- if (!W_ERROR_IS_OK(status)) {
- return status;
- }
- }
-
- r->out.ctr.ctr1 = ctr1;
- r->out.totalentries = r->out.ctr.ctr1->count;
- return WERR_OK;
- }
- case 2:
- {
- int i;
- uint32_t count;
- struct srvsvc_NetShareCtr2 *ctr2;
-
- ctr2 = talloc(mem_ctx, struct srvsvc_NetShareCtr2);
- W_ERROR_HAVE_NO_MEMORY(ctr2);
-
- ctr2->count = dcesrv_common_get_count_of_shares(mem_ctx, dce_ctx);
- ctr2->array = NULL;
-
- if (ctr2->count == 0) {
- r->out.ctr.ctr2 = ctr2;
- return WERR_OK;
- }
-
- ctr2->array = talloc_array(mem_ctx, struct srvsvc_NetShareInfo2, ctr2->count);
- W_ERROR_HAVE_NO_MEMORY(ctr2->array);
-
- count = ctr2->count;
- ctr2->count = 0;
- for (i=0; i < count; i++) {
- WERROR status;
- union srvsvc_NetShareInfo info;
-
- if (!lp_browseable(i)){
- continue;
- }
-
- info.info2 = &ctr2->array[ctr2->count++];
- status = srvsvc_fiel_ShareInfo(dce_call, mem_ctx, i, r->in.level, &info);
- if (!W_ERROR_IS_OK(status)) {
- return status;
- }
- }
-
- r->out.ctr.ctr2 = ctr2;
- r->out.totalentries = r->out.ctr.ctr2->count;
- return WERR_OK;
- }
- case 501:
- {
- int i;
- uint32_t count;
- struct srvsvc_NetShareCtr501 *ctr501;
-
- ctr501 = talloc(mem_ctx, struct srvsvc_NetShareCtr501);
- W_ERROR_HAVE_NO_MEMORY(ctr501);
-
- ctr501->count = dcesrv_common_get_count_of_shares(mem_ctx, dce_ctx);
- ctr501->array = NULL;
-
- if (ctr501->count == 0) {
- r->out.ctr.ctr501 = ctr501;
- return WERR_OK;
- }
-
- ctr501->array = talloc_array(mem_ctx, struct srvsvc_NetShareInfo501, ctr501->count);
- W_ERROR_HAVE_NO_MEMORY(ctr501->array);
-
- count = ctr501->count;
- ctr501->count = 0;
- for (i=0; i < count; i++) {
- WERROR status;
- union srvsvc_NetShareInfo info;
-
- if (!lp_browseable(i)){
- continue;
- }
-
- info.info501 = &ctr501->array[ctr501->count++];
- status = srvsvc_fiel_ShareInfo(dce_call, mem_ctx, i, r->in.level, &info);
- if (!W_ERROR_IS_OK(status)) {
- return status;
- }
- }
-
- r->out.ctr.ctr501 = ctr501;
- r->out.totalentries = r->out.ctr.ctr501->count;
- return WERR_OK;
- }
- case 502:
- {
- int i;
- uint32_t count;
- struct srvsvc_NetShareCtr502 *ctr502;
-
- ctr502 = talloc(mem_ctx, struct srvsvc_NetShareCtr502);
- W_ERROR_HAVE_NO_MEMORY(ctr502);
-
- ctr502->count = dcesrv_common_get_count_of_shares(mem_ctx, dce_ctx);
- ctr502->array = NULL;
-
- if (ctr502->count == 0) {
- r->out.ctr.ctr502 = ctr502;
- return WERR_OK;
- }
-
- ctr502->array = talloc_array(mem_ctx, struct srvsvc_NetShareInfo502, ctr502->count);
- W_ERROR_HAVE_NO_MEMORY(ctr502->array);
-
- count = ctr502->count;
- ctr502->count = 0;
- for (i=0; i < count; i++) {
- WERROR status;
- union srvsvc_NetShareInfo info;
-
- if (!lp_browseable(i)){
- continue;
- }
-
- info.info502 = &ctr502->array[ctr502->count++];
- status = srvsvc_fiel_ShareInfo(dce_call, mem_ctx, i, r->in.level, &info);
- if (!W_ERROR_IS_OK(status)) {
- return status;
- }
- }
-
- r->out.ctr.ctr502 = ctr502;
- r->out.totalentries = r->out.ctr.ctr502->count;
- return WERR_OK;
- }
- default:
- return WERR_UNKNOWN_LEVEL;
- }
-
- return WERR_UNKNOWN_LEVEL;
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
/*
- srvsvc_NETRSHAREDELSTART
+ srvsvc_NetShareDelStart
*/
-static WERROR srvsvc_NETRSHAREDELSTART(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct srvsvc_NETRSHAREDELSTART *r)
+static WERROR srvsvc_NetShareDelStart(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+ struct srvsvc_NetShareDelStart *r)
{
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
/*
- srvsvc_NETRSHAREDELCOMMIT
+ srvsvc_NetShareDelCommit
*/
-static WERROR srvsvc_NETRSHAREDELCOMMIT(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct srvsvc_NETRSHAREDELCOMMIT *r)
+static WERROR srvsvc_NetShareDelCommit(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+ struct srvsvc_NetShareDelCommit *r)
{
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
/*
- srvsvc_NET_FILE_QUERY_SECDESC
+ srvsvc_NetGetFileSecurity
*/
-static WERROR srvsvc_NET_FILE_QUERY_SECDESC(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct srvsvc_NET_FILE_QUERY_SECDESC *r)
+static WERROR srvsvc_NetGetFileSecurity(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+ struct srvsvc_NetGetFileSecurity *r)
{
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
/*
- srvsvc_NET_FILE_SET_SECDESC
+ srvsvc_NetSetFileSecurity
*/
-static WERROR srvsvc_NET_FILE_SET_SECDESC(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct srvsvc_NET_FILE_SET_SECDESC *r)
+static WERROR srvsvc_NetSetFileSecurity(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+ struct srvsvc_NetSetFileSecurity *r)
{
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
/*
- srvsvc_NETRSERVERTRANSPORTADDEX
+ srvsvc_NetServerTransportAddEx
*/
-static WERROR srvsvc_NETRSERVERTRANSPORTADDEX(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct srvsvc_NETRSERVERTRANSPORTADDEX *r)
+static WERROR srvsvc_NetServerTransportAddEx(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+ struct srvsvc_NetServerTransportAddEx *r)
{
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
/*
- srvsvc_NETRSERVERSETSERVICEBITSEX
+ srvsvc_NetServerSetServiceBitsEx
*/
-static WERROR srvsvc_NETRSERVERSETSERVICEBITSEX(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct srvsvc_NETRSERVERSETSERVICEBITSEX *r)
+static WERROR srvsvc_NetServerSetServiceBitsEx(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+ struct srvsvc_NetServerSetServiceBitsEx *r)
{
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
@@ -1604,6 +1344,32 @@ static WERROR srvsvc_NETRSERVERTRANSPORTDELEX(struct dcesrv_call_state *dce_call
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
}
+/*
+ srvsvc_NetShareDel
+*/
+static WERROR srvsvc_NetShareDel(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+ struct srvsvc_NetShareDel *r)
+{
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+/*
+ srvsvc_NetSetServiceBits
+*/
+static WERROR srvsvc_NetSetServiceBits(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+ struct srvsvc_NetSetServiceBits *r)
+{
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
+}
+
+/*
+ srvsvc_NETRPRNAMECANONICALIZE
+*/
+static WERROR srvsvc_NETRPRNAMECANONICALIZE(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+ struct srvsvc_NETRPRNAMECANONICALIZE *r)
+{
+ DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
+}
/* include the generated boilerplate */
#include "librpc/gen_ndr/ndr_srvsvc_s.c"
diff --git a/source4/torture/rpc/srvsvc.c b/source4/torture/rpc/srvsvc.c
index c12504e646..13b6cde675 100644
--- a/source4/torture/rpc/srvsvc.c
+++ b/source4/torture/rpc/srvsvc.c
@@ -622,9 +622,8 @@ static BOOL test_NetDiskEnum(struct dcerpc_pipe *p,
uint32_t resume_handle=0;
r.in.server_unc = NULL;
- r.in.unknown = 0;
r.in.resume_handle = &resume_handle;
- r.in.ctr.ctr0 = NULL;
+ r.in.disks.discs = NULL;
for (i=0;i<ARRAY_SIZE(levels);i++) {
ZERO_STRUCT(r.out);
@@ -660,9 +659,9 @@ static BOOL test_NetTransportEnum(struct dcerpc_pipe *p,
BOOL ret = True;
r.in.server_unc = talloc_asprintf(mem_ctx,"\\\\%s",dcerpc_server_name(p));
- r.in.ctr.ctr0 = &c0;
- r.in.ctr.ctr0->count = 0;
- r.in.ctr.ctr0->array = NULL;
+ r.in.transports.ctr0 = &c0;
+ r.in.transports.ctr0->count = 0;
+ r.in.transports.ctr0->array = NULL;
r.in.max_buffer = (uint32_t)-1;
r.in.resume_handle = NULL;