Bug 7563 - smbclient - symlink command
Summary: smbclient - symlink command
Alias: None
Product: Samba 3.5
Classification: Unclassified
Component: Client Tools (show other bugs)
Version: 3.5.4
Hardware: x64 Linux
: P3 normal
Target Milestone: ---
Assignee: Jeremy Allison
QA Contact: Samba QA Contact
Depends on:
Reported: 2010-07-08 23:40 UTC by David Rezac
Modified: 2010-08-16 18:34 UTC (History)
0 users

See Also:

git am fix for 3.5.x. (2.04 KB, patch)
2010-08-16 18:34 UTC, Jeremy Allison
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Rezac 2010-07-08 23:40:10 UTC
Creation of symlink using smbclient is buggy. The smbclient version 3.5.4 prepends a substring containing initial directory in the symlink (and the symlink is not working as a result).

/usr/bin/smbclient '//DATASERVER/D/'  -U 'david.rezac' -d0 -D "start/" \
    -c 'symlink "../../../07-XYZ/10-07-10-asdfg/" \
                "start/2010/04-abcd/10-04-13/7-XYZ/10-07-10-asdfg/" '

creates this:
(ls -L at the server, in directory start/2010/04-abcd/10-04-13/7-XYZ/)

lrwxrwxrwx 1 david.rezac users 44 2010-07-09 06:24 
         10-07-10-asdfg -> \start\../../../07-XYZ/10-07-10-asdfg/

Note extra "\start\" in the symlink. Even when the initial directory is not specified, extra "\" is prepended.

The smb command to create symlink sent over network by smbclient already contains the bad string. However, the creation is completed "sucessfully".

When I use smbclient version 3.0.26, symlink creation is working as expected.
Comment 1 Jeremy Allison 2010-08-16 18:34:33 UTC
Created attachment 5907 [details]
git am fix for 3.5.x.

Can you please test this fix. I think it should solve the problem.