Bug 9989 - smbclient3 tar exclusion mode doesn't work when used with path to files
Summary: smbclient3 tar exclusion mode doesn't work when used with path to files
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: libsmbclient (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-02 09:53 UTC by Aurélien Aptel
Modified: 2014-09-23 16:11 UTC (History)
0 users

See Also:


Attachments
output of smbclient with debug level = 5 (5.05 KB, text/plain)
2013-07-02 09:53 UTC, Aurélien Aptel
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aurélien Aptel 2013-07-02 09:53:47 UTC
Created attachment 9013 [details]
output of smbclient with debug level = 5

While writing my test suite for smbclient tarmode I realized that
using the X switch to exclude files (instead of directories) silently
fails. This is inconsistent with the include flag which does include
directory /and/ files.

The man page reads:

  X - Exclude files and directories. Causes files to be excluded from
  an extract or create. See example below. Filename globbing works in
  one of two ways now. See r below.

Lets say the root of my *empty* share has this hierarchy:

- dir/
  - f/
    - a
    - b
  - c
  - d

If I make a backup excluding dir/f and dir/d, dir/d is still included
in the tar file. However, if I remove the first 'dir' in the hierarchy
the file is correctly excluded.

See post on mailing list:
http://article.gmane.org/gmane.network.samba.internals/70835

I've attached the output of smbclient (with a debug level = 5) in the buggy case.
Comment 1 David Disseldorp 2014-09-23 16:11:26 UTC
@Aurélien: your new smbclient tarmode implementation passes both create/extract with explicit exclude tests. I don't expect that we'll be backporting your re-write for Samba < 4.2, so I'll close this bug for now. Please reopen if you have any concerns.