summaryrefslogtreecommitdiff
path: root/source4/build/pidl
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-03-01 16:08:36 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:10:55 -0500
commit4a3ca96fb44a62867ef565d1eeb6c0a16418e505 (patch)
treeb5c37a846d03bc3fb6e36f02c4ca34b45dfdee5c /source4/build/pidl
parent70f7c56168056c025c6931ce6e934203a5c2c9dc (diff)
downloadsamba-4a3ca96fb44a62867ef565d1eeb6c0a16418e505.tar.gz
samba-4a3ca96fb44a62867ef565d1eeb6c0a16418e505.tar.bz2
samba-4a3ca96fb44a62867ef565d1eeb6c0a16418e505.zip
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)
Diffstat (limited to 'source4/build/pidl')
-rw-r--r--source4/build/pidl/ndr.pm38
1 files changed, 30 insertions, 8 deletions
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 "";