[Samba] Change in smbclient between 3.0.24 and 3.0.25c breaks third party app

Felix Leimbach felix.leimbach at gmx.net
Wed Nov 28 08:32:45 GMT 2007


Hello list,

A change in smbclient between 3.0.24 and 3.0.25c breaks [1] the gollem 
filemanager [2] and maybe others.

In particular folder creation is broken unless the folder is a top level 
folder on the share.
To create a subfolder "level2" in the folder /level1 of a share gollem 
executes this command:
/usr/bin/smbclient "//1.2.3.4/sharename" "-p139" "-Uusername" -D 
"/level1" -I 1.2.3.4 -c "mkdir \"level2\";"

With samba-3.0.24 and lower this creates the folder /level1/level2 as 
expected.
With samba-3.0.25c and higher it instead creates the folder /levevl1level2

Changing the smbclient command to:
/usr/bin/smbclient "//1.2.3.4/sharename" "-p139" "-Uusername" -D 
"/level1/" -I 1.2.3.4 -c "mkdir \"level2\";"
makes smbclient behave as expected.

Deletion of folders is also broken in gollem starting with samba-3.0.25c 
but has not yet been tracked down to the exact smbclient command line.
This smbclient change requires adjusting client applications and the 
gollem developers already indicated they are not eager doing that.

Can anyone confirm whether this change in smbclient was intended or 
whether it is a bug?
The samba changelog for 3.0.25 [3] mentions "Add smbclient 
implementations of POSIX open/mkdir/unlink/rmdir", which I guess

Cheers
Felix

[1] Gollem bugreport: http://bugs.horde.org/ticket/?id=5931
[2] http://www.horde.org/gollem
[3] http://us3.samba.org/samba/history/samba-3.0.25.html

PS:
The man page of smbclient states for the -D option: "Change to initial 
directory before starting. Probably only of any use with the tar -T option."
To me the second sentence sounds wrong to me. Patch below for removing it:

--- smbclient.1.old     2007-11-28 09:30:00.000000000 +0100
+++ smbclient.1 2007-11-28 09:30:03.000000000 +0100
@@ -451,7 +451,7 @@
 .PP
 -D initial directory
 .RS 3n
-Change to initial directory before starting. Probably only of any use 
with the tar -T option.
+Change to initial directory before starting.
 .RE
 .PP
 -c command string


More information about the samba mailing list