summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-12-03 23:36:53 +0000
committerLuke Leighton <lkcl@samba.org>1999-12-03 23:36:53 +0000
commit0ca1f87930a57dfd2510b98443423d8a67cfa70b (patch)
tree3017e6ef3204c58314f8dae4a9042d963a5979fd /source3/libsmb
parentc2a3b11b0738f57accafe19c84b682f761fa9631 (diff)
downloadsamba-0ca1f87930a57dfd2510b98443423d8a67cfa70b.tar.gz
samba-0ca1f87930a57dfd2510b98443423d8a67cfa70b.tar.bz2
samba-0ca1f87930a57dfd2510b98443423d8a67cfa70b.zip
argh! smb-agent redirection client reusage is a nightmare!
moved smb-agent over to a single-process model instead of fork() in order to reuse client connections. except, of course, you can't do a select() on the same socket connections! argh! (This used to be commit e9e5a34de8e8f9a69e817aceb8c16284334d4642)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/clientgen.c9
-rw-r--r--source3/libsmb/pwd_cache.c10
2 files changed, 16 insertions, 3 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index 3695680301..985d1c496d 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -2960,7 +2960,7 @@ static int cli_init_redirect(struct cli_state *cli,
char *in = cli->inbuf;
char *out = cli->outbuf;
- slprintf(path, sizeof(path)-1, "/tmp/smb-agent/smb.%d", getuid());
+ slprintf(path, sizeof(path)-1, "/tmp/.smb.%d/agent", getuid());
if (strequal(srv_name, "*SMBSERVER"))
{
@@ -3023,8 +3023,10 @@ static int cli_init_redirect(struct cli_state *cli,
len = PTR_DIFF(p, data);
SIVAL(data, 0, len);
- printf("data len: %d\n", len);
- out_data(stdout, data, len, 80);
+#ifdef DEBUG_PASSWORD
+ DEBUG(100,("data len: %d\n", len));
+ dump_data(100, data, len);
+#endif
if (write(sock, data, len) <= 0)
{
@@ -3046,6 +3048,7 @@ static int cli_init_redirect(struct cli_state *cli,
cli->inbuf = in;
cli->outbuf = out;
cli->fd = sock;
+ cli->usr.reuse = False;
return sock;
}
diff --git a/source3/libsmb/pwd_cache.c b/source3/libsmb/pwd_cache.c
index dd42114343..29cf77dd55 100644
--- a/source3/libsmb/pwd_cache.c
+++ b/source3/libsmb/pwd_cache.c
@@ -97,12 +97,22 @@ BOOL pwd_compare(struct pwd_info *pwd1, struct pwd_info *pwd2)
if (!pwd1->null_pwd && !pwd2->null_pwd &&
!pwd1->cleartext && !pwd2->cleartext)
{
+#ifdef DEBUG_PASSWORD
+ DEBUG(100,("pwd compare: nt#\n"));
+ dump_data(100, pwd1->smb_nt_pwd, 16);
+ dump_data(100, pwd2->smb_nt_pwd, 16);
+#endif
if (memcmp(pwd1->smb_nt_pwd, pwd2->smb_nt_pwd, 16) == 0)
{
pwd_obfuscate(pwd1);
pwd_obfuscate(pwd2);
return True;
}
+#ifdef DEBUG_PASSWORD
+ DEBUG(100,("pwd compare: lm#\n"));
+ dump_data(100, pwd1->smb_lm_pwd, 16);
+ dump_data(100, pwd2->smb_lm_pwd, 16);
+#endif
if (memcmp(pwd1->smb_lm_pwd, pwd2->smb_lm_pwd, 16) == 0)
{
pwd_obfuscate(pwd1);