Package: smbclient
Version: 2:3.2.0-4
Followup-For: Bug #491881
Tags: patch
The "try port 445, then 139" behavior is hardcoded in cli_connect() of
libsmbclient (libsmb/cliconnect.c:1543-1552); it is triggered by calling
cli_connect() with port=0. If port!=0 then cli_connect() only tries to
connect on that one port and does not fall back onto the defaults.
The old version of smbspool set port=0 if no port was specified in the
DevieURI. The new version sets port=445 in this case, therefore
cli_connect() does not try 139 anymore if the connection fails on 445.
This patch restores the old behavior (tested on up-to-date Sid/amd64):
--- a/source/client/smbspool.c 2008-07-01 14:33:07.000000000 +0200
+++ b/source/client/smbspool.c 2008-07-23 21:19:30.000000000 +0200
@@ -233,7 +233,7 @@
port = atoi(sep);
} else {
- port = 445;
+ port = 0;
}
/*
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]