summaryrefslogtreecommitdiff
path: root/source4/librpc
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-05-25 13:50:27 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:17:01 -0500
commite427f58622e3d88c59953d6c1fb583acfb046213 (patch)
tree4fe708ec07cdcb85dd3af028e158505e065ca59e /source4/librpc
parente7b3f91678a27d85791f7a62fc418988edc92214 (diff)
downloadsamba-e427f58622e3d88c59953d6c1fb583acfb046213.tar.gz
samba-e427f58622e3d88c59953d6c1fb583acfb046213.tar.bz2
samba-e427f58622e3d88c59953d6c1fb583acfb046213.zip
r6973: Merge new version of pidl into the main SAMBA_4_0 branch.
The main difference in this new version is the extra data structure generated between the IDL data structure and the NDR parser: IDL -> NDR -> { ndr_parser, ndr_header, eparser, etc } This makes the ndr_parser.pm internals much more sane. Other changes include: - Remove unnecessary calls with NDR_BUFFERS (for example, GUID doesn't have any buffers, just scalars) as well as some (unnecessary) nested setting of flags. - Parse array loops in the C code rather then calling ndr_pull_array(). This allows us to have, for example, arrays of pointers or arrays of pointers to arrays, etc.. - Use if() {} rather then if () goto foo; everywhere - NDR_IN no longer implies LIBNDR_FLAG_REF_ALLOC - By default, top level pointers are now "ref" (as is the default in most other IDL compilers). This can be overridden using the default_pointer_top() property. - initial work on new ethereal parser generators by Alan DeKok and me - pidl now writes errors in the standard format used by compilers, which is parsable by most editors - ability to warn about the fact that pidl extension(s) have been used, useful for making sure IDL files work with other IDL compilers. oh, and there's probably some other things I can't think of right now.. (This used to be commit 13cf227615f6b9e0e5fa62e59197024410254f01)
Diffstat (limited to 'source4/librpc')
-rw-r--r--source4/librpc/idl/atsvc.idl3
-rw-r--r--source4/librpc/idl/audiosrv.idl1
-rw-r--r--source4/librpc/idl/browser.idl1
-rw-r--r--source4/librpc/idl/dbgidl.idl2
-rw-r--r--source4/librpc/idl/dcom.idl16
-rw-r--r--source4/librpc/idl/dfs.idl1
-rw-r--r--source4/librpc/idl/drsblobs.idl1
-rw-r--r--source4/librpc/idl/drsuapi.idl5
-rw-r--r--source4/librpc/idl/dsbackup.idl5
-rw-r--r--source4/librpc/idl/dssetup.idl1
-rw-r--r--source4/librpc/idl/echo.idl1
-rw-r--r--source4/librpc/idl/efs.idl2
-rw-r--r--source4/librpc/idl/epmapper.idl3
-rw-r--r--source4/librpc/idl/eventlog.idl1
-rw-r--r--source4/librpc/idl/exchange.idl1
-rw-r--r--source4/librpc/idl/initshutdown.idl1
-rw-r--r--source4/librpc/idl/krb5pac.idl1
-rw-r--r--source4/librpc/idl/lsa.idl1
-rw-r--r--source4/librpc/idl/mgmt.idl1
-rw-r--r--source4/librpc/idl/nbt.idl2
-rw-r--r--source4/librpc/idl/netlogon.idl1
-rw-r--r--source4/librpc/idl/oxidresolver.idl1
-rw-r--r--source4/librpc/idl/policyagent.idl2
-rw-r--r--source4/librpc/idl/remact.idl1
-rw-r--r--source4/librpc/idl/rot.idl3
-rw-r--r--source4/librpc/idl/samr.idl3
-rw-r--r--source4/librpc/idl/spoolss.idl1
-rw-r--r--source4/librpc/idl/srvsvc.idl1
-rw-r--r--source4/librpc/idl/svcctl.idl5
-rw-r--r--source4/librpc/idl/trkwks.idl2
-rw-r--r--source4/librpc/idl/winreg.idl1
-rw-r--r--source4/librpc/idl/winsrepl.idl3
-rw-r--r--source4/librpc/idl/wkssvc.idl1
-rw-r--r--source4/librpc/ndr/libndr.h1
-rw-r--r--source4/librpc/ndr/ndr.c120
-rw-r--r--source4/librpc/ndr/ndr_sec.c4
-rw-r--r--source4/librpc/rpc/dcerpc.c3
37 files changed, 65 insertions, 138 deletions
diff --git a/source4/librpc/idl/atsvc.idl b/source4/librpc/idl/atsvc.idl
index bf7743a37c..a11a2cf746 100644
--- a/source4/librpc/idl/atsvc.idl
+++ b/source4/librpc/idl/atsvc.idl
@@ -7,6 +7,7 @@
[ uuid("1ff70682-0a51-30e8-076d-740be8cee98b"),
version(1.0),
pointer_default(unique),
+ pointer_default_top(unique),
helpstring("Queue/List/Remove jobs for later execution"),
endpoint("ncacn_np:[\\pipe\\atsvc]", "ncalrpc:")
] interface atsvc
@@ -46,7 +47,7 @@
typedef struct {
uint32 entries_read;
- [size_is(entries_read)] atsvc_JobEnumInfo *first_entry[];
+ [size_is(entries_read)] atsvc_JobEnumInfo *first_entry;
} atsvc_enum_ctr;
/******************/
diff --git a/source4/librpc/idl/audiosrv.idl b/source4/librpc/idl/audiosrv.idl
index 9b9399ffee..2b27b757dd 100644
--- a/source4/librpc/idl/audiosrv.idl
+++ b/source4/librpc/idl/audiosrv.idl
@@ -2,6 +2,7 @@
uuid("0a74ef1c-41a4-4e06-83ae-dc74fb1cdd53"),
version(1.0),
pointer_default(unique),
+ pointer_default_top(unique),
helpstring("Audio Server")
] interface audiosrv
{
diff --git a/source4/librpc/idl/browser.idl b/source4/librpc/idl/browser.idl
index 5cc2475119..b2008c7321 100644
--- a/source4/librpc/idl/browser.idl
+++ b/source4/librpc/idl/browser.idl
@@ -3,6 +3,7 @@
version(0.0),
helpstring("Browsing"),
pointer_default(unique),
+ pointer_default_top(unique),
endpoint("ncacn_np:[\\pipe\\browser]", "ncacn_ip_tcp:", "ncalrpc:")
]
interface browser
diff --git a/source4/librpc/idl/dbgidl.idl b/source4/librpc/idl/dbgidl.idl
index 8d2133d81f..1c21637b74 100644
--- a/source4/librpc/idl/dbgidl.idl
+++ b/source4/librpc/idl/dbgidl.idl
@@ -1,7 +1,7 @@
[
uuid("1d55b526-c137-46c5-ab79-638f2a68e869"),
version(1.0),
- pointer_default(unique),
+ pointer_default(unique),
helpstring("Remote IDL debugger")
] interface dbgidl
{
diff --git a/source4/librpc/idl/dcom.idl b/source4/librpc/idl/dcom.idl
index 3e4d9d0c2c..f8db720817 100644
--- a/source4/librpc/idl/dcom.idl
+++ b/source4/librpc/idl/dcom.idl
@@ -10,6 +10,7 @@
[
uuid("18f70770-8e64-11cf-9af1-0020af6e72f4"),
pointer_default(unique),
+ pointer_default_top(unique),
version(0.0)
] interface dcom_Unknown
{
@@ -22,6 +23,7 @@
object,
uuid("00000000-0000-0000-C000-000000000046"),
pointer_default(unique),
+ pointer_default_top(unique),
helpstring("Base interface for all COM interfaces")
]
interface IUnknown
@@ -46,6 +48,7 @@ interface IUnknown
[
object,
uuid("00000001-0000-0000-C000-000000000046"),
+ pointer_default_top(unique),
pointer_default(unique)
] interface IClassFactory : IUnknown
{
@@ -72,6 +75,7 @@ interface IUnknown
[
uuid("00000131-0000-0000-C000-000000000046"),
object,
+ pointer_default_top(unique),
pointer_default(unique),
helpstring("Remote version of IUnknown")
]
@@ -113,6 +117,7 @@ interface IRemUnknown : IUnknown
[
uuid("00000140-0000-0000-c000-000000000046"),
+ pointer_default_top(unique),
pointer_default(unique),
object
] interface IClassActivator : IUnknown
@@ -126,6 +131,7 @@ interface IRemUnknown : IUnknown
[
uuid("00000136-0000-0000-c000-000000000046"),
+ pointer_default_top(unique),
pointer_default(unique),
object
] interface ISCMLocalActivator : IClassActivator
@@ -135,6 +141,7 @@ interface IRemUnknown : IUnknown
[
pointer_default(unique),
+ pointer_default_top(unique),
uuid("c6f3ee72-ce7e-11d1-b71e-00c04fc3111a")
] interface IMachineLocalActivator
{
@@ -143,6 +150,7 @@ interface IRemUnknown : IUnknown
[
pointer_default(unique),
+ pointer_default_top(unique),
uuid("e60c73e6-88f9-11cf-9af1-0020af6e72f4")
] interface ILocalObjectExporter
{
@@ -154,6 +162,7 @@ interface IRemUnknown : IUnknown
[
uuid("000001a0-0000-0000-c000-000000000046"),
pointer_default(unique),
+ pointer_default_top(unique),
object
]
interface ISystemActivator : IClassActivator
@@ -173,6 +182,7 @@ interface IRemUnknown : IUnknown
[
object,
pointer_default(unique),
+ pointer_default_top(unique),
uuid("00000143-0000-0000-C000-000000000046")
]
@@ -188,8 +198,9 @@ interface IRemUnknown2 : IRemUnknown
}
[
-object,
+ object,
pointer_default(unique),
+ pointer_default_top(unique),
uuid("00000136-0000-0000-C000-000000000046")
] interface ISCMActivator : IClassActivator
{
@@ -199,6 +210,7 @@ object,
[
object,
pointer_default(unique),
+ pointer_default_top(unique),
uuid("00020400-0000-0000-C000-000000000046")
] interface IDispatch : IUnknown
{
@@ -267,6 +279,7 @@ object,
uuid(DA23F6DB-6F45-466C-9EED-0B65286F2D78),
helpstring("ICoffeeMachine Interface"),
pointer_default(unique),
+ pointer_default_top(unique),
object
] interface ICoffeeMachine : IUnknown
{
@@ -284,6 +297,7 @@ object,
[
object,
pointer_default(unique),
+ pointer_default_top(unique),
uuid("0000000C-0000-0000-C000-000000000046"),
helpstring("Stream")
]
diff --git a/source4/librpc/idl/dfs.idl b/source4/librpc/idl/dfs.idl
index d418b8b546..8bbb3e02ff 100644
--- a/source4/librpc/idl/dfs.idl
+++ b/source4/librpc/idl/dfs.idl
@@ -7,6 +7,7 @@
[ uuid("4fc742e0-4a10-11cf-8273-00aa004ae673"),
version(3.0),
pointer_default(unique),
+ pointer_default_top(unique),
helpstring("Settings for Microsoft Distributed File System")
] interface netdfs
{
diff --git a/source4/librpc/idl/drsblobs.idl b/source4/librpc/idl/drsblobs.idl
index e682de452f..c7d1a5fb48 100644
--- a/source4/librpc/idl/drsblobs.idl
+++ b/source4/librpc/idl/drsblobs.idl
@@ -4,6 +4,7 @@
uuid("38578646-4566-4564-2244-275796345667"),
version(0.0),
pointer_default(unique),
+ pointer_default_top(unique),
helpstring("Active Directory Replication LDAP Blobs"),
depends(drsuapi)
]
diff --git a/source4/librpc/idl/drsuapi.idl b/source4/librpc/idl/drsuapi.idl
index 16b8da82b8..737cd3b131 100644
--- a/source4/librpc/idl/drsuapi.idl
+++ b/source4/librpc/idl/drsuapi.idl
@@ -7,6 +7,7 @@
authservice("ldap"),
helpstring("Active Directory Replication"),
pointer_default(unique),
+ pointer_default_top(unique),
depends(security)
]
interface drsuapi
@@ -554,7 +555,7 @@ interface drsuapi
[size_is(count)] drsuapi_DsReplicaMetaData meta_data[];
} drsuapi_DsReplicaMetaDataCtr;
- typedef [noprint] struct {
+ typedef [public,noprint] struct {
drsuapi_DsReplicaObjectListItemEx *next_object;
drsuapi_DsReplicaObject object;
uint32 unknown1;
@@ -908,7 +909,7 @@ interface drsuapi
/*****************/
/* Function 0x11 */
- typedef [noprint] struct {
+ typedef [public,noprint] struct {
drsuapi_DsReplicaObjectListItem *next_object;
drsuapi_DsReplicaObject object;
} drsuapi_DsReplicaObjectListItem;
diff --git a/source4/librpc/idl/dsbackup.idl b/source4/librpc/idl/dsbackup.idl
index c4f3d3cded..5ba5ffe959 100644
--- a/source4/librpc/idl/dsbackup.idl
+++ b/source4/librpc/idl/dsbackup.idl
@@ -1,7 +1,8 @@
[
uuid("ecec0d70-a603-11d0-96b1-00a0c91ece30"),
version(1.0),
- pointer_default(unique),
+ pointer_default(unique),
+ pointer_default_top(unique),
helpstring("Backup support for Active Directory")
] interface ad_backup
{
@@ -19,7 +20,7 @@
[
uuid("16e0cf3a-a604-11d0-96b1-00a0c91ece30"),
version(1.0),
- pointer_default(unique),
+ pointer_default(unique),
helpstring("Restoring Active Directory backups")
] interface ad_restore
{
diff --git a/source4/librpc/idl/dssetup.idl b/source4/librpc/idl/dssetup.idl
index 098a148904..f10027466b 100644
--- a/source4/librpc/idl/dssetup.idl
+++ b/source4/librpc/idl/dssetup.idl
@@ -9,6 +9,7 @@
version(0.0),
endpoint("ncacn_np:[\\pipe\\lsarpc]", "ncacn_np:[\\pipe\\lsass]", "ncacn_ip_tcp:", "ncalrpc:"),
pointer_default(unique),
+ pointer_default_top(unique),
helpstring("Active Directory Setup")
] interface dssetup
{
diff --git a/source4/librpc/idl/echo.idl b/source4/librpc/idl/echo.idl
index d3d0305cb6..deb7c95bac 100644
--- a/source4/librpc/idl/echo.idl
+++ b/source4/librpc/idl/echo.idl
@@ -5,6 +5,7 @@
uuid("60a15ec5-4de8-11d7-a637-005056a20182"),
endpoint("ncacn_np:[\\pipe\\rpcecho]", "ncacn_ip_tcp:", "ncalrpc:"),
pointer_default(unique),
+ pointer_default_top(unique),
version(1.0),
helpstring("Simple echo pipe")
]
diff --git a/source4/librpc/idl/efs.idl b/source4/librpc/idl/efs.idl
index 9a97223e6a..8ff34c92b9 100644
--- a/source4/librpc/idl/efs.idl
+++ b/source4/librpc/idl/efs.idl
@@ -1,7 +1,7 @@
[
uuid("c681d488-d850-11d0-8c52-00c04fd90f7e"),
version(1.0),
- pointer_default(unique),
+ pointer_default(unique),
helpstring("Encrypted File System")
] interface efs
{
diff --git a/source4/librpc/idl/epmapper.idl b/source4/librpc/idl/epmapper.idl
index 7881e47fe6..766b867a35 100644
--- a/source4/librpc/idl/epmapper.idl
+++ b/source4/librpc/idl/epmapper.idl
@@ -14,6 +14,7 @@ http://www.opengroup.org/onlinepubs/9629399/chap6.htm#tagcjh_11_02_03_01: bindin
endpoint("ncacn_np:[\\pipe\\epmapper]", "ncacn_ip_tcp:[135]",
"ncalrpc:[EPMAPPER]"),
helpstring("EndPoint Mapper"),
+ pointer_default_top(unique),
pointer_default(unique)
]
interface epmapper
@@ -202,7 +203,7 @@ interface epmapper
typedef struct {
[subcontext(2)] epm_lhs lhs;
- [subcontext(2),switch_is(lhs.protocol)] epm_rhs rhs;
+ [subcontext(2),switch_is(r->lhs.protocol)] epm_rhs rhs;
} epm_floor;
/* note that the NDR_NOALIGN flag is inherited by all nested
diff --git a/source4/librpc/idl/eventlog.idl b/source4/librpc/idl/eventlog.idl
index 14923e390f..8b4963c1e1 100644
--- a/source4/librpc/idl/eventlog.idl
+++ b/source4/librpc/idl/eventlog.idl
@@ -7,6 +7,7 @@
version(0.0),
depends(security),
pointer_default(unique),
+ pointer_default_top(unique),
helpstring("Event Logger")
] interface eventlog
{
diff --git a/source4/librpc/idl/exchange.idl b/source4/librpc/idl/exchange.idl
index 15b31794fa..f8af3c77c6 100644
--- a/source4/librpc/idl/exchange.idl
+++ b/source4/librpc/idl/exchange.idl
@@ -192,6 +192,7 @@ System Attendant Private Interface
[
uuid("a4f1db00-ca47-1067-b31f-00dd010662da"),
pointer_default(unique),
+ pointer_default_top(unique),
version(0.81),
helpstring("Exchange 5.5 EMSMDB")
] interface exchange_emsmdb
diff --git a/source4/librpc/idl/initshutdown.idl b/source4/librpc/idl/initshutdown.idl
index e84edb47b8..f4f1f93f5e 100644
--- a/source4/librpc/idl/initshutdown.idl
+++ b/source4/librpc/idl/initshutdown.idl
@@ -9,6 +9,7 @@
version(1.0),
endpoint("ncacn_np:[\\pipe\\InitShutdown]"),
pointer_default(unique),
+ pointer_default_top(unique),
helpstring("Init shutdown service")
] interface initshutdown
{
diff --git a/source4/librpc/idl/krb5pac.idl b/source4/librpc/idl/krb5pac.idl
index a8a0ca0697..16524197c5 100644
--- a/source4/librpc/idl/krb5pac.idl
+++ b/source4/librpc/idl/krb5pac.idl
@@ -8,6 +8,7 @@
uuid("46746756-7567-7567-5677-756756756756"),
version(0.0),
pointer_default(unique),
+ pointer_default_top(unique),
depends(security,netlogon)
]
interface krb5pac
diff --git a/source4/librpc/idl/lsa.idl b/source4/librpc/idl/lsa.idl
index 68adcf1d9d..3737d4c0ea 100644
--- a/source4/librpc/idl/lsa.idl
+++ b/source4/librpc/idl/lsa.idl
@@ -8,6 +8,7 @@
version(0.0),
endpoint("ncacn_np:[\\pipe\\lsarpc]","ncacn_np:[\\pipe\\lsass]", "ncacn_ip_tcp:", "ncalrpc:"),
pointer_default(unique),
+ pointer_default_top(unique),
helpstring("Local Security Authority"),
depends(security)
] interface lsarpc
diff --git a/source4/librpc/idl/mgmt.idl b/source4/librpc/idl/mgmt.idl
index b649e0db29..2c4910e677 100644
--- a/source4/librpc/idl/mgmt.idl
+++ b/source4/librpc/idl/mgmt.idl
@@ -8,6 +8,7 @@
uuid("afa8bd80-7d8a-11c9-bef4-08002b102989"),
version(1.0),
pointer_default(unique),
+ pointer_default_top(unique),
endpoint("ncalrpc:[EPMAPPER]", "ncacn_ip_tcp:[135]", "ncacn_np:[\\pipe\\epmapper]"),
helpstring("DCE/RPC Remote Management")
]
diff --git a/source4/librpc/idl/nbt.idl b/source4/librpc/idl/nbt.idl
index 371084bc65..95e4abd974 100644
--- a/source4/librpc/idl/nbt.idl
+++ b/source4/librpc/idl/nbt.idl
@@ -66,7 +66,7 @@
/* the ndr parser for nbt_name is separately defined in
nbtname.c (along with the parsers for nbt_string) */
- typedef [nopull,nopush] struct {
+ typedef [public,nopull,nopush] struct {
string name;
string scope;
nbt_name_type type;
diff --git a/source4/librpc/idl/netlogon.idl b/source4/librpc/idl/netlogon.idl
index 68a5078aae..9d9d2dd98f 100644
--- a/source4/librpc/idl/netlogon.idl
+++ b/source4/librpc/idl/netlogon.idl
@@ -11,6 +11,7 @@
version(1.0),
endpoint("ncacn_np:[\\pipe\\netlogon]","ncacn_ip_tcp:","ncalrpc:"),
pointer_default(unique),
+ pointer_default_top(unique),
depends(lsa,samr)
]
diff --git a/source4/librpc/idl/oxidresolver.idl b/source4/librpc/idl/oxidresolver.idl
index 3b6d4efd28..ad38fce9a5 100644
--- a/source4/librpc/idl/oxidresolver.idl
+++ b/source4/librpc/idl/oxidresolver.idl
@@ -17,6 +17,7 @@
helpstring("Object Exporter ID Resolver"),
endpoint("ncacn_np:[\\pipe\\epmapper]", "ncacn_ip_tcp:[135]", "ncalrpc:"),
pointer_default(unique),
+ pointer_default_top(unique),
depends(dcom)
]
interface IOXIDResolver
diff --git a/source4/librpc/idl/policyagent.idl b/source4/librpc/idl/policyagent.idl
index 6da5cbb8f4..295b70a2a1 100644
--- a/source4/librpc/idl/policyagent.idl
+++ b/source4/librpc/idl/policyagent.idl
@@ -3,7 +3,7 @@
[
uuid("d335b8f6-cb31-11d0-b0f9-006097ba4e54"),
version(1.5),
- pointer_default(unique),
+ pointer_default(unique),
helpstring("IPSec Policy Agent")
] interface policyagent
{
diff --git a/source4/librpc/idl/remact.idl b/source4/librpc/idl/remact.idl
index 7a879e717f..232ae9fffc 100644
--- a/source4/librpc/idl/remact.idl
+++ b/source4/librpc/idl/remact.idl
@@ -8,6 +8,7 @@
[
uuid("4d9f4ab8-7d1c-11cf-861e-0020af6e7c57"),
pointer_default(unique),
+ pointer_default_top(unique),
endpoint("ncalrpc:", "ncacn_ip_tcp:[135]", "ncacn_np:[\\pipe\\epmapper]"),
depends(dcom)
]
diff --git a/source4/librpc/idl/rot.idl b/source4/librpc/idl/rot.idl
index fd9fd42467..8ae5502bdc 100644
--- a/source4/librpc/idl/rot.idl
+++ b/source4/librpc/idl/rot.idl
@@ -3,7 +3,8 @@
[
uuid("b9e79e60-3d52-11ce-aaa1-00006901293f"),
version(0.2),
- pointer_default(unique),
+ pointer_default(unique),
+ pointer_default_top(unique),
depends(orpc),
endpoint("ncacn_np:[\\pipe\\epmapper]", "ncacn_ip_tcp:[135]",
"ncalrpc:[EPMAPPER]")
diff --git a/source4/librpc/idl/samr.idl b/source4/librpc/idl/samr.idl
index 3cf2aeaf7e..59de0d1b4a 100644
--- a/source4/librpc/idl/samr.idl
+++ b/source4/librpc/idl/samr.idl
@@ -12,6 +12,7 @@
version(1.0),
endpoint("ncacn_np:[\\pipe\\samr]","ncacn_ip_tcp:", "ncalrpc:"),
pointer_default(unique),
+ pointer_default_top(unique),
depends(lsa,security)
] interface samr
{
@@ -336,7 +337,7 @@
typedef struct {
uint32 count;
- [size_is(count)] samr_String *names[];
+ [size_is(count)] samr_String *names;
} samr_Strings;
NTSTATUS samr_LookupRids(
diff --git a/source4/librpc/idl/spoolss.idl b/source4/librpc/idl/spoolss.idl
index 5d4e957f07..0693d3c3c4 100644
--- a/source4/librpc/idl/spoolss.idl
+++ b/source4/librpc/idl/spoolss.idl
@@ -8,6 +8,7 @@
version(1.0),
endpoint("ncacn_np:[\\pipe\\spoolss]"),
pointer_default(unique),
+ pointer_default_top(unique),
helpstring("Spooler SubSystem"),
depends(security)
] interface spoolss
diff --git a/source4/librpc/idl/srvsvc.idl b/source4/librpc/idl/srvsvc.idl
index e986ea16ed..3661bfb9cc 100644
--- a/source4/librpc/idl/srvsvc.idl
+++ b/source4/librpc/idl/srvsvc.idl
@@ -8,6 +8,7 @@
version(3.0),
endpoint("ncacn_np:[\\pipe\\srvsvc]", "ncacn_ip_tcp:", "ncalrpc:"),
pointer_default(unique),
+ pointer_default_top(unique),
helpstring("Server Service"),
depends(security,svcctl)
] interface srvsvc
diff --git a/source4/librpc/idl/svcctl.idl b/source4/librpc/idl/svcctl.idl
index 544d5d83f3..3ffe41c109 100644
--- a/source4/librpc/idl/svcctl.idl
+++ b/source4/librpc/idl/svcctl.idl
@@ -7,6 +7,7 @@
[ uuid("367abb81-9844-35f1-ad32-98f038001003"),
version(2.0),
pointer_default(unique),
+ pointer_default_top(unique),
endpoint("ncacn_np:[\\pipe\\svcctl]", "ncalrpc:"),
helpstring("Service Control")
] interface svcctl
@@ -233,7 +234,7 @@
WERROR svcctl_StartServiceW(
[in,ref] policy_handle *handle,
[in] uint32 NumArgs,
- [in,length_of(NumArgs)] unistr *Arguments);
+ [in,length_is(NumArgs)] unistr *Arguments);
/*****************/
/* Function 0x14 */
@@ -343,7 +344,7 @@
WERROR svcctl_StartServiceA(
[in,ref] policy_handle *handle,
[in] uint32 NumArgs,
- [in,length_of(NumArgs)] unistr *Arguments);
+ [in,length_is(NumArgs)] unistr *Arguments);
/*****************/
/* Function 0x20 */
diff --git a/source4/librpc/idl/trkwks.idl b/source4/librpc/idl/trkwks.idl
index 8f8c759d17..7f11af189b 100644
--- a/source4/librpc/idl/trkwks.idl
+++ b/source4/librpc/idl/trkwks.idl
@@ -5,7 +5,7 @@
[
uuid("300f3532-38cc-11d0-a3f0-0020af6b0add"),
version(1.2),
- pointer_default(unique),
+ pointer_default(unique),
helpstring("Distributed Key Tracking Service")
]
interface trkwks
diff --git a/source4/librpc/idl/winreg.idl b/source4/librpc/idl/winreg.idl
index 47531d4710..31f293267a 100644
--- a/source4/librpc/idl/winreg.idl
+++ b/source4/librpc/idl/winreg.idl
@@ -9,6 +9,7 @@
version(1.0),
endpoint("ncacn_np:[\\pipe\\winreg]","ncacn_ip_tcp:","ncalrpc:"),
pointer_default(unique),
+ pointer_default_top(unique),
helpstring("Remote Registry Service"),
depends(lsa,initshutdown)
] interface winreg
diff --git a/source4/librpc/idl/winsrepl.idl b/source4/librpc/idl/winsrepl.idl
index cec82a5106..8bcea421aa 100644
--- a/source4/librpc/idl/winsrepl.idl
+++ b/source4/librpc/idl/winsrepl.idl
@@ -12,7 +12,8 @@
[
uuid("0-1-2-3-4"),
version(0.0),
- pointer_default(unique)
+ pointer_default(unique),
+ pointer_default_top(unique)
]
interface wrepl
{
diff --git a/source4/librpc/idl/wkssvc.idl b/source4/librpc/idl/wkssvc.idl
index 0d018db4b9..a948f53dbf 100644
--- a/source4/librpc/idl/wkssvc.idl
+++ b/source4/librpc/idl/wkssvc.idl
@@ -7,6 +7,7 @@
[ uuid("6bffd098-a112-3610-9833-46c3f87e345a"),
version(1.0),
pointer_default(unique),
+ pointer_default_top(unique),
helpstring("Workstation Service"),
depends(srvsvc)
] interface wkssvc
diff --git a/source4/librpc/ndr/libndr.h b/source4/librpc/ndr/libndr.h
index ddf9664b9b..892f3c27ca 100644
--- a/source4/librpc/ndr/libndr.h
+++ b/source4/librpc/ndr/libndr.h
@@ -147,7 +147,6 @@ struct ndr_print {
#define NDR_BE(ndr) (((ndr)->flags & (LIBNDR_FLAG_BIGENDIAN|LIBNDR_FLAG_LITTLE_ENDIAN)) == LIBNDR_FLAG_BIGENDIAN)
enum ndr_err_code {
- NDR_ERR_CONFORMANT_SIZE,
NDR_ERR_ARRAY_SIZE,
NDR_ERR_BAD_SWITCH,
NDR_ERR_OFFSET,
diff --git a/source4/librpc/ndr/ndr.c b/source4/librpc/ndr/ndr.c
index 8296726866..dfd21018d2 100644
--- a/source4/librpc/ndr/ndr.c
+++ b/source4/librpc/ndr/ndr.c
@@ -182,120 +182,6 @@ NTSTATUS ndr_push_expand(struct ndr_push *ndr, uint32_t size)
return NT_STATUS_OK;
}
-/* This function does not appear to be used */
-
-#if 0
-
-/*
- set the push offset to 'ofs'
-*/
-static NTSTATUS ndr_push_set_offset(struct ndr_push *ndr, uint32_t ofs)
-{
- NDR_CHECK(ndr_push_expand(ndr, ofs));
- ndr->offset = ofs;
- return NT_STATUS_OK;
-}
-
-#endif
-
-/*
- push a generic array
-*/
-NTSTATUS ndr_push_array(struct ndr_push *ndr, int ndr_flags, void *base,
- size_t elsize, uint32_t count,
- NTSTATUS (*push_fn)(struct ndr_push *, int, void *))
-{
- int i;
- char *p = base;
- if (!(ndr_flags & NDR_SCALARS)) goto buffers;
- for (i=0;i<count;i++) {
- NDR_CHECK(push_fn(ndr, NDR_SCALARS, p));
- p += elsize;
- }
- if (!(ndr_flags & NDR_BUFFERS)) goto done;
-buffers:
- p = base;
- for (i=0;i<count;i++) {
- NDR_CHECK(push_fn(ndr, NDR_BUFFERS, p));
- p += elsize;
- }
-done:
- return NT_STATUS_OK;
-}
-
-/*
- pull a constant sized array
-*/
-NTSTATUS ndr_pull_array(struct ndr_pull *ndr, int ndr_flags, void *base,
- size_t elsize, uint32_t count,
- NTSTATUS (*pull_fn)(struct ndr_pull *, int, void *))
-{
- int i;
- char *p;
- p = base;
- if (!(ndr_flags & NDR_SCALARS)) goto buffers;
- for (i=0;i<count;i++) {
- NDR_CHECK(pull_fn(ndr, NDR_SCALARS, p));
- p += elsize;
- }
- if (!(ndr_flags & NDR_BUFFERS)) goto done;
-buffers:
- p = base;
- for (i=0;i<count;i++) {
- NDR_CHECK(pull_fn(ndr, NDR_BUFFERS, p));
- p += elsize;
- }
-done:
- return NT_STATUS_OK;
-}
-
-/*
- pull a constant size array of structures
-*/
-NTSTATUS ndr_pull_struct_array(struct ndr_pull *ndr, uint32_t count,
- size_t elsize, void **info,
- NTSTATUS (*pull_fn)(struct ndr_pull *, int, void *))
-{
- int i;
- char *base;
-
- NDR_ALLOC_N_SIZE(ndr, *info, count, elsize);
- base = (char *)*info;
-
- for (i = 0; i < count; i++) {
- ndr->data += ndr->offset;
- ndr->offset = 0;
- NDR_CHECK(pull_fn(ndr, NDR_SCALARS|NDR_BUFFERS, &base[count * elsize]));
- }
-
- return NT_STATUS_OK;
-}
-
-/*
- print a generic array
-*/
-void ndr_print_array(struct ndr_print *ndr, const char *name, void *base,
- size_t elsize, uint32_t count,
- void (*print_fn)(struct ndr_print *, const char *, void *))
-{
- int i;
- char *p = base;
- ndr->print(ndr, "%s: ARRAY(%d)", name, count);
- ndr->depth++;
- for (i=0;i<count;i++) {
- char *idx=NULL;
- asprintf(&idx, "[%d]", i);
- if (idx) {
- print_fn(ndr, idx, p);
- free(idx);
- }
- p += elsize;
- }
- ndr->depth--;
-}
-
-
-
void ndr_print_debug_helper(struct ndr_print *ndr, const char *format, ...) _PRINTF_ATTRIBUTE(2,3)
{
va_list ap;
@@ -390,7 +276,7 @@ static NTSTATUS ndr_map_error(enum ndr_err_code err)
break;
}
- /* we should all error codes to different status codes */
+ /* we should map all error codes to different status codes */
return NT_STATUS_INVALID_PARAMETER;
}
@@ -623,7 +509,7 @@ uint32_t ndr_get_array_size(struct ndr_pull *ndr, const void *p)
NTSTATUS ndr_check_array_size(struct ndr_pull *ndr, void *p, uint32_t size)
{
uint32_t stored;
- NDR_CHECK(ndr_token_retrieve(&ndr->array_size_list, p, &stored));
+ stored = ndr_token_peek(&ndr->array_size_list, p);
if (stored != size) {
return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE,
"Bad array size - got %u expected %u\n",
@@ -661,7 +547,7 @@ uint32_t ndr_get_array_length(struct ndr_pull *ndr, const void *p)
NTSTATUS ndr_check_array_length(struct ndr_pull *ndr, void *p, uint32_t length)
{
uint32_t stored;
- NDR_CHECK(ndr_token_retrieve(&ndr->array_length_list, p, &stored));
+ stored = ndr_token_peek(&ndr->array_length_list, p);
if (stored != length) {
return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE,
"Bad array length - got %u expected %u\n",
diff --git a/source4/librpc/ndr/ndr_sec.c b/source4/librpc/ndr/ndr_sec.c
index 9e4bc526dc..2e9bf86aac 100644
--- a/source4/librpc/ndr/ndr_sec.c
+++ b/source4/librpc/ndr/ndr_sec.c
@@ -37,8 +37,8 @@ NTSTATUS ndr_pull_dom_sid2(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &num_auths));
NDR_CHECK(ndr_pull_dom_sid(ndr, ndr_flags, sid));
if (sid->num_auths != num_auths) {
- return ndr_pull_error(ndr, NDR_ERR_CONFORMANT_SIZE,
- "Bad conformant size %u should be %u",
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE,
+ "Bad array size %u should exceed %u",
num_auths, sid->num_auths);
}
return NT_STATUS_OK;
diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c
index 2a7ca8eb17..0194decb4a 100644
--- a/source4/librpc/rpc/dcerpc.c
+++ b/source4/librpc/rpc/dcerpc.c
@@ -1025,6 +1025,7 @@ static NTSTATUS dcerpc_ndr_validate_in(struct dcerpc_connection *c,
if (!pull) {
return NT_STATUS_NO_MEMORY;
}
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull(pull, NDR_IN, st);
if (!NT_STATUS_IS_OK(status)) {
@@ -1277,7 +1278,7 @@ NTSTATUS dcerpc_ndr_request_recv(struct rpc_request *req)
if (pull->offset != pull->data_size) {
DEBUG(0,("Warning! ignoring %d unread bytes in rpc packet!\n",
pull->data_size - pull->offset));
- /* we used return NT_STATUS_INFO_LENGTH_MISMATCH here,
+ /* we used to return NT_STATUS_INFO_LENGTH_MISMATCH here,
but it turns out that early versions of NT
(specifically NT3.1) add junk onto the end of rpc
packets, so if we want to interoperate at all with