From 87b9c9ade21a68d4428ff4aadd32f02f86e78a40 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 12 Aug 2008 15:25:06 +0200 Subject: netapi: make non-implemented local calls default to remote "localhost" calls. Guenther (cherry picked from commit aa70e588803e3767796dc958b139f4ee464d8626) (This used to be commit 9927ac6eec9fe1fecfedb97b61c4f93379fc8722) --- source3/lib/netapi/netapi_private.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source3/lib/netapi/netapi_private.h') diff --git a/source3/lib/netapi/netapi_private.h b/source3/lib/netapi/netapi_private.h index ef6e7cf2b7..5c60e994b1 100644 --- a/source3/lib/netapi/netapi_private.h +++ b/source3/lib/netapi/netapi_private.h @@ -20,6 +20,13 @@ #ifndef __LIB_NETAPI_PRIVATE_H__ #define __LIB_NETAPI_PRIVATE_H__ +#define LIBNETAPI_REDIRECT_TO_LOCALHOST(ctx, r, fn) \ + DEBUG(10,("redirecting call %s to localhost\n", #fn)); \ + if (!r->in.server_name) { \ + r->in.server_name = "localhost"; \ + } \ + return fn ## _r(ctx, r); + struct libnetapi_private_ctx { struct { const char *domain_name; -- cgit