summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-09-07 20:29:03 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:51:17 -0500
commit6ed67b003efb4482d2543314bbc4e9d5e3128d1f (patch)
treeadf9c68e4de0b9297b2dc6ebdc643e45536b2a65
parentc43047009b2f10da077965e36d1123ca818154c8 (diff)
downloadsamba-6ed67b003efb4482d2543314bbc4e9d5e3128d1f.tar.gz
samba-6ed67b003efb4482d2543314bbc4e9d5e3128d1f.tar.bz2
samba-6ed67b003efb4482d2543314bbc4e9d5e3128d1f.zip
r18232: - Trim number of regexes applied to generated files
- Fix syntax error in shell script (refused by dash) - Regenerate output (This used to be commit 4dba965f9aa30eb2a54dc68e1bd5137ec6f5e6be)
-rw-r--r--source3/librpc/gen_ndr/ndr_unixinfo.c102
-rw-r--r--source3/librpc/gen_ndr/ndr_unixinfo.h2
-rw-r--r--source3/librpc/gen_ndr/unixinfo.h2
-rw-r--r--source3/script/build_idl.sh7
4 files changed, 92 insertions, 21 deletions
diff --git a/source3/librpc/gen_ndr/ndr_unixinfo.c b/source3/librpc/gen_ndr/ndr_unixinfo.c
index b26cc339bb..e0ecdfe95e 100644
--- a/source3/librpc/gen_ndr/ndr_unixinfo.c
+++ b/source3/librpc/gen_ndr/ndr_unixinfo.c
@@ -1,21 +1,13 @@
/* parser auto-generated by pidl */
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
+#include "includes.h"
+/* define dummy __attribute__ for systems that don't have it */
+#if !(defined(__GNUC__) || defined(__GNUG__) || defined(__attribute__))
+#define __attribute__(p) /* nothing */
#endif
-
-#include <stdlib.h>
-#include <stdio.h>
-
-#include <stdarg.h>
-#include <string.h>
-#include <core/nterr.h>
-#include <gen_ndr/ndr_misc.h>
-#include <gen_ndr/ndr_dcerpc.h>
#include "librpc/gen_ndr/ndr_unixinfo.h"
-#include <dcerpc.h>
-#include <gen_ndr/ndr_security.h>
+#include "librpc/gen_ndr/ndr_security.h"
NTSTATUS ndr_push_unixinfo_GetPWUidInfo(struct ndr_push *ndr, int ndr_flags, const struct unixinfo_GetPWUidInfo *r)
{
if (ndr_flags & NDR_SCALARS) {
@@ -92,6 +84,7 @@ NTSTATUS ndr_pull_unixinfo_GetPWUidInfo(struct ndr_pull *ndr, int ndr_flags, str
return NT_STATUS_OK;
}
+__attribute__((visibility("default")))
void ndr_print_unixinfo_GetPWUidInfo(struct ndr_print *ndr, const char *name, const struct unixinfo_GetPWUidInfo *r)
{
ndr_print_struct(ndr, name, "unixinfo_GetPWUidInfo");
@@ -148,6 +141,7 @@ NTSTATUS ndr_pull_unixinfo_SidToUid(struct ndr_pull *ndr, int flags, struct unix
return NT_STATUS_OK;
}
+__attribute__((visibility("default")))
void ndr_print_unixinfo_SidToUid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_SidToUid *r)
{
ndr_print_struct(ndr, name, "unixinfo_SidToUid");
@@ -210,6 +204,7 @@ NTSTATUS ndr_pull_unixinfo_UidToSid(struct ndr_pull *ndr, int flags, struct unix
return NT_STATUS_OK;
}
+__attribute__((visibility("default")))
void ndr_print_unixinfo_UidToSid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_UidToSid *r)
{
ndr_print_struct(ndr, name, "unixinfo_UidToSid");
@@ -272,6 +267,7 @@ NTSTATUS ndr_pull_unixinfo_SidToGid(struct ndr_pull *ndr, int flags, struct unix
return NT_STATUS_OK;
}
+__attribute__((visibility("default")))
void ndr_print_unixinfo_SidToGid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_SidToGid *r)
{
ndr_print_struct(ndr, name, "unixinfo_SidToGid");
@@ -334,6 +330,7 @@ NTSTATUS ndr_pull_unixinfo_GidToSid(struct ndr_pull *ndr, int flags, struct unix
return NT_STATUS_OK;
}
+__attribute__((visibility("default")))
void ndr_print_unixinfo_GidToSid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_GidToSid *r)
{
ndr_print_struct(ndr, name, "unixinfo_GidToSid");
@@ -459,6 +456,7 @@ NTSTATUS ndr_pull_unixinfo_GetPWUid(struct ndr_pull *ndr, int flags, struct unix
return NT_STATUS_OK;
}
+__attribute__((visibility("default")))
void ndr_print_unixinfo_GetPWUid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_GetPWUid *r)
{
uint32_t cntr_uids_0;
@@ -515,3 +513,81 @@ void ndr_print_unixinfo_GetPWUid(struct ndr_print *ndr, const char *name, int fl
ndr->depth--;
}
+const struct dcerpc_interface_call unixinfo_calls[] = {
+ {
+ "unixinfo_SidToUid",
+ sizeof(struct unixinfo_SidToUid),
+ (ndr_push_flags_fn_t) ndr_push_unixinfo_SidToUid,
+ (ndr_pull_flags_fn_t) ndr_pull_unixinfo_SidToUid,
+ (ndr_print_function_t) ndr_print_unixinfo_SidToUid,
+ False,
+ },
+ {
+ "unixinfo_UidToSid",
+ sizeof(struct unixinfo_UidToSid),
+ (ndr_push_flags_fn_t) ndr_push_unixinfo_UidToSid,
+ (ndr_pull_flags_fn_t) ndr_pull_unixinfo_UidToSid,
+ (ndr_print_function_t) ndr_print_unixinfo_UidToSid,
+ False,
+ },
+ {
+ "unixinfo_SidToGid",
+ sizeof(struct unixinfo_SidToGid),
+ (ndr_push_flags_fn_t) ndr_push_unixinfo_SidToGid,
+ (ndr_pull_flags_fn_t) ndr_pull_unixinfo_SidToGid,
+ (ndr_print_function_t) ndr_print_unixinfo_SidToGid,
+ False,
+ },
+ {
+ "unixinfo_GidToSid",
+ sizeof(struct unixinfo_GidToSid),
+ (ndr_push_flags_fn_t) ndr_push_unixinfo_GidToSid,
+ (ndr_pull_flags_fn_t) ndr_pull_unixinfo_GidToSid,
+ (ndr_print_function_t) ndr_print_unixinfo_GidToSid,
+ False,
+ },
+ {
+ "unixinfo_GetPWUid",
+ sizeof(struct unixinfo_GetPWUid),
+ (ndr_push_flags_fn_t) ndr_push_unixinfo_GetPWUid,
+ (ndr_pull_flags_fn_t) ndr_pull_unixinfo_GetPWUid,
+ (ndr_print_function_t) ndr_print_unixinfo_GetPWUid,
+ False,
+ },
+ { NULL, 0, NULL, NULL, NULL, False }
+};
+
+const char * const unixinfo_endpoint_strings[] = {
+ "ncacn_np:[\\pipe\\unixinfo]",
+ "ncacn_ip_tcp:",
+ "ncalrpc:",
+};
+
+const struct dcerpc_endpoint_list unixinfo_endpoints = {
+ .count = 3,
+ .names = unixinfo_endpoint_strings
+};
+
+const char * const unixinfo_authservice_strings[] = {
+ "host",
+};
+
+const struct dcerpc_authservice_list unixinfo_authservices = {
+ .count = 3,
+ .names = unixinfo_authservice_strings
+};
+
+
+const struct dcerpc_interface_table dcerpc_table_unixinfo = {
+ .name = "unixinfo",
+ .syntax_id = {
+ {0x9c54e310,0xa955,0x4885,{0xbd,0x31},{0x78,0x78,0x71,0x47,0xdf,0xa6}},
+ DCERPC_UNIXINFO_VERSION
+ },
+ .helpstring = DCERPC_UNIXINFO_HELPSTRING,
+ .num_calls = 5,
+ .calls = unixinfo_calls,
+ .endpoints = &unixinfo_endpoints,
+ .authservices = &unixinfo_authservices
+};
+
diff --git a/source3/librpc/gen_ndr/ndr_unixinfo.h b/source3/librpc/gen_ndr/ndr_unixinfo.h
index d98ff9f15d..94777e53fe 100644
--- a/source3/librpc/gen_ndr/ndr_unixinfo.h
+++ b/source3/librpc/gen_ndr/ndr_unixinfo.h
@@ -5,7 +5,7 @@
#ifndef _HEADER_NDR_unixinfo
#define _HEADER_NDR_unixinfo
-#include <ndr.h>
+#include "librpc/ndr/libndr.h"
#define DCERPC_UNIXINFO_UUID "9c54e310-a955-4885-bd31-78787147dfa6"
#define DCERPC_UNIXINFO_VERSION 0.0
#define DCERPC_UNIXINFO_NAME "unixinfo"
diff --git a/source3/librpc/gen_ndr/unixinfo.h b/source3/librpc/gen_ndr/unixinfo.h
index e5a0471ad5..e648394f60 100644
--- a/source3/librpc/gen_ndr/unixinfo.h
+++ b/source3/librpc/gen_ndr/unixinfo.h
@@ -1,7 +1,5 @@
/* header auto-generated by pidl */
-#include <core.h>
-
#ifndef _HEADER_unixinfo
#define _HEADER_unixinfo
diff --git a/source3/script/build_idl.sh b/source3/script/build_idl.sh
index 2b90d27436..00f03359d4 100644
--- a/source3/script/build_idl.sh
+++ b/source3/script/build_idl.sh
@@ -19,7 +19,7 @@ for f in ${IDL_FILES}; do
basename=`basename $f .idl`
ndr="librpc/gen_ndr/ndr_$basename.c"
- if [ -f $ndr && 0 ]; then
+ if [ -f $ndr ] && false; then
if [ "x`find librpc/idl/$f -newer $ndr -print`" = "xlibrpc/idl/$f" ]; then
list="$list librpc/idl/$f"
fi
@@ -42,10 +42,7 @@ fi
##
for f in librpc/gen_ndr/ndr_*.c; do
- cat $f | sed -e 's/^static //g' \
- -e 's/^_PUBLIC_ //g' \
- -e 's/#include <stdint.h>//g' \
- -e 's/#include <stdbool.h>//g' > $f.new
+ cat $f | sed -e 's/^static //g' > $f.new
/bin/mv -f $f.new $f
done