summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/gtk/tools/gwcrontab.c16
-rw-r--r--source4/librpc/idl/dcom.idl21
-rw-r--r--source4/librpc/idl/dfs.idl3
-rw-r--r--source4/librpc/idl/drsuapi.idl3
-rw-r--r--source4/librpc/idl/echo.idl3
-rw-r--r--source4/librpc/idl/epmapper.idl3
-rw-r--r--source4/librpc/idl/eventlog.idl3
-rw-r--r--source4/librpc/idl/frsapi.idl3
-rw-r--r--source4/librpc/idl/frsrpc.idl3
-rw-r--r--source4/librpc/idl/initshutdown.idl3
-rw-r--r--source4/librpc/idl/irpc.idl3
-rw-r--r--source4/librpc/idl/lsa.idl3
-rw-r--r--source4/librpc/idl/netlogon.idl3
-rw-r--r--source4/librpc/idl/orpc.idl3
-rw-r--r--source4/librpc/idl/oxidresolver.idl22
-rw-r--r--source4/librpc/idl/remact.idl17
-rw-r--r--source4/librpc/idl/rot.idl9
-rw-r--r--source4/librpc/idl/samr.idl3
-rw-r--r--source4/librpc/idl/spoolss.idl3
-rw-r--r--source4/librpc/idl/srvsvc.idl3
-rw-r--r--source4/librpc/idl/svcctl.idl3
-rw-r--r--source4/librpc/idl/unixinfo.idl3
-rw-r--r--source4/librpc/idl/winreg.idl3
-rw-r--r--source4/librpc/idl/wkssvc.idl3
-rw-r--r--source4/pidl/lib/Parse/Pidl/NDR.pm23
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba4/Header.pm6
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm42
-rw-r--r--source4/torture/rpc/atsvc.c8
-rw-r--r--source4/torture/rpc/oxidresolve.c8
29 files changed, 80 insertions, 149 deletions
diff --git a/source4/gtk/tools/gwcrontab.c b/source4/gtk/tools/gwcrontab.c
index 8826faa100..8f1c56ff76 100644
--- a/source4/gtk/tools/gwcrontab.c
+++ b/source4/gtk/tools/gwcrontab.c
@@ -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)) {
diff --git a/source4/librpc/idl/dcom.idl b/source4/librpc/idl/dcom.idl
index 13bdde5aa8..c089cd3c92 100644
--- a/source4/librpc/idl/dcom.idl
+++ b/source4/librpc/idl/dcom.idl
@@ -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
{
diff --git a/source4/librpc/idl/dfs.idl b/source4/librpc/idl/dfs.idl
index 42d79d0c81..c79f77cce3 100644
--- a/source4/librpc/idl/dfs.idl
+++ b/source4/librpc/idl/dfs.idl
@@ -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
{
/******************/
diff --git a/source4/librpc/idl/drsuapi.idl b/source4/librpc/idl/drsuapi.idl
index f77a5496a0..aa87676c9d 100644
--- a/source4/librpc/idl/drsuapi.idl
+++ b/source4/librpc/idl/drsuapi.idl
@@ -7,8 +7,7 @@
authservice("ldap"),
helpstring("Active Directory Replication"),
pointer_default(unique),
- depends(security,misc,samr),
- keepref
+ depends(security,misc,samr)
]
interface drsuapi
{
diff --git a/source4/librpc/idl/echo.idl b/source4/librpc/idl/echo.idl
index 80123f9922..fa030be761 100644
--- a/source4/librpc/idl/echo.idl
+++ b/source4/librpc/idl/echo.idl
@@ -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
{
diff --git a/source4/librpc/idl/epmapper.idl b/source4/librpc/idl/epmapper.idl
index e913209cf1..223883c366 100644
--- a/source4/librpc/idl/epmapper.idl
+++ b/source4/librpc/idl/epmapper.idl
@@ -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
{
diff --git a/source4/librpc/idl/eventlog.idl b/source4/librpc/idl/eventlog.idl
index c8a146b272..38f4a88e28 100644
--- a/source4/librpc/idl/eventlog.idl
+++ b/source4/librpc/idl/eventlog.idl
@@ -7,8 +7,7 @@
version(0.0),
depends(lsa,security),
pointer_default(unique),
- helpstring("Event Logger"),
- keepref
+ helpstring("Event Logger")
] interface eventlog
{
typedef bitmap {
diff --git a/source4/librpc/idl/frsapi.idl b/source4/librpc/idl/frsapi.idl
index 579be8c3a6..2c3f3bb9ff 100644
--- a/source4/librpc/idl/frsapi.idl
+++ b/source4/librpc/idl/frsapi.idl
@@ -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
{
diff --git a/source4/librpc/idl/frsrpc.idl b/source4/librpc/idl/frsrpc.idl
index 3fe5e6db22..434c5d490d 100644
--- a/source4/librpc/idl/frsrpc.idl
+++ b/source4/librpc/idl/frsrpc.idl
@@ -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
{
diff --git a/source4/librpc/idl/initshutdown.idl b/source4/librpc/idl/initshutdown.idl
index 8555ed0c5c..50d49637c2 100644
--- a/source4/librpc/idl/initshutdown.idl
+++ b/source4/librpc/idl/initshutdown.idl
@@ -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 {
diff --git a/source4/librpc/idl/irpc.idl b/source4/librpc/idl/irpc.idl
index a566a99bfc..5614608bd7 100644
--- a/source4/librpc/idl/irpc.idl
+++ b/source4/librpc/idl/irpc.idl
@@ -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 {
diff --git a/source4/librpc/idl/lsa.idl b/source4/librpc/idl/lsa.idl
index f78c36ec59..1e941e6f3b 100644
--- a/source4/librpc/idl/lsa.idl
+++ b/source4/librpc/idl/lsa.idl
@@ -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;
diff --git a/source4/librpc/idl/netlogon.idl b/source4/librpc/idl/netlogon.idl
index e406d51329..ffceab002d 100644
--- a/source4/librpc/idl/netlogon.idl
+++ b/source4/librpc/idl/netlogon.idl
@@ -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
diff --git a/source4/librpc/idl/orpc.idl b/source4/librpc/idl/orpc.idl
index c59cc9d3cb..c1faefd3b1 100644
--- a/source4/librpc/idl/orpc.idl
+++ b/source4/librpc/idl/orpc.idl
@@ -6,8 +6,7 @@
*/
[
- pointer_default(unique),
- keepref
+ pointer_default(unique)
]
interface ObjectRpcBaseTypes
{
diff --git a/source4/librpc/idl/oxidresolver.idl b/source4/librpc/idl/oxidresolver.idl
index beeb6a7f4f..12c5947265 100644
--- a/source4/librpc/idl/oxidresolver.idl
+++ b/source4/librpc/idl/oxidresolver.idl
@@ -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]);
}
diff --git a/source4/librpc/idl/remact.idl b/source4/librpc/idl/remact.idl
index 2f8baf926a..16ac5f60c1 100644
--- a/source4/librpc/idl/remact.idl
+++ b/source4/librpc/idl/remact.idl
@@ -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[]
);
diff --git a/source4/librpc/idl/rot.idl b/source4/librpc/idl/rot.idl
index 27c7836635..abc210aa35 100644
--- a/source4/librpc/idl/rot.idl
+++ b/source4/librpc/idl/rot.idl
@@ -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 (
diff --git a/source4/librpc/idl/samr.idl b/source4/librpc/idl/samr.idl
index a3470ef78c..0f67b3d5fe 100644
--- a/source4/librpc/idl/samr.idl
+++ b/source4/librpc/idl/samr.idl
@@ -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;
diff --git a/source4/librpc/idl/spoolss.idl b/source4/librpc/idl/spoolss.idl
index 02e6ff3f37..3e900c95ce 100644
--- a/source4/librpc/idl/spoolss.idl
+++ b/source4/librpc/idl/spoolss.idl
@@ -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 {
diff --git a/source4/librpc/idl/srvsvc.idl b/source4/librpc/idl/srvsvc.idl
index 2ebd98fa31..b62a3827d1 100644
--- a/source4/librpc/idl/srvsvc.idl
+++ b/source4/librpc/idl/srvsvc.idl
@@ -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;
diff --git a/source4/librpc/idl/svcctl.idl b/source4/librpc/idl/svcctl.idl
index 97460217f5..57d25efd0d 100644
--- a/source4/librpc/idl/svcctl.idl
+++ b/source4/librpc/idl/svcctl.idl
@@ -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 {
diff --git a/source4/librpc/idl/unixinfo.idl b/source4/librpc/idl/unixinfo.idl
index 086cfc7486..4b12a3056a 100644
--- a/source4/librpc/idl/unixinfo.idl
+++ b/source4/librpc/idl/unixinfo.idl
@@ -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
{
/******************/
diff --git a/source4/librpc/idl/winreg.idl b/source4/librpc/idl/winreg.idl
index 04521304e7..03b034b38f 100644
--- a/source4/librpc/idl/winreg.idl
+++ b/source4/librpc/idl/winreg.idl
@@ -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;
diff --git a/source4/librpc/idl/wkssvc.idl b/source4/librpc/idl/wkssvc.idl
index a085265a41..d658091c47 100644
--- a/source4/librpc/idl/wkssvc.idl
+++ b/source4/librpc/idl/wkssvc.idl
@@ -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;
diff --git a/source4/pidl/lib/Parse/Pidl/NDR.pm b/source4/pidl/lib/Parse/Pidl/NDR.pm
index f602bd2d68..cd8aa214ff 100644
--- a/source4/pidl/lib/Parse/Pidl/NDR.pm
+++ b/source4/pidl/lib/Parse/Pidl/NDR.pm
@@ -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"],
);
#####################################################################
diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/Header.pm b/source4/pidl/lib/Parse/Pidl/Samba4/Header.pm
index c9487115f5..6fb3ee2eec 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba4/Header.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba4/Header.pm
@@ -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});
}
diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
index bbcc9f884e..6124935e67 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
@@ -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")
diff --git a/source4/torture/rpc/atsvc.c b/source4/torture/rpc/atsvc.c
index c1357b53d2..e586a1e98f 100644
--- a/source4/torture/rpc/atsvc.c
+++ b/source4/torture/rpc/atsvc.c
@@ -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);
diff --git a/source4/torture/rpc/oxidresolve.c b/source4/torture/rpc/oxidresolve.c
index 11ec5f2749..3643a85485 100644
--- a/source4/torture/rpc/oxidresolve.c
+++ b/source4/torture/rpc/oxidresolve.c
@@ -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;
}