ctr.entries_read = 0;
ctr.first_entry = NULL;
r.in.servername = dcerpc_server_name(at_pipe);
- r.in.ctr = ctr;
+ r.in.ctr = r.out.ctr = &ctr;
r.in.preferred_max_len = 0xffffffff;
r.in.resume_handle = r.out.resume_handle = &resume_handle;
return;
}
- for (i = 0; i < r.out.ctr.entries_read; i++) {
+ for (i = 0; i < r.out.ctr->entries_read; i++) {
GtkTreeIter iter;
gtk_list_store_append(store_jobs, &iter);
gtk_list_store_set (store_jobs, &iter,
- 0, r.out.ctr.first_entry[i].flags,
- 1, r.out.ctr.first_entry[i].job_id,
- 2, r.out.ctr.first_entry[i].days_of_week, /*FIXME: Nicer format */
- 3, r.out.ctr.first_entry[i].job_time, /* FIXME: Nicer format */
- 4, r.out.ctr.first_entry[i].command,
+ 0, r.out.ctr->first_entry[i].flags,
+ 1, r.out.ctr->first_entry[i].job_id,
+ 2, r.out.ctr->first_entry[i].days_of_week, /*FIXME: Nicer format */
+ 3, r.out.ctr->first_entry[i].job_time, /* FIXME: Nicer format */
+ 4, r.out.ctr->first_entry[i].command,
-1);
}
job.flags = 0; /* FIXME */
job.command = gtk_entry_get_text(GTK_ENTRY(entry_cmd));
r.in.servername = dcerpc_server_name(at_pipe);
- r.in.job_info = job;
+ r.in.job_info = &job;
status = dcerpc_atsvc_JobAdd(at_pipe, mem_ctx, &r);
if(!NT_STATUS_IS_OK(status)) {
object,
uuid("00000000-0000-0000-C000-000000000046"),
pointer_default(unique),
- helpstring("Base interface for all COM interfaces"),
- keepref
+ helpstring("Base interface for all COM interfaces")
]
interface IUnknown
{
[
object,
uuid("00000001-0000-0000-C000-000000000046"),
- pointer_default(unique),
- keepref
+ pointer_default(unique)
] interface IClassFactory : IUnknown
{
[local] WERROR CreateInstance([in,unique] MInterfacePointer *pUnknown,
uuid("00000131-0000-0000-C000-000000000046"),
object,
pointer_default(unique),
- helpstring("Remote version of IUnknown"),
- keepref
+ helpstring("Remote version of IUnknown")
]
interface IRemUnknown : IUnknown
{
[
object,
pointer_default(unique),
- uuid("00000143-0000-0000-C000-000000000046"),
- keepref
+ uuid("00000143-0000-0000-C000-000000000046")
]
interface IRemUnknown2 : IRemUnknown
[
object,
pointer_default(unique),
- uuid("00020400-0000-0000-C000-000000000046"),
- keepref
+ uuid("00020400-0000-0000-C000-000000000046")
] interface IDispatch : IUnknown
{
/*****************/
uuid(DA23F6DB-6F45-466C-9EED-0B65286F2D78),
helpstring("ICoffeeMachine Interface"),
pointer_default(unique),
- object,
- keepref
+ object
] interface ICoffeeMachine : IUnknown
{
WERROR MakeCoffee([in,string,charset(UTF16)] uint16 *flavor);
object,
pointer_default(unique),
uuid("0000000C-0000-0000-C000-000000000046"),
- helpstring("Stream"),
- keepref
+ helpstring("Stream")
]
interface IStream : IUnknown
{
[ uuid("4fc742e0-4a10-11cf-8273-00aa004ae673"),
version(3.0),
pointer_default(unique),
- helpstring("Settings for Microsoft Distributed File System"),
- keepref
+ helpstring("Settings for Microsoft Distributed File System")
] interface netdfs
{
/******************/
authservice("ldap"),
helpstring("Active Directory Replication"),
pointer_default(unique),
- depends(security,misc,samr),
- keepref
+ depends(security,misc,samr)
]
interface drsuapi
{
endpoint("ncacn_np:[\\pipe\\rpcecho]", "ncacn_ip_tcp:", "ncalrpc:"),
pointer_default(unique),
version(1.0),
- helpstring("Simple echo pipe"),
- keepref
+ helpstring("Simple echo pipe")
]
interface rpcecho
{
"ncalrpc:[EPMAPPER]"),
helpstring("EndPoint Mapper"),
pointer_default_top(sptr),
- pointer_default(sptr),
- keepref
+ pointer_default(sptr)
]
interface epmapper
{
version(0.0),
depends(lsa,security),
pointer_default(unique),
- helpstring("Event Logger"),
- keepref
+ helpstring("Event Logger")
] interface eventlog
{
typedef bitmap {
version(1.1),
endpoint("ncacn_ip_tcp:", "ncalrpc:"),
helpstring("File Replication API"),
- pointer_default(unique),
- keepref
+ pointer_default(unique)
]
interface frsapi
{
version(1.1),
endpoint("ncacn_ip_tcp:", "ncalrpc:"),
helpstring("File Replication Service"),
- pointer_default(unique),
- keepref
+ pointer_default(unique)
]
interface frsrpc
{
version(1.0),
endpoint("ncacn_np:[\\pipe\\InitShutdown]"),
pointer_default(unique),
- helpstring("Init shutdown service"),
- keepref
+ helpstring("Init shutdown service")
] interface initshutdown
{
typedef struct {
[ uuid("e770c620-0b06-4b5e-8d87-a26e20f28340"),
version(1.0),
pointer_default(unique),
- depends(security,nbt),
- keepref
+ depends(security,nbt)
] interface irpc
{
typedef bitmap {
endpoint("ncacn_np:[\\pipe\\lsarpc]","ncacn_np:[\\pipe\\netlogon]","ncacn_np:[\\pipe\\lsass]", "ncacn_ip_tcp:", "ncalrpc:"),
pointer_default(unique),
helpstring("Local Security Authority"),
- depends(security),
- keepref
+ depends(security)
] interface lsarpc
{
declare bitmap security_secinfo;
endpoint("ncacn_np:[\\pipe\\netlogon]","ncacn_ip_tcp:","ncalrpc:"),
pointer_default(unique),
pointer_default_top(unique),
- depends(lsa,samr,security),
- keepref
+ depends(lsa,samr,security)
]
interface netlogon
*/
[
- pointer_default(unique),
- keepref
+ pointer_default(unique)
]
interface ObjectRpcBaseTypes
{
endpoint("ncacn_np:[\\pipe\\epmapper]", "ncacn_ip_tcp:[135]", "ncalrpc:"),
pointer_default(unique),
pointer_default_top(unique),
- depends(dcom, orpc),
- keepref
+ depends(dcom, orpc)
]
interface IOXIDResolver
{
[in] uint16 cRequestedProtseqs,
[in, size_is(cRequestedProtseqs)] uint16 arRequestedProtseqs[],
[out] DUALSTRINGARRAY *ppdsaOxidBindings,
- [out] IPID pipidRemUnknown,
- [out] uint32 pAuthnHint
+ [out,ref] IPID *pipidRemUnknown,
+ [out,ref] uint32 *pAuthnHint
);
/* Simple ping is used to ping a Set. Client machines use this */
/* whole set can subsequently be pinged using SimplePing, */
/* thus reducing network traffic. */
[idempotent] WERROR ComplexPing (
- [in] SETID *SetId, /* In of 0 on first call for new set. */
- [out] SETID SetId,
+ [in,out,ref] SETID *SetId, /* In of 0 on first call for new set. */
[in] uint16 SequenceNum,
[in] uint16 cAddToSet,
[in] uint16 cDelFromSet,
[in, size_is(cAddToSet)] OID AddToSet[],
/*remove these OIDs from the set */
[in, size_is(cDelFromSet)] OID DelFromSet[],
- [out] uint16 PingBackoffFactor/* 2^factor = multipler */
+ [out,ref] uint16 *PingBackoffFactor/* 2^factor = multipler */
);
/* In some cases the client maybe unsure that a particular */
[in] uint16 cRequestedProtseqs,
[in, size_is(cRequestedProtseqs)] uint16 arRequestedProtseqs[],
[out] DUALSTRINGARRAY *pdsaOxidBindings,
- [out] IPID ipidRemUnknown,
- [out] uint32 AuthnHint,
- [out] COMVERSION ComVersion
+ [out,ref] IPID *ipidRemUnknown,
+ [out,ref] uint32 *AuthnHint,
+ [out,ref] COMVERSION *ComVersion
);
typedef struct {
COMVERSION version;
} COMINFO;
[idempotent] WERROR ServerAlive2 (
- [out] COMINFO info,
- [out] DUALSTRINGARRAY dualstring,
+ [out,ref] COMINFO *info,
+ [out,ref] DUALSTRINGARRAY *dualstring,
[out] uint8 unknown2[3]);
}
pointer_default(unique),
pointer_default_top(unique),
endpoint("ncalrpc:", "ncacn_ip_tcp:[135]", "ncacn_np:[\\pipe\\epmapper]"),
- depends(dcom,orpc),
- keepref
+ depends(dcom,orpc)
]
interface IRemoteActivation
{
const uint32 MODE_GET_CLASS_OBJECT = 0xffffffff;
WERROR RemoteActivation (
[in] ORPCTHIS this,
- [out] ORPCTHAT that,
+ [out,ref] ORPCTHAT *that,
[in] GUID Clsid,
[in] [string,charset(UTF16)] uint16 *pwszObjectName,
[in] MInterfacePointer *pObjectStorage,
[in,size_is(Interfaces)] GUID *pIIDs,
[in] uint16 num_protseqs,
[in, size_is(num_protseqs)] uint16 protseq[*],
- [out] hyper pOxid,
- [out] DUALSTRINGARRAY *pdsaOxidBindings,
- [out] GUID ipidRemUnknown,
- [out] uint32 AuthnHint,
- [out] COMVERSION ServerVersion,
- [out] WERROR hr,
+ [out,ref] hyper *pOxid,
+ [out,ref] DUALSTRINGARRAY *pdsaOxidBindings,
+ [out,ref] GUID *ipidRemUnknown,
+ [out,ref] uint32 *AuthnHint,
+ [out,ref] COMVERSION *ServerVersion,
+ [out,ref] WERROR *hr,
[out,size_is(Interfaces)] MInterfacePointer *ifaces[],
[out,size_is(Interfaces)] WERROR results[]
);
pointer_default_top(unique),
depends(orpc),
endpoint("ncacn_np:[\\pipe\\epmapper]", "ncacn_ip_tcp:[135]",
- "ncalrpc:[EPMAPPER]"),
- keepref
+ "ncalrpc:[EPMAPPER]")
] interface rot
{
WERROR rot_add (
[in] uint32 flags,
[in] MInterfacePointer *unk,
[in] MInterfacePointer *moniker,
- [out] uint32 rotid
+ [out,ref] uint32 *rotid
);
WERROR rot_remove (
WERROR rot_get_interface_pointer (
[in] MInterfacePointer *moniker,
- [out] MInterfacePointer *ip
+ [out,ref] MInterfacePointer *ip
);
WERROR rot_set_modification_time (
WERROR rot_get_modification_time (
[in] MInterfacePointer *moniker,
- [out] NTTIME t
+ [out,ref] NTTIME *t
);
WERROR rot_enum (
endpoint("ncacn_np:[\\pipe\\samr]","ncacn_ip_tcp:", "ncalrpc:"),
pointer_default(unique),
pointer_default_top(unique),
- depends(misc,lsa,security),
- keepref
+ depends(misc,lsa,security)
] interface samr
{
declare bitmap security_secinfo;
pointer_default_top(unique),
helpstring("Spooler SubSystem"),
depends(security),
- helper("librpc/ndr/ndr_spoolss_buf.h"),
- keepref
+ helper("librpc/ndr/ndr_spoolss_buf.h")
] interface spoolss
{
typedef struct {
pointer_default(unique),
pointer_default_top(unique),
helpstring("Server Service"),
- depends(security,svcctl),
- keepref
+ depends(security,svcctl)
] interface srvsvc
{
declare bitmap svcctl_ServerType;
pointer_default(unique),
pointer_default_top(unique),
endpoint("ncacn_np:[\\pipe\\svcctl]", "ncalrpc:"),
- helpstring("Service Control"),
- keepref
+ helpstring("Service Control")
] interface svcctl
{
typedef struct {
endpoint("ncacn_np:[\\pipe\\unixinfo]", "ncacn_ip_tcp:", "ncalrpc:"),
pointer_default(unique),
helpstring("Unixinfo specific stuff"),
- depends(security),
- keepref
+ depends(security)
] interface unixinfo
{
/******************/
pointer_default(unique),
pointer_default_top(unique),
helpstring("Remote Registry Service"),
- depends(lsa,initshutdown,security),
- keepref
+ depends(lsa,initshutdown,security)
] interface winreg
{
declare bitmap security_secinfo;
pointer_default(unique),
pointer_default_top(unique),
helpstring("Workstation Service"),
- depends(srvsvc),
- keepref
+ depends(srvsvc)
] interface wkssvc
{
declare [v1_enum] enum srvsvc_PlatformId;
}
}
-#FIXME: Remove when ref handling in Samba4 is fixed
-sub AddKeepRef($)
-{
- my $d = shift;
-
- if ($d->{TYPE} eq "FUNCTION") {
- foreach (@{$d->{ELEMENTS}}) {
- $_->{PROPERTIES}->{keepref} = 1;
- }
- } elsif ($d->{TYPE} eq "TYPEDEF" and ($d->{DATA}->{TYPE} eq "STRUCT"
- or $d->{DATA}->{TYPE} eq "UNION")) {
- foreach (@{$d->{DATA}->{ELEMENTS}}) {
- $_->{PROPERTIES}->{keepref} = 1;
- }
- }
-}
-
sub ParseInterface($)
{
my $idl = shift;
if ($d->{TYPE} eq "DECLARE") {
push (@declares, $d);
} elsif ($d->{TYPE} eq "FUNCTION") {
- AddKeepRef($d) if (has_property($idl, "keepref"));
push (@functions, ParseFunction($idl, $d, \$opnum));
} elsif ($d->{TYPE} eq "CONST") {
push (@consts, ParseConst($idl, $d));
} else {
- AddKeepRef($d) if (has_property($idl, "keepref"));
push (@types, ParseType($idl, $d));
}
}
"noheader" => ["ELEMENT"],
"charset" => ["ELEMENT"],
"length_is" => ["ELEMENT"],
-
- # temporary (should be removed once we've migrated away from
- # relying on ref pointers being there in Samba4's code)
- "keepref" => ["ELEMENT","INTERFACE"],
);
#####################################################################
} else {
HeaderType($element, $element->{TYPE}, "");
pidl " ";
- my $numstar = 0;
- if (!has_property($element, "ref") or
- has_property($element, "keepref")) {
- $numstar += $element->{POINTERS};
- }
+ my $numstar = $element->{POINTERS};
if ($numstar >= 1) {
$numstar-- if Parse::Pidl::Typelist::scalar_is_reference($element->{TYPE});
}
pidl "NDR_CHECK(ndr_push_relative_ptr2(ndr, $var_name));";
}
}
- if ($l->{POINTER_TYPE} ne "ref" or has_property($e, "keepref")) {
- $var_name = get_value_of($var_name);
- }
+ $var_name = get_value_of($var_name);
ParseElementPushLevel($e, GetNextLevel($e, $l), $ndr, $var_name, $env, 1, 1);
if ($l->{POINTER_TYPE} ne "ref") {
my ($e,$l,$var_name) = @_;
if ($l->{POINTER_TYPE} eq "ref") {
- if (has_property($e, "keepref")) {
- check_null_pointer(get_value_of($var_name));
- }
+ check_null_pointer(get_value_of($var_name));
if ($l->{LEVEL} eq "EMBEDDED") {
pidl "NDR_CHECK(ndr_push_ref_ptr(ndr));";
}
foreach my $l (@{$e->{LEVELS}}) {
if ($l->{TYPE} eq "POINTER") {
- if ($l->{POINTER_TYPE} ne "ref" or has_property($e, "keepref")) {
pidl "ndr_print_ptr(ndr, \"$e->{NAME}\", $var_name);";
pidl "ndr->depth++;";
- if ($l->{POINTER_TYPE} ne "ref") {
- pidl "if ($var_name) {";
- indent;
- }
- $var_name = get_value_of($var_name);
+ if ($l->{POINTER_TYPE} ne "ref") {
+ pidl "if ($var_name) {";
+ indent;
}
+ $var_name = get_value_of($var_name);
} elsif ($l->{TYPE} eq "ARRAY") {
my $length;
foreach my $l (reverse @{$e->{LEVELS}}) {
if ($l->{TYPE} eq "POINTER") {
- if ($l->{POINTER_TYPE} ne "ref" or has_property($e, "keepref")) {
- if ($l->{POINTER_TYPE} ne "ref") {
- deindent;
- pidl "}";
- }
- pidl "ndr->depth--;";
+ if ($l->{POINTER_TYPE} ne "ref") {
+ deindent;
+ pidl "}";
}
+ pidl "ndr->depth--;";
} elsif (($l->{TYPE} eq "ARRAY")
and not is_charset_array($e,$l)
and not has_fast_array($e,$l)) {
my $next_is_array = ($nl->{TYPE} eq "ARRAY");
my $next_is_string = (($nl->{TYPE} eq "DATA") and
($nl->{DATA_TYPE} eq "string"));
- if ($next_is_array or $next_is_string or not has_property($e, "keepref")) {
+ if ($next_is_array or $next_is_string) {
return;
} else {
$mem_c_flags = "LIBNDR_FLAG_REF_ALLOC";
my $next_is_array = ($nl->{TYPE} eq "ARRAY");
my $next_is_string = (($nl->{TYPE} eq "DATA") and
($nl->{DATA_TYPE} eq "string"));
- if ($next_is_array or $next_is_string or not has_property($e, "keepref")) {
+ if ($next_is_array or $next_is_string) {
return;
} else {
$mem_r_flags = "LIBNDR_FLAG_REF_ALLOC";
ParseMemCtxPullStart($e,$l, $var_name);
- if ($l->{POINTER_TYPE} ne "ref" or has_property($e, "keepref")) {
- $var_name = get_value_of($var_name);
- }
+ $var_name = get_value_of($var_name);
ParseElementPullLevel($e,GetNextLevel($e,$l), $ndr, $var_name, $env, 1, 1);
ParseMemCtxPullEnd($e,$l);
pidl "NDR_CHECK(ndr_pull_ref_ptr($ndr, &_ptr_$e->{NAME}));";
}
- if (!$next_is_array and !$next_is_string and
- has_property($e, "keepref")) {
+ if (!$next_is_array and !$next_is_string) {
pidl "if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {";
pidl "\tNDR_PULL_ALLOC($ndr, $var_name);";
pidl "}";
my $next_is_array = ($nl->{TYPE} eq "ARRAY");
my $next_is_string = (($nl->{TYPE} eq "DATA") and
($nl->{DATA_TYPE} eq "string"));
- return 0 if ($next_is_array or $next_is_string or not has_property($e, "keepref"));
+ return 0 if ($next_is_array or $next_is_string);
}
return 1 if ($l->{TYPE} eq "POINTER");
next unless (grep(/out/, @{$e->{DIRECTION}}));
next unless ($e->{LEVELS}[0]->{TYPE} eq "POINTER" and
$e->{LEVELS}[0]->{POINTER_TYPE} eq "ref");
- next unless has_property($e, "keepref");
next if (($e->{LEVELS}[1]->{TYPE} eq "DATA") and
($e->{LEVELS}[1]->{DATA_TYPE} eq "string"));
next if (($e->{LEVELS}[1]->{TYPE} eq "ARRAY")
r.in.servername = dcerpc_server_name(p);
ctr.entries_read = 0;
ctr.first_entry = NULL;
- r.in.ctr = ctr;
+ r.in.ctr = r.out.ctr = &ctr;
r.in.preferred_max_len = 0xffffffff;
r.in.resume_handle = r.out.resume_handle = &resume_handle;
return False;
}
- for (i = 0; i < r.out.ctr.entries_read; i++) {
- if (!test_JobGetInfo(p, mem_ctx, r.out.ctr.first_entry[i].job_id)) {
+ for (i = 0; i < r.out.ctr->entries_read; i++) {
+ if (!test_JobGetInfo(p, mem_ctx, r.out.ctr->first_entry[i].job_id)) {
ret = False;
}
}
info.days_of_week = 0x02; /* Tuesday */
info.flags = 0x11; /* periodic, non-interactive */
info.command = "foo.exe";
- r.in.job_info = info;
+ r.in.job_info = &info;
status = dcerpc_atsvc_JobAdd(p, mem_ctx, &r);
r.in.Interfaces = 1;
iids[0] = dcerpc_table_IUnknown.syntax_id.uuid;
r.in.pIIDs = iids;
+ r.out.pOxid = oxid;
+ r.out.ipidRemUnknown = oid;
status = dcerpc_RemoteActivation(p, mem_ctx, &r);
if(NT_STATUS_IS_ERR(status)) {
}
if(!W_ERROR_IS_OK(r.out.hr)) {
- fprintf(stderr, "RemoteActivation: %s\n", win_errstr(r.out.hr));
+ fprintf(stderr, "RemoteActivation: %s\n", win_errstr(*r.out.hr));
return 0;
}
return 0;
}
- *oid = r.out.ipidRemUnknown;
- *oxid = r.out.pOxid;
return 1;
}
return 0;
}
- printf("Remote server versions: %d, %d\n", r.out.ComVersion.MajorVersion, r.out.ComVersion.MinorVersion);
+ printf("Remote server versions: %d, %d\n", r.out.ComVersion->MajorVersion, r.out.ComVersion->MinorVersion);
return 1;
}