1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-27 22:50:26 +03:00

* added a bunch of placeholder IDL files

* allow for an interface to list its endpoints in the IDL file, so we
   can automatically make the server listen on the right pipes, and
   can scan pipes more easily (I don't take advantage of this yet,
   just putting the infrastructure in place)
(This used to be commit c8b8480244b4ab6204403dc65e92e4317b410a84)
This commit is contained in:
Andrew Tridgell 2003-11-28 05:20:11 +00:00
parent d419464d87
commit ba33beec05
17 changed files with 255 additions and 6 deletions

View File

@ -199,7 +199,10 @@ LIBRAW_NDR_OBJ = librpc/ndr/ndr.o librpc/ndr/ndr_basic.o librpc/ndr/ndr_sec.o \
librpc/gen_ndr/ndr_epmapper.o librpc/gen_ndr/ndr_winreg.o \
librpc/gen_ndr/ndr_mgmt.o librpc/gen_ndr/ndr_protected_storage.o \
librpc/gen_ndr/ndr_dcom.o librpc/gen_ndr/ndr_wzcsvc.o \
librpc/gen_ndr/ndr_browser.o
librpc/gen_ndr/ndr_browser.o librpc/gen_ndr/ndr_w32time.o \
librpc/gen_ndr/ndr_scerpc.o librpc/gen_ndr/ndr_ntsvcs.o \
librpc/gen_ndr/ndr_netlogon.o librpc/gen_ndr/ndr_trkwks.o \
librpc/gen_ndr/ndr_keysvc.o
LIBRAW_RPC_OBJ = librpc/rpc/dcerpc.o librpc/rpc/dcerpc_auth.o \
librpc/rpc/dcerpc_util.o \

View File

@ -17,7 +17,7 @@ module_header: '[' <commit> module_param(s? /,/) ']'
}}
| <error?>
module_param: identifier '(' text ')'
module_param: identifier '(' <commit> text ')'
{{ "$item{identifier}" => "$item{text}" }}
| <error>

View File

