summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-01-25 02:59:13 +0000
committerJeremy Allison <jra@samba.org>2001-01-25 02:59:13 +0000
commit5aef8a21c6e3cd690afb11d2d69d2e9bac25b6b4 (patch)
tree4b67843670c57ab03153afb8095d50046f63e43f /source3/smbd
parentcf90dbd158de152221f294c478cd4f7ba44cdb5c (diff)
downloadsamba-5aef8a21c6e3cd690afb11d2d69d2e9bac25b6b4.tar.gz
samba-5aef8a21c6e3cd690afb11d2d69d2e9bac25b6b4.tar.bz2
samba-5aef8a21c6e3cd690afb11d2d69d2e9bac25b6b4.zip
Fixes from appliance-head for pdc searches.
Jeremy. (This used to be commit d04ed97ecab846def8467f313a71ef0e5c4005f6)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/password.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/source3/smbd/password.c b/source3/smbd/password.c
index 69ba042155..cdf3e28b03 100644
--- a/source3/smbd/password.c
+++ b/source3/smbd/password.c
@@ -1211,16 +1211,31 @@ use this machine as the password server.\n"));
given a name or IP address.
************************************************************************/
-static BOOL connect_to_domain_password_server(struct cli_state *pcli, char *remote_machine,
+static BOOL connect_to_domain_password_server(struct cli_state *pcli,
+ char *server,
unsigned char *trust_passwd)
{
struct in_addr dest_ip;
+ fstring remote_machine;
if(cli_initialise(pcli) == False) {
DEBUG(0,("connect_to_domain_password_server: unable to initialize client connection.\n"));
return False;
}
+ if (is_ipaddress(server)) {
+ struct in_addr to_ip;
+
+ if (!inet_aton(server, &to_ip) ||
+ !name_status_find(0x20, to_ip, remote_machine)) {
+ DEBUG(1, ("connect_to_domain_password_server: Can't "
+ "resolve name for IP %s\n", server));
+ return False;
+ }
+ } else {
+ fstrcpy(remote_machine, server);
+ }
+
standard_sub_basic(remote_machine);
strupper(remote_machine);