From: Tim Kientzle Date: Sun, 14 Dec 2008 22:05:58 +0000 (-0500) Subject: IFC. X-Git-Tag: v2.6.0~17 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f994457a9aea200048dabb1a8641eedeef84ee27;p=thirdparty%2Flibarchive.git IFC. SVN-Revision: 276 --- diff --git a/libarchive/test/main.c b/libarchive/test/main.c index 28d1bc9bd..c996a400f 100644 --- a/libarchive/test/main.c +++ b/libarchive/test/main.c @@ -45,7 +45,7 @@ #define EXTRA_DUMP(x) archive_error_string((struct archive *)(x)) #define EXTRA_VERSION archive_version() #define KNOWNREF "test_compat_gtar_1.tgz.uu" -__FBSDID("$FreeBSD: src/lib/libarchive/test/main.c,v 1.14 2008/08/31 07:06:02 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/test/main.c,v 1.15 2008/12/08 17:22:44 kientzle Exp $"); /* * "list.h" is simply created by "grep DEFINE_TEST"; it has @@ -897,6 +897,7 @@ int main(int argc, char **argv) time_t now; char *refdir_alloc = NULL; char *progname, *p; + char *tmp; char tmpdir[256]; char tmpdir_timestamp[256]; @@ -916,6 +917,17 @@ int main(int argc, char **argv) testprog = getenv(ENVBASE); #endif + if (getenv("TMPDIR") != NULL) + tmp = getenv("TMPDIR"); + else if (getenv("TMP") != NULL) + tmp = getenv("TMP"); + else if (getenv("TEMP") != NULL) + tmp = getenv("TEMP"); + else if (getenv("TEMPDIR") != NULL) + tmp = getenv("TEMPDIR"); + else + tmp = "/tmp"; + /* Allow -d to be controlled through the environment. */ if (getenv(ENVBASE "_DEBUG") != NULL) dump_on_failure = 1; @@ -976,7 +988,8 @@ int main(int argc, char **argv) strftime(tmpdir_timestamp, sizeof(tmpdir_timestamp), "%Y-%m-%dT%H.%M.%S", localtime(&now)); - sprintf(tmpdir, "/tmp/%s.%s-%03d", progname, tmpdir_timestamp, i); + sprintf(tmpdir, "%s/%s.%s-%03d", tmp, progname, + tmpdir_timestamp, i); if (mkdir(tmpdir,0755) == 0) break; if (errno == EEXIST) diff --git a/tar/Makefile b/tar/Makefile index 20329edf5..031d33557 100644 --- a/tar/Makefile +++ b/tar/Makefile @@ -1,4 +1,4 @@ -# $FreeBSD: src/usr.bin/tar/Makefile,v 1.39 2008/11/08 04:43:24 kientzle Exp $ +# $FreeBSD: src/usr.bin/tar/Makefile,v 1.40 2008/12/06 07:38:14 kientzle Exp $ PROG= bsdtar BSDTAR_VERSION_STRING=2.5.904a diff --git a/tar/bsdtar.1 b/tar/bsdtar.1 index 1859c1240..f660948c9 100644 --- a/tar/bsdtar.1 +++ b/tar/bsdtar.1 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/usr.bin/tar/bsdtar.1,v 1.45 2008/11/08 04:43:24 kientzle Exp $ +.\" $FreeBSD: src/usr.bin/tar/bsdtar.1,v 1.46 2008/12/06 07:37:55 kientzle Exp $ .\" .Dd May 15, 2008 .Dt BSDTAR 1 @@ -607,7 +607,8 @@ and .Cm w options. .Pp -Additional long options are provided to improve compatibility with other tar implementations. +Additional long options are provided to improve compatibility with other +tar implementations. .Sh SECURITY Certain security issues are common to many archiving programs, including .Nm . diff --git a/tar/bsdtar.h b/tar/bsdtar.h index 04a4c2eef..98398b205 100644 --- a/tar/bsdtar.h +++ b/tar/bsdtar.h @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/usr.bin/tar/bsdtar.h,v 1.36 2008/11/08 04:43:24 kientzle Exp $ + * $FreeBSD: src/usr.bin/tar/bsdtar.h,v 1.37 2008/12/06 07:37:14 kientzle Exp $ */ #include "bsdtar_platform.h" diff --git a/tar/bsdtar_platform.h b/tar/bsdtar_platform.h index a1c96bfe9..a47e8c9d2 100644 --- a/tar/bsdtar_platform.h +++ b/tar/bsdtar_platform.h @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/usr.bin/tar/bsdtar_platform.h,v 1.25 2008/01/02 00:23:00 kientzle Exp $ + * $FreeBSD: src/usr.bin/tar/bsdtar_platform.h,v 1.26 2008/12/06 07:37:14 kientzle Exp $ */ /*