From 4a3ca96fb44a62867ef565d1eeb6c0a16418e505 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 1 Mar 2005 16:08:36 +0000 Subject: r5603: add "authservice()" property to the interface property list so we can specify allowed target service names in the idl file the default is "host" metze (This used to be commit bf40d5321f3257bf9354a42d31265f1a9b0d53ad) --- source4/build/pidl/ndr.pm | 38 ++++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) (limited to 'source4/build/pidl/ndr.pm') diff --git a/source4/build/pidl/ndr.pm b/source4/build/pidl/ndr.pm index 27f0b87d97..c460c92c95 100644 --- a/source4/build/pidl/ndr.pm +++ b/source4/build/pidl/ndr.pm @@ -2008,18 +2008,40 @@ sub FunctionTable($) pidl ""; pidl "static const struct dcerpc_endpoint_list $interface->{NAME}\_endpoints = {"; - pidl "\t$endpoint_count, $interface->{NAME}\_endpoint_strings"; + pidl "\t.count\t= $endpoint_count,"; + pidl "\t.names\t= $interface->{NAME}\_endpoint_strings"; + pidl "};"; + pidl ""; + + if (! defined $interface->{PROPERTIES}->{authservice}) { + $interface->{PROPERTIES}->{authservice} = "\"host\""; + } + + my @a = split / /, $interface->{PROPERTIES}->{authservice}; + my $authservice_count = $#a + 1; + + pidl "static const char * const $interface->{NAME}\_authservice_strings[] = {"; + foreach my $ap (@a) { + pidl "\t$ap, "; + } + pidl "};"; + pidl ""; + + pidl "static const struct dcerpc_authservice_list $interface->{NAME}\_authservices = {"; + pidl "\t.count\t= $endpoint_count,"; + pidl "\t.names\t= $interface->{NAME}\_authservice_strings"; pidl "};"; pidl ""; pidl "\nconst struct dcerpc_interface_table dcerpc_table_$interface->{NAME} = {"; - pidl "\t\"$interface->{NAME}\","; - pidl "\tDCERPC_$uname\_UUID,"; - pidl "\tDCERPC_$uname\_VERSION,"; - pidl "\tDCERPC_$uname\_HELPSTRING,"; - pidl "\t$count,"; - pidl "\t$interface->{NAME}\_calls,"; - pidl "\t&$interface->{NAME}\_endpoints"; + pidl "\t.name\t\t= \"$interface->{NAME}\","; + pidl "\t.uuid\t\t= DCERPC_$uname\_UUID,"; + pidl "\t.if_version\t= DCERPC_$uname\_VERSION,"; + pidl "\t.helpstring\t= DCERPC_$uname\_HELPSTRING,"; + pidl "\t.num_calls\t= $count,"; + pidl "\t.calls\t\t= $interface->{NAME}\_calls,"; + pidl "\t.endpoints\t= &$interface->{NAME}\_endpoints,"; + pidl "\t.authservices\t= &$interface->{NAME}\_authservices"; pidl "};"; pidl ""; -- cgit