The Samba-Bugzilla – Attachment 7224 Details for
Bug 563
smbclient tar 8GB files fail on tar extract, and on big endian tar create
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for 3.5.next
0001-s3-cli-fix-bug-563-8GB-tar-on-BE-machines.patch (text/plain), 2.02 KB, created by
Jeremy Allison
on 2012-01-04 01:27:16 UTC
(
hide
)
Description:
git-am fix for 3.5.next
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2012-01-04 01:27:16 UTC
Size:
2.02 KB
patch
obsolete
>From f5f0a95a44d9535043da44ad1d83e99f431167fd Mon Sep 17 00:00:00 2001 >From: Masafumi Nakayama <MASA23@jp.ibm.com> >Date: Tue, 3 Jan 2012 17:24:58 -0800 >Subject: [PATCH] s3-cli: fix bug 563, >8GB tar on BE machines > >Borrows on existing patches proposed by Craig Barratt and Brad Ellis. > >Signed-off-by: David Disseldorp <ddiss@suse.de> > >Back-ported to 3.5.x by Jeremy Allison <jra@samba.org> >--- > source3/client/clitar.c | 22 +++++++++++++++++----- > 1 files changed, 17 insertions(+), 5 deletions(-) > >diff --git a/source3/client/clitar.c b/source3/client/clitar.c >index fc98fa8..8440a46 100644 >--- a/source3/client/clitar.c >+++ b/source3/client/clitar.c >@@ -204,8 +204,10 @@ static void writetarheader(int f, const char *aname, uint64_t size, time_t mtime > > memset(hb.dbuf.size, 0, 4); > hb.dbuf.size[0]=128; >- for (i = 8, jp=(char*)&size; i; i--) >- hb.dbuf.size[i+3] = *(jp++); >+ for (i = 8; i; i--) { >+ hb.dbuf.size[i+3] = size & 0xff; >+ size >>= 8; >+ } > } > oct_it((uint64_t) mtime, 13, hb.dbuf.mtime); > memcpy(hb.dbuf.chksum, " ", sizeof(hb.dbuf.chksum)); >@@ -307,7 +309,17 @@ of link other than a GNUtar Longlink - ignoring\n")); > finfo->mtime_ts = finfo->ctime_ts = > convert_time_t_to_timespec((time_t)strtol(hb->dbuf.mtime, NULL, 8)); > finfo->atime_ts = convert_time_t_to_timespec(time(NULL)); >- finfo->size = unoct(hb->dbuf.size, sizeof(hb->dbuf.size)); >+ if ((hb->dbuf.size[0] & 0xff) == 0x80) { >+ /* This is a non-POSIX compatible extention to extract files >+ greater than 8GB. */ >+ finfo->size = 0; >+ for (i = 0; i < 8; i++) { >+ finfo->size <<= 8; >+ finfo->size |= hb->dbuf.size[i+4] & 0xff; >+ } >+ } else { >+ finfo->size = unoct(hb->dbuf.size, sizeof(hb->dbuf.size)); >+ } > > return True; > } >@@ -999,8 +1011,8 @@ static int skip_file(int skipsize) > static int get_file(file_info2 finfo) > { > uint16_t fnum; >- int pos = 0, dsize = 0, bpos = 0; >- uint64_t rsize = 0; >+ int dsize = 0, bpos = 0; >+ uint64_t rsize = 0, pos = 0; > > DEBUG(5, ("get_file: file: %s, size %.0f\n", finfo.name, (double)finfo.size)); > >-- >1.7.3.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
ddiss
:
review+
Actions:
View
Attachments on
bug 563
:
195
|
7049
| 7224