Bug 5921 - builtin tar command brakes given path
Summary: builtin tar command brakes given path
Status: RESOLVED DUPLICATE of bug 6161
Alias: None
Product: Samba 3.2
Classification: Unclassified
Component: Client tools (show other bugs)
Version: 3.2.4
Hardware: x86 Linux
: P3 normal
Target Milestone: ---
Assignee: Volker Lendecke
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-25 10:27 UTC by Guillaume
Modified: 2009-08-23 02:39 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Guillaume 2008-11-25 10:27:42 UTC
Hello,

We updated our server a while ago, updating samba from 3.0.x to 3.2.4.
Since this update, it seems the tar feature in smbclient or smbtar brakes the path we are giving to it.
Basicaly, it seems it screw a path like "/path/to/file/" to "/path/to/to/".
We tried many different way to give it path (quoted, with /, with \ escaping spaces, old DOS format like /Docum~1/joanne/Applic~1...) without success.

I spend some time on IRC trying to find out the pb with people there, but with no success as well. So here is my bug report.

Here is a sample session, showing the error and the proof the directory we are trying to tar is actually existing :
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# /usr/bin/smbclient //carl/C\$ password  -p 445 -U backup -W DOM -E -d1 -c tarmode\ full -Tc - /Documents\ and\ Settings/joanne/Application\ Data/Microsoft/Address\ Book
Domain=[DOM] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
tarmode is now full, system, hidden, noreset, verbose
                directory \Documents and Settings\joanne\Application Data\Microsoft\Microsoft\
NT_STATUS_OBJECT_NAME_NOT_FOUND listing \Documents and Settings\joanne\Application Data\Microsoft\Microsoft\*
./Documents and Settings/joanne/Application Data/Microsoft/Microsoft/040755 000000 000000 00000000000 11074667216 021506 5tar: dumped 1 files and directories
Total bytes written: 0

# /usr/bin/smbclient //carl/C\$ password  -p 445 -U backup -W DOM -E -d1 -c tarmode\ full -Tc - "/Documents\ and\ Settings/joanne/Application\ Data/Microsoft/Address\ Book"
Domain=[DOM] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
tarmode is now full, system, hidden, noreset, verbose
NT_STATUS_OBJECT_PATH_NOT_FOUND listing \Documents\ and\ Settings\joanne\Application\ Data\Microsoft\Address\
tar: dumped 0 files and directories
Total bytes written: 0

# /usr/bin/smbclient //carl/C\$ password  -p 445 -U backup -W DOM -E -d1 -c tarmode\ full -Tc - "/Documents and Settings/joanne/Application Data/Microsoft/Address Book"
Domain=[DOM] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
tarmode is now full, system, hidden, noreset, verbose
                directory \Documents and Settings\joanne\Application Data\Microsoft\Microsoft\
NT_STATUS_OBJECT_NAME_NOT_FOUND listing \Documents and Settings\joanne\Application Data\Microsoft\Microsoft\*
./Documents and Settings/joanne/Application Data/Microsoft/Microsoft/040755 000000 000000 00000000000 11074667216 021506 5tar: dumped 1 files and directories
Total bytes written: 0

#/usr/bin/smbclient //carl/C\$ password  -p 445 -U backup -W DOM -E -d1 -c tarmode\ full -Tc - "\Documents and Settings\joanne\Application Data\Microsoft\Address Book"
Domain=[DOM] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
tarmode is now full, system, hidden, noreset, verbose
                directory \Documents and Settings\joanne\Application Data\Microsoft\Microsoft\
NT_STATUS_OBJECT_NAME_NOT_FOUND listing \Documents and Settings\joanne\Application Data\Microsoft\Microsoft\*
./Documents and Settings/joanne/Application Data/Microsoft/Microsoft/040755 000000 000000 00000000000 11074667216 021506 5tar: dumped 1 files and directories
Total bytes written: 0

