summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2014-05-08 14:46:06 +1200
committerAndrew Bartlett <abartlet@samba.org>2014-06-11 10:18:26 +0200
commitfaa4452df7f2add0b4b583a25365b43da8ec1305 (patch)
tree6ba3da1e4ed07bb9f98679411444a0bc8b0e8815
parentf4ab082d2b984b7deb3afbc7a26e238aa5b3b8c3 (diff)
downloadsamba-faa4452df7f2add0b4b583a25365b43da8ec1305.tar.gz
samba-faa4452df7f2add0b4b583a25365b43da8ec1305.tar.xz
samba-faa4452df7f2add0b4b583a25365b43da8ec1305.zip
s3-winbind rename winbindd_update_rodc_dns to be for more generic irpc
Change-Id: I385ef8bd766848becc42e58694207dc94cd07a89 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
-rw-r--r--source3/winbindd/winbindd.c7
-rw-r--r--source3/winbindd/winbindd_irpc.c (renamed from source3/winbindd/winbindd_update_rodc_dns.c)12
-rw-r--r--source3/winbindd/winbindd_proto.h7
-rwxr-xr-xsource3/wscript_build2
4 files changed, 17 insertions, 11 deletions
diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c
index b9bf8be812a..cb6164674f0 100644
--- a/source3/winbindd/winbindd.c
+++ b/source3/winbindd/winbindd.c
@@ -42,7 +42,6 @@
#include "source4/lib/messaging/irpc.h"
#include "source4/lib/messaging/messaging.h"
#include "lib/param/param.h"
-#include "librpc/gen_ndr/ndr_winbind.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND
@@ -1248,10 +1247,10 @@ static void winbindd_register_handlers(struct messaging_context *msg_ctx,
}
}
- status = IRPC_REGISTER(winbind_imessaging_context(), winbind, WINBIND_DSRUPDATEREADONLYSERVERDNSRECORDS,
- wb_irpc_DsrUpdateReadOnlyServerDnsRecords, NULL);
+ status = wb_irpc_register();
+
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0, ("Could not register IRPC handler for wb_irpc_DsrUpdateReadOnlyServerDnsRecords\n"));
+ DEBUG(0, ("Could not register IRPC handlers\n"));
exit(1);
}
}
diff --git a/source3/winbindd/winbindd_update_rodc_dns.c b/source3/winbindd/winbindd_irpc.c
index 9c13c063004..e5aa53ffad4 100644
--- a/source3/winbindd/winbindd_update_rodc_dns.c
+++ b/source3/winbindd/winbindd_irpc.c
@@ -1,8 +1,9 @@
/*
Unix SMB/CIFS implementation.
- async implementation of WINBINDD_CHANGE_MACHINE_ACCT
+ async implementation of commands submitted over IRPC
Copyright (C) Volker Lendecke 2009
Copyright (C) Guenther Deschner 2009
+ Copyright (C) Andrew Bartlett 2014
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -22,6 +23,7 @@
#include "winbindd.h"
#include "librpc/gen_ndr/ndr_winbind_c.h"
#include "source4/lib/messaging/irpc.h"
+#include "librpc/gen_ndr/ndr_winbind.h"
struct wb_irpc_DsrUpdateReadOnlyServerDnsRecords_state {
struct irpc_message *msg;
@@ -82,3 +84,11 @@ static void wb_irpc_DsrUpdateReadOnlyServerDnsRecords_callback(struct tevent_req
irpc_send_reply(s->msg, status);
}
+
+NTSTATUS wb_irpc_register(void)
+{
+ NTSTATUS status;
+ status = IRPC_REGISTER(winbind_imessaging_context(), winbind, WINBIND_DSRUPDATEREADONLYSERVERDNSRECORDS,
+ wb_irpc_DsrUpdateReadOnlyServerDnsRecords, NULL);
+ return status;
+}
diff --git a/source3/winbindd/winbindd_proto.h b/source3/winbindd/winbindd_proto.h
index 7f3eb92e0cb..540a99ab43a 100644
--- a/source3/winbindd/winbindd_proto.h
+++ b/source3/winbindd/winbindd_proto.h
@@ -908,9 +908,6 @@ NTSTATUS open_internal_samr_conn(TALLOC_CTX *mem_ctx,
/* The following definitions come from winbindd/winbindd_ads.c */
ADS_STATUS ads_idmap_cached_connection(ADS_STRUCT **adsp, const char *dom_name);
-/* The following definitions come from winbindd/winbindd_update_rodc_dns.c */
-struct irpc_message;
-struct winbind_DsrUpdateReadOnlyServerDnsRecords;
-NTSTATUS wb_irpc_DsrUpdateReadOnlyServerDnsRecords(struct irpc_message *msg,
- struct winbind_DsrUpdateReadOnlyServerDnsRecords *req);
+/* The following definitions come from winbindd/winbindd_irpc.c */
+NTSTATUS wb_irpc_register(void);
#endif /* _WINBINDD_PROTO_H_ */
diff --git a/source3/wscript_build b/source3/wscript_build
index c3cfdb9b673..12817d360c2 100755
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -943,7 +943,7 @@ bld.SAMBA3_BINARY('winbindd/winbindd',
winbindd/winbindd_list_groups.c
winbindd/winbindd_check_machine_acct.c
winbindd/winbindd_change_machine_acct.c
- winbindd/winbindd_update_rodc_dns.c
+ winbindd/winbindd_irpc.c
winbindd/winbindd_ping_dc.c
winbindd/winbindd_pam_auth.c
winbindd/winbindd_pam_logoff.c