summaryrefslogtreecommitdiffstats
path: root/source/libsmb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-12-03 20:53:48 +0000
committerJeremy Allison <jra@samba.org>1998-12-03 20:53:48 +0000
commit469f99d9c3ae5a3dca105ccee86c1ce7d17cae4d (patch)
tree851812e9eefb11445ff3ee61e9ea077347eb393b /source/libsmb
parenta821674274b84bd73c6de053a70b8e09a5cd2f0a (diff)
downloadsamba-469f99d9c3ae5a3dca105ccee86c1ce7d17cae4d.tar.gz
samba-469f99d9c3ae5a3dca105ccee86c1ce7d17cae4d.tar.xz
samba-469f99d9c3ae5a3dca105ccee86c1ce7d17cae4d.zip
config.guess: UNIXWARE fix.
lib/util.c: Debug messages for getrlim/setrlim calls. libsmb/clientgen.c: Added session redirect code back in. smbd/nttrans.c smbd/pipes.c: Correct fix for NT printer problem - catches openX as well as nttrans open. Jeremy.
Diffstat (limited to 'source/libsmb')
-rw-r--r--source/libsmb/clientgen.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/source/libsmb/clientgen.c b/source/libsmb/clientgen.c
index c9d221bd337..3e8932d51f9 100644
--- a/source/libsmb/clientgen.c
+++ b/source/libsmb/clientgen.c
@@ -26,7 +26,7 @@
extern int DEBUGLEVEL;
-
+extern pstring user_socket_options;
/****************************************************************************
recv an smb
@@ -2312,6 +2312,35 @@ retry:
if (!cli_receive_smb(cli))
return False;
+ if (CVAL(cli->inbuf,0) == 0x84) {
+ /* C. Hoch 9/14/95 Start */
+ /* For information, here is the response structure.
+ * We do the byte-twiddling to for portability.
+ struct RetargetResponse{
+ unsigned char type;
+ unsigned char flags;
+ int16 length;
+ int32 ip_addr;
+ int16 port;
+ };
+ */
+ int port = (CVAL(cli->inbuf,8)<<8)+CVAL(cli->inbuf,9);
+ /* SESSION RETARGET */
+ putip((char *)&cli->dest_ip,cli->inbuf+4);
+
+ close_sockets();
+ cli->fd = open_socket_out(SOCK_STREAM, &cli->dest_ip, port, LONG_CONNECT_TIMEOUT);
+ if (cli->fd == -1)
+ return False;
+
+ DEBUG(3,("Retargeted\n"));
+
+ set_socket_options(cli->fd,user_socket_options);
+
+ /* Try again */
+ return cli_session_request(cli, calling, called);
+ } /* C. Hoch 9/14/95 End */
+
#ifdef WITH_SSL
if (CVAL(cli->inbuf,0) == 0x83 && CVAL(cli->inbuf,4) == 0x8e){ /* use ssl */
if (!sslutil_fd_is_ssl(cli->fd)){