#/usr/bin/smbclient //carl/C\$ password  -p 445 -U backup -W DOM -E -d1 -c tarmode\ full -Tc - '\Documents and Settings\joanne\Application Data\Microsoft\Address Book'
Domain=[DOM] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
tarmode is now full, system, hidden, noreset, verbose
                directory \Documents and Settings\joanne\Application Data\Microsoft\Microsoft\
NT_STATUS_OBJECT_NAME_NOT_FOUND listing \Documents and Settings\joanne\Application Data\Microsoft\Microsoft\*
./Documents and Settings/joanne/Application Data/Microsoft/Microsoft/040755 000000 000000 00000000000 11074667216 021506 5tar: dumped 1 files and directories
Total bytes written: 0

# /usr/bin/smbclient //carl/C\$ password  -p 445 -U backup -W DOM -E -d1
Domain=[DOM] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
smb: \> cd "/Documents and Settings/joanne/Application Data/Microsoft/Address Book"
smb: \Documents and Settings\joanne\Application Data\Microsoft\Address Book\> cd ..
smb: \Documents and Settings\joanne\Application Data\Microsoft\> tar c "Address Book"
NT_STATUS_NO_SUCH_FILE listing \Documents and Settings\joanne\Application Data\Microsoft\Book"
tar: dumped 0 files and directories
Total bytes written: 0
smb: \Documents and Settings\joanne\Application Data\Microsoft\> tar c "Address\ Book"
NT_STATUS_NO_SUCH_FILE listing \Documents and Settings\joanne\Application Data\Microsoft\Book"
tar: dumped 0 files and directories
Total bytes written: 0
smb: \Documents and Settings\joanne\Application Data\Microsoft\> tar c 'Address\ Book'
NT_STATUS_NO_SUCH_FILE listing \Documents and Settings\joanne\Application Data\Microsoft\Book'
tar: dumped 0 files and directories
Total bytes written: 0
smb: \Documents and Settings\joanne\Application Data\Microsoft\> ls
  .                                  DS        0  Mon Oct 13 11:51:42 2008
  ..                                 DS        0  Mon Oct 13 11:51:42 2008
  Address Book                        D        0  Thu Sep  4 09:17:32 2008
  Credentials                        DS        0  Thu Sep  4 08:59:48 2008
  CryptnetUrlCache                   DS        0  Thu Sep  4 08:59:53 2008
  Crypto                             DS        0  Thu Sep  4 09:00:25 2008
  Internet Explorer                   D        0  Thu Sep  4 10:20:52 2008
  MMC                                 D        0  Mon Oct 13 11:51:42 2008
  Protect                            DS        0  Thu Sep  4 09:00:26 2008
  SystemCertificates                 DS        0  Thu Nov 11 07:03:22 2004
  Windows                             D        0  Thu Sep  4 09:04:48 2008

                38162 blocks of size 1048576. 19567 blocks available
smb: \Documents and Settings\joanne\Application Data\Microsoft\> tar c 'Address Book'
NT_STATUS_NO_SUCH_FILE listing \Documents and Settings\joanne\Application Data\Microsoft\Book'
tar: dumped 0 files and directories
Total bytes written: 0
smb: \Documents and Settings\joanne\Application Data\Microsoft\> tar c Address\ Book
NT_STATUS_NO_SUCH_FILE listing \Documents and Settings\joanne\Application Data\Microsoft\Book
tar: dumped 0 files and directories
Total bytes written: 0
smb: \Documents and Settings\joanne\Application Data\Microsoft\> cd "Address Book"
smb: \Documents and Settings\joanne\Application Data\Microsoft\Address Book\>

# smbclient -V
Version 3.2.4-0.21.fc9

# uname -a
Linux srv 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686 i686 i386 GNU/Linux
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Hope this help. Feel free to ask any information you need.
Comment 1 Volker Lendecke 2009-08-06 10:55:07 UTC
A similar bug was fixed for 3.2.9 as a fix for bug 6161. Can you please retry with 3.2.13?

Thanks,

Volker
Comment 2 Volker Lendecke 2009-08-23 02:39:23 UTC
No feedback from reporter. Closing, assuming its fixed.

Volker

*** This bug has been marked as a duplicate of bug 6161 ***