@ -14,6 +14,10 @@ use client;
my %needed;
my %structs;
my $if_uuid;
my $if_version;
my $if_endpoints;
sub pidl($)
{
print OUT shift;
@ -1281,7 +1285,31 @@ sub FunctionTable($)
}
pidl "\t{ NULL, 0, NULL, NULL }\n};\n\n";
pidl "\nconst struct dcerpc_interface_table dcerpc_table_$interface->{NAME} = {\"$interface->{NAME}\", DCERPC_$uname\_UUID, DCERPC_$uname\_VERSION, $count, $interface->{NAME}\_calls};\n\n";
my $endpoints;
if (! defined $if_endpoints) {
$if_endpoints = $interface->{NAME};
}
pidl "static const struct dcerpc_endpoint_list $interface->{NAME}\_endpoints = {\n";
my @e = split / /, $if_endpoints;
my $endpoint_count = $#e + 1;
pidl "\t$endpoint_count,\n";
pidl "\t{ ";
for (my $i=0; $i < $#e; $i++) {
pidl "\"$e[$i]\", ";
}
pidl "\"$e[$#e]\" }\n";
pidl "};\n\n";
pidl "\nconst struct dcerpc_interface_table dcerpc_table_$interface->{NAME} = {\n";
pidl "\t\"$interface->{NAME}\",\n";
pidl "\tDCERPC_$uname\_UUID,\n";
pidl "\tDCERPC_$uname\_VERSION,\n";
pidl "\t$count,\n";
pidl "\t$interface->{NAME}\_calls,\n";
pidl "\t&$interface->{NAME}\_endpoints\n";
pidl "};\n\n";
}
@ -1388,6 +1416,17 @@ sub BuildNeeded($)
}
}
#####################################################################
# parse the interface definitions
sub ModuleHeader($)
{
my($h) = shift;
$if_uuid = $h->{PROPERTIES}->{uuid};
$if_version = $h->{PROPERTIES}->{version};
$if_endpoints = $h->{PROPERTIES}->{endpoints};
}
#####################################################################
# parse a parsed IDL structure back into an IDL file
sub Parse($$)
@ -1400,6 +1439,9 @@ sub Parse($$)
pidl "/* parser auto-generated by pidl */\n\n";
pidl "#include \"includes.h\"\n\n";
foreach my $x (@{$idl}) {
($x->{TYPE} eq "MODULEHEADER") &&
ModuleHeader($x);
if ($x->{TYPE} eq "INTERFACE") {
BuildNeeded($x);
ParseInterface($x);

View File

@ -0,0 +1,10 @@
[
uuid(6bffd098-a112-3610-9833-012892020162),
version(0.0)
]
interface browser
{
/******************/
/* Function 0x00 */
NTSTATUS browser_Unknown0();
}

View File

@ -0,0 +1,43 @@
/*
this is just a placeholder until we start to support DCOM calls
*/
[
uuid(99fcfec4-5260-101b-bbcb-00aa0021347a),
version(0.0)
]
interface IOXIDResolver
{
/*****************/
/* Function 0x00 */
WERROR ResolveOxid();
}
[
uuid(4d9f4ab8-7d1c-11cf-861e-0020af6e7c57),
version(0.0)
]
interface IRemoteActivation
{
/*****************/
/* Function 0x00 */
NTSTATUS RemoteActivation();
}
[
uuid(000001a0-0000-0000-c000-000000000046),
version(0.0)
]
interface ISystemActivator
{
/*****************/
/* Function 0x00 */
NTSTATUS isa_Unknown0();
}

View File

@ -0,0 +1,15 @@
/*
cryptographic key services interface
*/
[
uuid(8d0ffe72-d252-11d0-bf8f-00c04fd9126b),
version(1.0)
]
interface keysvc
{
/*****************/
/* Function 0x00 */
WERROR keysvc_Unknown0();
}

View File

@ -6,6 +6,7 @@
[ uuid(12345778-1234-abcd-ef00-0123456789ab),
version(0.0),
endpoints(lsarpc lsass),
pointer_default(unique)
] interface lsarpc
{
@ -444,7 +445,20 @@
NTSTATUS UNK_GET_CONNUSER ();
/* Function: 0x2e */
NTSTATUS QUERYINFO2 ();
}
[
uuid(3919286a-b10c-11d0-9ba8-00c04fd92ef5)
version(0.0),
endpoints(lsarpc,lsass),
pointer_default(unique)
]
interface lsads
{
/*****************/
/* Function 0x00 */
lsads_Unknown0();
}

View File

@ -0,0 +1,15 @@
/*
plug and play services?
*/
[
uuid(12345678-1234-abcd-ef00-01234567cffb),
version(1.0)
]
interface netlogon
{
/*****************/
/* Function 0x00 */
WERROR netlogon_Unknown0();
}

View File

@ -0,0 +1,15 @@
/*
plug and play services?
*/
[
uuid(8d9f4e40-a03d-11ce-8f69-08003e30051b),
version(1.0)
]
interface ntsvcs
{
/*****************/
/* Function 0x00 */
WERROR ntsvcs_Unknown0();
}

View File

@ -0,0 +1,15 @@
#include "idl_types.h"
/*
protected_storage interface definitions
*/
[ uuid(e3514235-4b06-11d1-ab04-00c04fc2dcd2),
version(4.0),
pointer_default(unique)
] interface protected_storage
{
/*****************************/
/* Function 0x00 */
WERROR ps_XXX ();
}

View File

@ -0,0 +1,16 @@
/*
security configuration editor interface definitions
*/
[
uuid(93149ca2-973b-11d1-8c39-00c04fb984f9),
version(0.0)
]
interface scerpc
{
/*****************/
/* Function 0x00 */
WERROR scerpc_Unknown0();
}

View File

@ -0,0 +1,15 @@
/*
distributed key tracking services
*/
[
uuid(300f3532-38cc-11d0-a3f0-0020af6b0add),
version(1.2)
]
interface trkwks
{
/*****************/
/* Function 0x00 */
WERROR trkwks_Unknown0();
}

View File

@ -0,0 +1,15 @@
/*
w32time interface definitions
*/
[
uuid(8fb6d884-2388-11d0-8c35-00c04fda2795),
version(4.1)
]
interface w32time
{
/*****************/
/* Function 0x00 */
WERROR w32time_Unknown0();
}

View File

@ -0,0 +1,15 @@
/*
windows zero-configuration service
*/
[
uuid(378e52b0-c0a9-11cf-822d-00aa0051e40f),
version(1.0)
]
interface wzcsvc
{
/*****************/
/* Function 0x00 */
WERROR wzcsvc_Unknown0();
}

View File

@ -76,10 +76,16 @@ struct dcerpc_interface_call {
void (*ndr_print)(struct ndr_print *, const char *, int, void *);
};
struct dcerpc_endpoint_list {
uint32 count;
const char *names[];
};
struct dcerpc_interface_table {
const char *name;
const char *uuid;
uint32 if_version;
uint32 num_calls;
const struct dcerpc_interface_call *calls;
const struct dcerpc_endpoint_list *endpoints;
};

View File

@ -118,6 +118,11 @@ static BOOL test_Map(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
r.out.entry_handle = &handle;
r.in.max_towers = 100;
if (twr->towers.num_floors != 5) {
printf(" tower has %d floors - skipping test_Map\n", twr->towers.num_floors);
return True;
}
uuid_str = GUID_string(mem_ctx, &twr->towers.floors[0].lhs.info.uuid.uuid);
printf("epm_Map results for '%s':\n",

View File

@ -49,11 +49,16 @@ static BOOL test_inq_if_ids(struct dcerpc_pipe *p,
}
for (i=0;i<r.out.if_id_vector->count;i++) {
const char *uuid;
struct dcerpc_syntax_id *id = r.out.if_id_vector->if_id[i].id;
if (!id) continue;
printf("\tuuid %s version 0x%04x:0x%04x\n",
GUID_string(mem_ctx, &id->uuid),
id->major_version, id->minor_version);
uuid = GUID_string(mem_ctx, &id->uuid);
printf("\tuuid %s version 0x%04x:0x%04x '%s'\n",
uuid,
id->major_version, id->minor_version,
idl_pipe_name(uuid, id->major_version));
}
return True;