[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-3495-g750f9d9

Jeremy Allison jra at samba.org
Fri Mar 6 01:18:31 GMT 2009


The branch, v3-2-test has been updated
       via  750f9d94b0a1208d45cc117df68042e1d83044bf (commit)
      from  91e2cd86e24cead352f07cc1a6b4a8e3a364adb5 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit 750f9d94b0a1208d45cc117df68042e1d83044bf
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Mar 5 17:16:54 2009 -0800

    Fix bug #6161 - smbclient corrupts source path in tar mode
    This was my fault. I broke the smbclient tar argument processing
    in creating the string for chdir when removing pstrings.
    Jeremy.

-----------------------------------------------------------------------

Summary of changes:
 source/client/clitar.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/client/clitar.c b/source/client/clitar.c
index 084f87e..be0bc32 100644
--- a/source/client/clitar.c
+++ b/source/client/clitar.c
@@ -1506,6 +1506,7 @@ int process_tar(void)
 
 					if (strrchr_m(cliplist[i], '\\')) {
 						char *p;
+						char saved_char;
 						char *saved_dir = talloc_strdup(ctx,
 									client_get_cur_dir());
 						if (!saved_dir) {
@@ -1524,13 +1525,28 @@ int process_tar(void)
 						if (!tarmac) {
 							return 1;
 						}
+						/*
+						 * Strip off the last \\xxx
+						 * xxx element of tarmac to set
+						 * it as current directory.
+						 */
 						p = strrchr_m(tarmac, '\\');
 						if (!p) {
 							return 1;
 						}
+						saved_char = p[1];
 						p[1] = '\0';
+
 						client_set_cur_dir(tarmac);
 
+						/*
+						 * Restore the character we
+						 * just replaced to
+						 * put the pathname
+						 * back as it was.
+						 */
+						p[1] = saved_char;
+
 						DEBUG(5, ("process_tar, do_list with tarmac: %s\n", tarmac));
 						do_list(tarmac,attribute,do_tar, False, True);
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list