<feed xmlns='http://www.w3.org/2005/Atom'>
<title>squashfs-tools-ng.git/lib/tar, branch v1.1.0</title>
<subtitle>A new set of tools and libraries for working with SquashFS images</subtitle>
<id>https://git.infraroot.at/squashfs-tools-ng.git/atom?h=v1.1.0</id>
<link rel='self' href='https://git.infraroot.at/squashfs-tools-ng.git/atom?h=v1.1.0'/>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/'/>
<updated>2020-09-16T07:34:35+00:00</updated>
<entry>
<title>Remodel libtar/tar2sqfs to read data from an istream_t</title>
<updated>2020-09-16T07:34:35+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2020-09-13T11:37:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=f757737060d4daebb24a32e90d912661428708a8'/>
<id>urn:sha1:f757737060d4daebb24a32e90d912661428708a8</id>
<content type='text'>
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Remodel file extraction tools to use libfstream</title>
<updated>2020-09-16T07:34:35+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2020-09-04T17:26:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=0a0cbefc6ebb6174aad3e6f0b8a6dea87aed49da'/>
<id>urn:sha1:0a0cbefc6ebb6174aad3e6f0b8a6dea87aed49da</id>
<content type='text'>
This commit rewrites the libtar write paths to use libfstream insead of
a FILE pointer. Also, the libcommon file extraction function is remodeled
to use libfstream.

In accordance, rdsquashfs, sqfs2tar and sqfsdiff have some minor
adjustments made to work with the ported libtar and libcommon.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Fix integer bounds checking in GNU tar sparse format 1.0 parser</title>
<updated>2020-09-03T16:28:09+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2020-09-03T15:51:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=c6d289ab9e604369c25ed2c766842318f74e9256'/>
<id>urn:sha1:c6d289ab9e604369c25ed2c766842318f74e9256</id>
<content type='text'>
 - Make sure the file actually has that many records before trying
   to read one and fail if not.
 - Use the helper macros for size_t overflow checking instead of
   assuming size_t == uint64_t.
 - Impose a "reasonable" upper bound on the number of data segments
   and insist that there is at least one entry.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Fix nonexistant gnu tar sparse format 1.0 support</title>
<updated>2020-09-02T09:19:11+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2020-09-02T09:19:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=84ff0984bb5b471d0b4cbc0b0fca156c29273bf5'/>
<id>urn:sha1:84ff0984bb5b471d0b4cbc0b0fca156c29273bf5</id>
<content type='text'>
Contrary to previous claims, support for the GNU tar sparse format 1.0
was missing entirely (the newest of their 3 different sparse mapping
formats). This oversight wasn't caught, because the unit test was
compiling the wrong source file and tar2sqfs had no problem processing
the test file because it is still a valid POSIX-ish tar archive (but
the sparse part was missing and the mapping embedded in the file).

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Fix libtar treatment of link targets that fill the header field</title>
<updated>2020-08-16T11:03:17+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2020-08-16T11:03:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=80fe7f8d5b7dd51c97dd66152e255173f9a516dd'/>
<id>urn:sha1:80fe7f8d5b7dd51c97dd66152e255173f9a516dd</id>
<content type='text'>
The tar header has a 100 byte field for symlink and hard link targets.
If the target is longer than 100 bytes, an extension header has to be
used.

However, it is perfectly valid to fill all 100 bytes to the brim
without adding a null terminator. In case of a symlink, this can
result in garbage link targets, while for hard links it results in
an immediate error since the target cannot be resolved later on.

This commit attempts to fix the problem by replacing the strdup of
the link target with an strndup that copies at most the size of the
target header field.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Cleanup: sqfs2tar: break up and simplify the repacking code</title>
<updated>2020-05-30T15:49:40+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2020-05-27T13:29:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=36e70b384e1360e47f473be54ef3c0599bf82844'/>
<id>urn:sha1:36e70b384e1360e47f473be54ef3c0599bf82844</id>
<content type='text'>
 - Move the xattr extraction and repacking to xattr.c
 - Don't on-the-fly delete the tar xattr list, use the function
   from libtar.a
 - Split minor tasks into static helper functions
   - creating a libtar xattr struct from libsqfs xattr data
   - finding a hard link entry from current path and inode number

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>libtar: fix size computation of PAX line length</title>
<updated>2020-05-18T12:00:31+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2020-05-18T12:00:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=692cbd0079658a8eb048c9b00dadec2d69d28b14'/>
<id>urn:sha1:692cbd0079658a8eb048c9b00dadec2d69d28b14</id>
<content type='text'>
This commit attempts to fix the following two problems:

 - The number of digits computation returning an off-by-one result
   if the number is 10, or the resulting digit string starts
   with "10". This results in one-too-many padding bytes, corrupting
   the rest of the archive since the headers now don't start at
   multiples of 512 anymore.

 - Adding the line length prefix affects the line length (duh). If it
   grows far enough to require more digits, the result is a similar
   problem. This is a converging series that we need to compute the
   limit of.

Unit tests for this still need to be added. Or maybe I can convince a
bored undergrad student to provide an induction proof.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Skip PAX global headers</title>
<updated>2020-04-22T12:22:44+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2020-04-22T12:22:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=c6b65ee8a9a57d51956ee462fa1d61fd90d61f40'/>
<id>urn:sha1:c6b65ee8a9a57d51956ee462fa1d61fd90d61f40</id>
<content type='text'>
Tar archives can contain set two kinds of PAX headers:
 - local headers that modify the attributes of the next file
 - global headers that set defaults for all files

The later is used "... not widely used", according to tar(5)
and has been deliberately not implemented.

Some programs (e.g. git-archive) *do* generate them (in the case
of git, it stores the commit hash).

This commit adds a code path that skips a PAX global header entirely
and resumes tar parsing, instead of erroneusly reporting it as an
entry.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Remove some configure time sizeof checks</title>
<updated>2020-04-17T21:52:52+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2020-04-17T21:52:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=16a22bebb0bb4a28aec9ca76442af93462fc200e'/>
<id>urn:sha1:16a22bebb0bb4a28aec9ca76442af93462fc200e</id>
<content type='text'>
In libtar, the sizeof time_t checked when trying to store a time value.
It is pointless using the preprocessor here, as we can simply do an
if (sizeof(time_t) &lt; ...) check and the compiler will take care
optimizing away one or the other branch.

After changing the libtar check and the corresponding unit tests, the
sizeof check can be removed from configure.ac, along with other unused
sizeof checks.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Cleanup: split read_header.c in libtar.a</title>
<updated>2020-04-17T21:31:32+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2020-04-17T21:20:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=1fe3f86230a970b3974f16a6bc2e819fdaf55b58'/>
<id>urn:sha1:1fe3f86230a970b3974f16a6bc2e819fdaf55b58</id>
<content type='text'>
Simply moving the pax header decoding to a separate file and splitting
out the common helper functions should be a good start.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
</feed>
