summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-11-22 23:06:29 +0000
committerJeremy Allison <jra@samba.org>2000-11-22 23:06:29 +0000
commit8d26523e90ff76adf6195d938fa1b8bc2b747dc1 (patch)
treefb6f9e109168789a5653a96fdbe478f592e86b73
parentaf85ca538cc1f04f089c85dd5814f4c66036bc79 (diff)
downloadsamba-8d26523e90ff76adf6195d938fa1b8bc2b747dc1.tar.gz
samba-8d26523e90ff76adf6195d938fa1b8bc2b747dc1.tar.bz2
samba-8d26523e90ff76adf6195d938fa1b8bc2b747dc1.zip
Tar fixes from Craig Barratt craig@arraycomm.com.
Jeremy. (This used to be commit cf05709ec394d6cac14577c033d658bdc4506208)
-rw-r--r--source3/client/client.c2
-rw-r--r--source3/client/clitar.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index 9cc6034d70..5995f1a243 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -2515,6 +2515,8 @@ static int do_message_op(void)
DEBUG( 3, ( "Client started (version %s).\n", VERSION ) );
if (tar_type) {
+ if (cmdstr)
+ process_command_string(cmdstr);
return do_tar_op(base_directory);
}
diff --git a/source3/client/clitar.c b/source3/client/clitar.c
index efa4fa8815..fe0fc83e4c 100644
--- a/source3/client/clitar.c
+++ b/source3/client/clitar.c
@@ -181,7 +181,7 @@ static void writetarheader(int f, char *aname, int size, time_t mtime,
memset(hb.dummy, 0, sizeof(hb.dummy));
l=strlen(aname);
- if (l >= NAMSIZ) {
+ if (l >= NAMSIZ - 1) {
/* write a GNU tar style long header */
char *b;
b = (char *)malloc(l+TBLOCK+100);
@@ -189,7 +189,7 @@ static void writetarheader(int f, char *aname, int size, time_t mtime,
DEBUG(0,("out of memory\n"));
exit(1);
}
- writetarheader(f, "/./@LongLink", l+1, 0, " 0 \0", 'L');
+ writetarheader(f, "/./@LongLink", l+2, 0, " 0 \0", 'L');
memset(b, 0, l+TBLOCK+100);
fixtarname(b, aname, l);
i = strlen(b)+1;