The Samba-Bugzilla – Bug 6161
smbclient corrupts source path in tar mode
Last modified: 2009-08-23 02:39:23 UTC
Using BackupPC and smbclient to pull files from hosts for backup. Isolated a problem to smbclient corrupting the source path that BackupPC is specifying to it.
For example, if I issue the command:
/usr/bin/smbclient \\\\buster\\C\$ -U dvsing -E -d 2 -c tarmode\ full -Tc t.tar 'Documents and Settings\Administrator\My Documents\*'
I get the output:
added interface eth2 ip=fe80::221:85ff:fe64:3fcf%eth2 bcast=fe80::ffff:ffff:ffff:ffff%eth2 netmask=ffff:ffff:ffff:ffff::
added interface eth2:0 ip=192.168.0.1 bcast=192.168.0.255 netmask=255.255.255.0
added interface lo ip=::1 bcast=::1 netmask=ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
added interface lo ip=127.0.0.1 bcast=127.255.255.255 netmask=255.0.0.0
tdb(unnamed): tdb_open_ex: could not open file /var/lib/samba/gencache.tdb: Permission denied
Got a positive name query response from 127.0.0.1 ( 192.168.0.200 )
Enter dvsing's password:
Domain=[BUSTER] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
tarmode is now full, system, hidden, noreset, verbose
directory \Documents and Settings\Administrator\My Documents\My Documents\
NT_STATUS_OBJECT_NAME_NOT_FOUND listing \Documents and Settings\Administrator\My Documents\My Documents\*
tar: dumped 1 files and directories
Total bytes written: 0
Notice that "My Documents" appears twice (My Documents\My Documents) in the path that's in the debug output. It was only specified once in the source path.
This bug breaks (among other things) BackupPC's ability to run backups over smb.
Can you try and reproduce this with 3.3.1 please ? That's the current stable release tree and will tell me if we've already fixed it in later code.
I'm using Fedora Core 10, so 3.2.8 is the current working version for FC10 although I do understand you've moved on to 3.3.x.
I'll try and get my hands on the fc11 3.3.1 RPM...
reassign to default assignee
Reproduced with master. No patch yet, looking at it.
Thanks for the report,
Created attachment 3979 [details]
Patch for 3.2.x
Patch for 3.2.x (should apply also to 3.3.x and above). This was my fault. I broke the argument processing in creating the string for chdir when removing pstrings. This fixes it again. Sorry about that.
Thanks for fixing this so quickly.
Hopefully the ones that maintain the fc10 repository will grab onto this fix and release a new RPM soon.
Is 3.2.8 the final version for the 3.2 series?
We might do another one once pressure of patches builds up, but this has also gone into the 3.3.x tree as the problem still exists there and will be in 3.3.2 (due soon-ish).
Bug Simo or Guenther (Samba Team @ RedHat) to get this into FC.
Dan, can you please open a Bug on RH BZ simply pointing to this one ? Then I can provide an update for F10. Thanks.
Closing, as Samba rpms containing this fix are provided now in Fedora testing.
*** Bug 5921 has been marked as a duplicate of this bug. ***