summaryrefslogtreecommitdiff
path: root/source3/lib/netapi/netapi_private.h
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-08-12 15:25:06 +0200
committerGünther Deschner <gd@samba.org>2008-08-14 12:22:02 +0200
commit87b9c9ade21a68d4428ff4aadd32f02f86e78a40 (patch)
tree54daeef1faa31c9f6ac5fc6743c5747ae72d4a44 /source3/lib/netapi/netapi_private.h
parenta810cc865d40aff7dbe123ac5217d8b4b38c95e5 (diff)
downloadsamba-87b9c9ade21a68d4428ff4aadd32f02f86e78a40.tar.gz
samba-87b9c9ade21a68d4428ff4aadd32f02f86e78a40.tar.bz2
samba-87b9c9ade21a68d4428ff4aadd32f02f86e78a40.zip
netapi: make non-implemented local calls default to remote "localhost" calls.
Guenther (cherry picked from commit aa70e588803e3767796dc958b139f4ee464d8626) (This used to be commit 9927ac6eec9fe1fecfedb97b61c4f93379fc8722)
Diffstat (limited to 'source3/lib/netapi/netapi_private.h')
-rw-r--r--source3/lib/netapi/netapi_private.h7
1 files changed, 7 insertions, 0 deletions
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;