Bug 161 - smbclient bug in tar mode
Summary: smbclient bug in tar mode
Alias: None
Product: Samba 2.2
Classification: Unclassified
Component: smbclient (show other bugs)
Version: 2.2.8a
Hardware: All All
: P2 minor
Target Milestone: ---
Assignee: Gerald (Jerry) Carter (dead mail address)
QA Contact:
Depends on:
Reported: 2003-06-13 06:42 UTC by Ademar de Souza Reis Jr.
Modified: 2004-02-17 08:56 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Ademar de Souza Reis Jr. 2003-06-13 06:42:34 UTC

I'm using smbclient tar in one of my backup solutions but there's a bug in
the "I" (include) parameter.

Accordingly to the smbclient manpage:

-T tar options
 · I  -  Include  files and directories.  Is the default behavior
   when filenames are specified above. Causes  tar  files  to  be
   included  in  an  extract  or create (and therefore everything
   else to be excluded). See  example  below.  Filename  globbing
   works in one of two ways. See r below.
 · X  -  Exclude  files  and directories.  Causes tar files to be
   excluded from an extract or create. See example  below.  File-
   name globbing works in one of two ways now.  See r below.

The problem is that the "I" option is working exactly as the "X" option (at
least in smbclient ... -TI{c,x}). I believe this simple patch fix the issue:

--- samba-2.2.8a/source/client/clitar.c.orig    2003-06-13 10:39:45.000000000 -0300
+++ samba-2.2.8a/source/client/clitar.c 2003-06-13 10:41:42.000000000 -0300
@@ -1251,8 +1251,10 @@
   DEBUG(5, ("Skip = %i, cliplist=%s, file=%s\n", skip,
(cliplist?cliplist[0]:NULL), finfo.name));
-  if (skip) {
+  if (tar_excl)
+    skip = !skip;
+  if (skip) {
Comment 1 Gerald (Jerry) Carter (dead mail address) 2004-02-17 08:56:02 UTC
Sorry, but the 2.2 is not under development any longer.
If you can reproduce this bug against the latest 3.0 release, 
please reopen this bug and change the version in the report.