summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd_misc.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-01-10 11:28:14 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-01-10 11:28:14 +0000
commit7d6dd0b3a0f6d1c7f2737f90e3099a21bf4a55b5 (patch)
treeb2564eee672dc14c121662c9f2da120e7efbbfcd /source3/nsswitch/winbindd_misc.c
parentcf00e41421793d042f24d0b0ecf47237a3cfc7c2 (diff)
downloadsamba-7d6dd0b3a0f6d1c7f2737f90e3099a21bf4a55b5.tar.gz
samba-7d6dd0b3a0f6d1c7f2737f90e3099a21bf4a55b5.tar.bz2
samba-7d6dd0b3a0f6d1c7f2737f90e3099a21bf4a55b5.zip
Return the winbind separator over the socket, so programs don't have to parse
smb.conf to get it right. While wb_client needs its lp_load() for samba dependency reasons, it now uses the new method both to example and test the new code. Also add an interface version function, and return the winbind's samba version string. In preperation for default domains, its now up to winbindd to reject plaintext auths that don't have a seperator, but NTLM (CRAP) auths now have two feilds, hence need parsing. Andrew Bartlett (This used to be commit 2bd2a092ee3d49a74d896385688d7c7256aa297e)
Diffstat (limited to 'source3/nsswitch/winbindd_misc.c')
-rw-r--r--source3/nsswitch/winbindd_misc.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/source3/nsswitch/winbindd_misc.c b/source3/nsswitch/winbindd_misc.c
index 2cfea9bbb6..d820bb35dc 100644
--- a/source3/nsswitch/winbindd_misc.c
+++ b/source3/nsswitch/winbindd_misc.c
@@ -4,7 +4,8 @@
Winbind daemon - miscellaneous other functions
- Copyright (C) Tim Potter 2000
+ Copyright (C) Tim Potter 2000
+ Copyright (C) Andrew Bartlett 2002
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
@@ -149,3 +150,28 @@ enum winbindd_result winbindd_ping(struct winbindd_cli_state
return WINBINDD_OK;
}
+
+/* List various tidbits of information */
+
+enum winbindd_result winbindd_info(struct winbindd_cli_state *state)
+{
+
+ DEBUG(3, ("[%5d]: request misc info\n", state->pid));
+
+ state->response.data.info.winbind_separator = *lp_winbind_separator();
+ fstrcpy(state->response.data.info.samba_version, VERSION);
+
+ return WINBINDD_OK;
+}
+
+/* List various tidbits of information */
+
+enum winbindd_result winbindd_interface_version(struct winbindd_cli_state *state)
+{
+
+ DEBUG(3, ("[%5d]: request interface version\n", state->pid));
+
+ state->response.data.interface_version = WINBIND_INTERFACE_VERSION;
+
+ return WINBINDD_OK;
+}