[Pkg-samba-maint] Bug#491881: smbclient: patch for client/smbspool.c to restore previous behavior
Florian Kulzer
florian.kulzer+debian at icfo.es
Wed Jul 23 20:21:12 UTC 2008
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;
}
/*
More information about the Pkg-samba-maint
mailing list