summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-01-28 12:07:02 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-01-28 12:07:02 +0000
commit1cba0a757970ffd8b81d61c88965010968ab3eff (patch)
treed776df92ed188a6818033b1dc1f1b3eadc22fe1e /source3/nsswitch
parent23265259508e2a89c0386608c5f034fac635ca62 (diff)
downloadsamba-1cba0a757970ffd8b81d61c88965010968ab3eff.tar.gz
samba-1cba0a757970ffd8b81d61c88965010968ab3eff.tar.bz2
samba-1cba0a757970ffd8b81d61c88965010968ab3eff.zip
Merge from HEAD:
- NTLMSSP over SPENGO (sesssion-setup-and-x) cleanup and code refactor. - also consequential changes to the NTLMSSP and SPNEGO parsing functions - and the client code that uses the same functions - Add ntlm_auth, a NTLMSSP authentication interface for use by applications like Squid and Apache. - also consquential changes to use common code for base64 encode/decode. - Winbind changes to support ntlm_auth (I don't want this program to need to read smb.conf, instead getting all it's details over the pipe). - nmbd changes for fstrcat() instead of fstrcpy(). Andrew Bartlett (This used to be commit fbb46da79cf322570a7e3318100c304bbf33409e)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/winbindd.c1
-rw-r--r--source3/nsswitch/winbindd_misc.c12
-rw-r--r--source3/nsswitch/winbindd_nss.h4
3 files changed, 16 insertions, 1 deletions
diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c
index e1bb7179e5..b70a4dd3b4 100644
--- a/source3/nsswitch/winbindd.c
+++ b/source3/nsswitch/winbindd.c
@@ -264,6 +264,7 @@ static struct dispatch_table dispatch_table[] = {
{ WINBINDD_INFO, winbindd_info, "INFO" },
{ WINBINDD_INTERFACE_VERSION, winbindd_interface_version, "INTERFACE_VERSION" },
{ WINBINDD_DOMAIN_NAME, winbindd_domain_name, "DOMAIN_NAME" },
+ { WINBINDD_NETBIOS_NAME, winbindd_netbios_name, "NETBIOS_NAME" },
/* WINS functions */
diff --git a/source3/nsswitch/winbindd_misc.c b/source3/nsswitch/winbindd_misc.c
index 6b7ef382dd..0b283812b2 100644
--- a/source3/nsswitch/winbindd_misc.c
+++ b/source3/nsswitch/winbindd_misc.c
@@ -221,3 +221,15 @@ enum winbindd_result winbindd_domain_name(struct winbindd_cli_state *state)
return WINBINDD_OK;
}
+
+/* What's my name again? */
+
+enum winbindd_result winbindd_netbios_name(struct winbindd_cli_state *state)
+{
+
+ DEBUG(3, ("[%5d]: request netbios name\n", state->pid));
+
+ fstrcpy(state->response.data.netbios_name, global_myname());
+
+ return WINBINDD_OK;
+}
diff --git a/source3/nsswitch/winbindd_nss.h b/source3/nsswitch/winbindd_nss.h
index 5c2db2ac2c..2c87a77100 100644
--- a/source3/nsswitch/winbindd_nss.h
+++ b/source3/nsswitch/winbindd_nss.h
@@ -36,7 +36,7 @@
/* Update this when you change the interface. */
-#define WINBIND_INTERFACE_VERSION 6
+#define WINBIND_INTERFACE_VERSION 7
/* Socket commands */
@@ -102,6 +102,7 @@ enum winbindd_cmd {
/* this is like GETGRENT but gives an empty group list */
WINBINDD_GETGRLST,
+ WINBINDD_NETBIOS_NAME, /* The netbios name of the server */
/* Placeholder for end of cmd list */
WINBINDD_NUM_CMDS
@@ -221,6 +222,7 @@ struct winbindd_response {
fstring samba_version;
} info;
fstring domain_name;
+ fstring netbios_name;
struct auth_reply {
uint32 nt_status;