summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2007-08-31 15:24:43 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:30:27 -0500
commitac3f2e784f818fb06b20b053cf4127d331e8f63c (patch)
tree7759de16715cbe6c394c7704f7fefbbf29d2e2e9 /source3/nsswitch
parent51e5001cba2ae438674517371d29ae7f78c0a52a (diff)
downloadsamba-ac3f2e784f818fb06b20b053cf4127d331e8f63c.tar.gz
samba-ac3f2e784f818fb06b20b053cf4127d331e8f63c.tar.bz2
samba-ac3f2e784f818fb06b20b053cf4127d331e8f63c.zip
r24843: Add a "validate-cache" control message to winbindd.
So there is a new subcommand "smbcontrol winbindd validate-cache" now. This change provides the infrastructure: The function currently returns "true" unconditionally. The call of a real cache validation function will be incorporated in subsequent changes. Michael (This used to be commit ef92d505c04397614cb0dd5ede967e9017a5e302)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/winbindd.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c
index d7368a3d34..913ad04c6d 100644
--- a/source3/nsswitch/winbindd.c
+++ b/source3/nsswitch/winbindd.c
@@ -202,6 +202,28 @@ static void msg_shutdown(struct messaging_context *msg,
do_sigterm = True;
}
+
+static void winbind_msg_validate_cache(struct messaging_context *msg_ctx,
+ void *private_data,
+ uint32_t msg_type,
+ struct server_id server_id,
+ DATA_BLOB *data)
+{
+ uint8 ret;
+
+ DEBUG(10, ("winbindd_msg_validate_cache: got validate-cache "
+ "message.\n"));
+
+#if 0
+ ret = (uint8)winbindd_validate_cache_nobackup();
+ DEBUG(10, ("winbindd_msg_validata_cache: got return value %d\n", ret));
+#else
+ ret = 0;
+#endif
+ messaging_send_buf(msg_ctx, server_id, MSG_WINBIND_VALIDATE_CACHE, &ret,
+ (size_t)1);
+}
+
static struct winbindd_dispatch_table {
enum winbindd_cmd cmd;
void (*fn)(struct winbindd_cli_state *state);
@@ -1170,6 +1192,10 @@ int main(int argc, char **argv, char **envp)
messaging_register(winbind_messaging_context(), NULL,
MSG_DUMP_EVENT_LIST, winbind_msg_dump_event_list);
+ messaging_register(winbind_messaging_context(), NULL,
+ MSG_WINBIND_VALIDATE_CACHE,
+ winbind_msg_validate_cache);
+
netsamlogon_cache_init(); /* Non-critical */
/* clear the cached list of trusted domains */