mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
r18639: Get rid of the keepref support
(This used to be commit d1364ef0cd
)
This commit is contained in:
parent
a27d4335f2
commit
cd9057a0bb
@ -49,7 +49,7 @@ static void update_joblist(void)
|
||||
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;
|
||||
|
||||
@ -59,15 +59,15 @@ static void update_joblist(void)
|
||||
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);
|
||||
|
||||
}
|
||||
@ -122,7 +122,7 @@ void on_new_activate (GtkMenuItem *menuitem, gpointer user_data)
|
||||
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)) {
|
||||
|
@ -18,8 +18,7 @@
|
||||
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
|
||||
{
|
||||
@ -43,8 +42,7 @@ 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,
|
||||
@ -71,8 +69,7 @@ interface IUnknown
|
||||
uuid("00000131-0000-0000-C000-000000000046"),
|
||||
object,
|
||||
pointer_default(unique),
|
||||
helpstring("Remote version of IUnknown"),
|
||||
keepref
|
||||
helpstring("Remote version of IUnknown")
|
||||
]
|
||||
interface IRemUnknown : IUnknown
|
||||
{
|
||||
@ -172,8 +169,7 @@ interface IRemUnknown : IUnknown
|
||||
[
|
||||
object,
|
||||
pointer_default(unique),
|
||||
uuid("00000143-0000-0000-C000-000000000046"),
|
||||
keepref
|
||||
uuid("00000143-0000-0000-C000-000000000046")
|
||||
]
|
||||
|
||||
interface IRemUnknown2 : IRemUnknown
|
||||
@ -190,8 +186,7 @@ interface IRemUnknown2 : IRemUnknown
|
||||
[
|
||||
object,
|
||||
pointer_default(unique),
|
||||
uuid("00020400-0000-0000-C000-000000000046"),
|
||||
keepref
|
||||
uuid("00020400-0000-0000-C000-000000000046")
|
||||
] interface IDispatch : IUnknown
|
||||
{
|
||||
/*****************/
|
||||
@ -259,8 +254,7 @@ interface IRemUnknown2 : IRemUnknown
|
||||
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);
|
||||
@ -278,8 +272,7 @@ interface IRemUnknown2 : IRemUnknown
|
||||
object,
|
||||
pointer_default(unique),
|
||||
uuid("0000000C-0000-0000-C000-000000000046"),
|
||||
helpstring("Stream"),
|
||||
keepref
|
||||
helpstring("Stream")
|
||||
]
|
||||
interface IStream : IUnknown
|
||||
{
|
||||
|
@ -5,8 +5,7 @@
|
||||
[ 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
|
||||
{
|
||||
/******************/
|
||||
|
@ -7,8 +7,7 @@
|
||||
authservice("ldap"),
|
||||
helpstring("Active Directory Replication"),
|
||||
pointer_default(unique),
|
||||
depends(security,misc,samr),
|
||||
keepref
|
||||
depends(security,misc,samr)
|
||||
]
|
||||
interface drsuapi
|
||||
{
|
||||
|
@ -4,8 +4,7 @@
|
||||
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
|
||||
{
|
||||
|
@ -15,8 +15,7 @@ http://www.opengroup.org/onlinepubs/9629399/chap6.htm#tagcjh_11_02_03_01: bindin
|
||||
"ncalrpc:[EPMAPPER]"),
|
||||
helpstring("EndPoint Mapper"),
|
||||
pointer_default_top(sptr),
|
||||
pointer_default(sptr),
|
||||
keepref
|
||||
pointer_default(sptr)
|
||||
]
|
||||
interface epmapper
|
||||
{
|
||||
|
@ -7,8 +7,7 @@
|
||||
version(0.0),
|
||||
depends(lsa,security),
|
||||
pointer_default(unique),
|
||||
helpstring("Event Logger"),
|
||||
keepref
|
||||
helpstring("Event Logger")
|
||||
] interface eventlog
|
||||
{
|
||||
typedef bitmap {
|
||||
|
@ -3,8 +3,7 @@
|
||||
version(1.1),
|
||||
endpoint("ncacn_ip_tcp:", "ncalrpc:"),
|
||||
helpstring("File Replication API"),
|
||||
pointer_default(unique),
|
||||
keepref
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface frsapi
|
||||
{
|
||||
|
@ -3,8 +3,7 @@
|
||||
version(1.1),
|
||||
endpoint("ncacn_ip_tcp:", "ncalrpc:"),
|
||||
helpstring("File Replication Service"),
|
||||
pointer_default(unique),
|
||||
keepref
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface frsrpc
|
||||
{
|
||||
|
@ -9,8 +9,7 @@
|
||||
version(1.0),
|
||||
endpoint("ncacn_np:[\\pipe\\InitShutdown]"),
|
||||
pointer_default(unique),
|
||||
helpstring("Init shutdown service"),
|
||||
keepref
|
||||
helpstring("Init shutdown service")
|
||||
] interface initshutdown
|
||||
{
|
||||
typedef struct {
|
||||
|
@ -6,8 +6,7 @@
|
||||
[ uuid("e770c620-0b06-4b5e-8d87-a26e20f28340"),
|
||||
version(1.0),
|
||||
pointer_default(unique),
|
||||
depends(security,nbt),
|
||||
keepref
|
||||
depends(security,nbt)
|
||||
] interface irpc
|
||||
{
|
||||
typedef bitmap {
|
||||
|
@ -9,8 +9,7 @@
|
||||
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;
|
||||
|
@ -12,8 +12,7 @@
|
||||
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
|
||||
|
@ -6,8 +6,7 @@
|
||||
*/
|
||||
|
||||
[
|
||||
pointer_default(unique),
|
||||
keepref
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface ObjectRpcBaseTypes
|
||||
{
|
||||
|
@ -16,8 +16,7 @@
|
||||
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
|
||||
{
|
||||
@ -34,8 +33,8 @@ 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 */
|
||||
@ -51,8 +50,7 @@ interface IOXIDResolver
|
||||
/* 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,
|
||||
@ -60,7 +58,7 @@ interface IOXIDResolver
|
||||
[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 */
|
||||
@ -80,9 +78,9 @@ interface IOXIDResolver
|
||||
[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;
|
||||
@ -90,7 +88,7 @@ interface IOXIDResolver
|
||||
} COMINFO;
|
||||
|
||||
[idempotent] WERROR ServerAlive2 (
|
||||
[out] COMINFO info,
|
||||
[out] DUALSTRINGARRAY dualstring,
|
||||
[out,ref] COMINFO *info,
|
||||
[out,ref] DUALSTRINGARRAY *dualstring,
|
||||
[out] uint8 unknown2[3]);
|
||||
}
|
||||
|
@ -8,8 +8,7 @@
|
||||
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
|
||||
{
|
||||
@ -25,7 +24,7 @@ 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,
|
||||
@ -35,12 +34,12 @@ interface IRemoteActivation
|
||||
[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[]
|
||||
);
|
||||
|
@ -5,15 +5,14 @@
|
||||
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 (
|
||||
@ -26,7 +25,7 @@
|
||||
|
||||
WERROR rot_get_interface_pointer (
|
||||
[in] MInterfacePointer *moniker,
|
||||
[out] MInterfacePointer *ip
|
||||
[out,ref] MInterfacePointer *ip
|
||||
);
|
||||
|
||||
WERROR rot_set_modification_time (
|
||||
@ -36,7 +35,7 @@
|
||||
|
||||
WERROR rot_get_modification_time (
|
||||
[in] MInterfacePointer *moniker,
|
||||
[out] NTTIME t
|
||||
[out,ref] NTTIME *t
|
||||
);
|
||||
|
||||
WERROR rot_enum (
|
||||
|
@ -13,8 +13,7 @@
|
||||
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;
|
||||
|
@ -11,8 +11,7 @@
|
||||
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 {
|
||||
|
@ -10,8 +10,7 @@
|
||||
pointer_default(unique),
|
||||
pointer_default_top(unique),
|
||||
helpstring("Server Service"),
|
||||
depends(security,svcctl),
|
||||
keepref
|
||||
depends(security,svcctl)
|
||||
] interface srvsvc
|
||||
{
|
||||
declare bitmap svcctl_ServerType;
|
||||
|
@ -9,8 +9,7 @@
|
||||
pointer_default(unique),
|
||||
pointer_default_top(unique),
|
||||
endpoint("ncacn_np:[\\pipe\\svcctl]", "ncalrpc:"),
|
||||
helpstring("Service Control"),
|
||||
keepref
|
||||
helpstring("Service Control")
|
||||
] interface svcctl
|
||||
{
|
||||
typedef struct {
|
||||
|
@ -8,8 +8,7 @@
|
||||
endpoint("ncacn_np:[\\pipe\\unixinfo]", "ncacn_ip_tcp:", "ncalrpc:"),
|
||||
pointer_default(unique),
|
||||
helpstring("Unixinfo specific stuff"),
|
||||
depends(security),
|
||||
keepref
|
||||
depends(security)
|
||||
] interface unixinfo
|
||||
{
|
||||
/******************/
|
||||
|
@ -9,8 +9,7 @@
|
||||
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;
|
||||
|
@ -7,8 +7,7 @@
|
||||
pointer_default(unique),
|
||||
pointer_default_top(unique),
|
||||
helpstring("Workstation Service"),
|
||||
depends(srvsvc),
|
||||
keepref
|
||||
depends(srvsvc)
|
||||
] interface wkssvc
|
||||
{
|
||||
declare [v1_enum] enum srvsvc_PlatformId;
|
||||
|
@ -586,23 +586,6 @@ sub CheckPointerTypes($$)
|
||||
}
|
||||
}
|
||||
|
||||
#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;
|
||||
@ -628,12 +611,10 @@ sub ParseInterface($)
|
||||
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));
|
||||
}
|
||||
}
|
||||
@ -855,10 +836,6 @@ my %property_list = (
|
||||
"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"],
|
||||
);
|
||||
|
||||
#####################################################################
|
||||
|
@ -60,11 +60,7 @@ sub HeaderElement($)
|
||||
} 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});
|
||||
}
|
||||
|
@ -593,9 +593,7 @@ sub ParseElementPushLevel
|
||||
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") {
|
||||
@ -675,9 +673,7 @@ sub ParsePtrPush($$$)
|
||||
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));";
|
||||
}
|
||||
@ -713,15 +709,13 @@ sub ParseElementPrint($$$)
|
||||
|
||||
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;
|
||||
|
||||
@ -770,13 +764,11 @@ sub ParseElementPrint($$$)
|
||||
|
||||
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)) {
|
||||
@ -890,7 +882,7 @@ sub ParseMemCtxPullStart($$$)
|
||||
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";
|
||||
@ -916,7 +908,7 @@ sub ParseMemCtxPullEnd($$)
|
||||
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";
|
||||
@ -993,9 +985,7 @@ sub ParseElementPullLevel
|
||||
|
||||
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);
|
||||
@ -1099,8 +1089,7 @@ sub ParsePtrPull($$$$)
|
||||
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 "}";
|
||||
@ -1445,7 +1434,7 @@ sub need_decl_mem_ctx($$)
|
||||
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");
|
||||
|
||||
@ -2111,7 +2100,6 @@ sub ParseFunctionPull($)
|
||||
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")
|
||||
|
@ -75,7 +75,7 @@ static BOOL test_JobEnum(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
|
||||
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;
|
||||
|
||||
@ -86,8 +86,8 @@ static BOOL test_JobEnum(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
|
||||
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;
|
||||
}
|
||||
}
|
||||
@ -109,7 +109,7 @@ static BOOL test_JobAdd(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
|
||||
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);
|
||||
|
||||
|
@ -47,6 +47,8 @@ static int test_RemoteActivation(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, uin
|
||||
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)) {
|
||||
@ -60,7 +62,7 @@ static int test_RemoteActivation(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, uin
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@ -69,8 +71,6 @@ static int test_RemoteActivation(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, uin
|
||||
return 0;
|
||||
}
|
||||
|
||||
*oid = r.out.ipidRemUnknown;
|
||||
*oxid = r.out.pOxid;
|
||||
|
||||
return 1;
|
||||
}
|
||||
@ -189,7 +189,7 @@ static int test_ResolveOxid2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, uint64_
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user