]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
IFC
authorTim Kientzle <kientzle@gmail.com>
Sun, 19 Oct 2008 17:20:47 +0000 (13:20 -0400)
committerTim Kientzle <kientzle@gmail.com>
Sun, 19 Oct 2008 17:20:47 +0000 (13:20 -0400)
SVN-Revision: 221

16 files changed:
libarchive/archive_entry.c
libarchive/archive_entry.h
libarchive/archive_entry_copy_stat.c
libarchive/archive_entry_private.h
libarchive/archive_entry_stat.c
libarchive/archive_read_support_format_mtree.c
libarchive/archive_read_support_format_tar.c
libarchive/archive_write_disk.c
libarchive/archive_write_set_format_pax.c
libarchive/config_freebsd.h
libarchive/test/Makefile
libarchive/test/test_acl_basic.c
libarchive/test/test_acl_freebsd.c [new file with mode: 0644]
libarchive/test/test_entry.c
libarchive/test/test_read_format_mtree.c
libarchive/test/test_write_disk.c

index 1ea0b9469164601cbcf479eff9d2bcdbbcd753fc..364c7c6ff66711e34f62d442249588e38cc27e40 100644 (file)
@@ -24,7 +24,7 @@
  */
 
 #include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_entry.c,v 1.53 2008/09/01 04:54:29 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_entry.c,v 1.54 2008/09/30 03:53:03 kientzle Exp $");
 
 #ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
index 25a136ac689226d5675c278a6c1c1c0c3a3b5fb2..e90b3c91a8577daa36a3765f1221012581102f6b 100644 (file)
@@ -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/lib/libarchive/archive_entry.h,v 1.28 2008/09/01 04:54:29 kientzle Exp $
+ * $FreeBSD: src/lib/libarchive/archive_entry.h,v 1.30 2008/09/30 03:53:03 kientzle Exp $
  */
 
 #ifndef ARCHIVE_ENTRY_H_INCLUDED
index ba8812a9fbbba587bad7eaec3a834b1756db0097..3722c0807c98fcc2a484fc17b525492b957bba79 100644 (file)
@@ -24,7 +24,7 @@
  */
 
 #include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_entry_copy_stat.c,v 1.1 2007/05/29 01:00:18 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_entry_copy_stat.c,v 1.2 2008/09/30 03:53:03 kientzle Exp $");
 
 #ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
index b1ce661f272b77a95ad2fad35f7508ec01aa2070..a4317decbfa8ce577f7782a55b7ef6cdde7e7442 100644 (file)
@@ -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/lib/libarchive/archive_entry_private.h,v 1.5 2008/09/01 04:54:29 kientzle Exp $
+ * $FreeBSD: src/lib/libarchive/archive_entry_private.h,v 1.6 2008/09/30 03:53:03 kientzle Exp $
  */
 
 #ifndef ARCHIVE_ENTRY_PRIVATE_H_INCLUDED
index 5a627d7d8a64d259e389f37dbfff33596cf9cb07..ac3c4d5b0759423f5f892fdca984202359a5c585 100644 (file)
@@ -24,7 +24,7 @@
  */
 
 #include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_entry_stat.c,v 1.1 2007/05/29 01:00:18 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_entry_stat.c,v 1.2 2008/09/30 03:53:03 kientzle Exp $");
 
 #ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
index 9cd5881d5338110d1ea5dddd69acd1f21c7cc507..1c0a45bdce3ee0895d2036392d6d1ffcfc8dca03 100644 (file)
@@ -25,7 +25,7 @@
  */
 
 #include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_mtree.c,v 1.9 2008/06/21 19:06:37 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_mtree.c,v 1.10 2008/09/18 04:13:36 kientzle Exp $");
 
 #ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
index 3258b3cf49c7e7763e224f835c5e55d714efb610..44952381fc9f4841397634a7110ddf973e7a0fb7 100644 (file)
@@ -24,7 +24,7 @@
  */
 
 #include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_tar.c,v 1.70 2008/07/10 09:50:55 cperciva Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_tar.c,v 1.71 2008/09/30 03:57:07 kientzle Exp $");
 
 #ifdef HAVE_ERRNO_H
 #include <errno.h>
index fd8bd075ba2a28861010242e6ae4ec799c4402f2..4d7691ed01e30b3dcd9e5313815c056a4a152e55 100644 (file)
@@ -25,7 +25,7 @@
  */
 
 #include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_disk.c,v 1.39 2008/09/14 05:51:25 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_disk.c,v 1.41 2008/10/19 00:18:44 kientzle Exp $");
 
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
@@ -710,10 +710,6 @@ _archive_write_finish_entry(struct archive *_a)
                int r2 = set_mode(a, a->mode);
                if (r2 < ret) ret = r2;
        }
-       if (a->todo & TODO_TIMES) {
-               int r2 = set_times(a);
-               if (r2 < ret) ret = r2;
-       }
        if (a->todo & TODO_ACLS) {
                int r2 = set_acls(a);
                if (r2 < ret) ret = r2;
@@ -726,6 +722,10 @@ _archive_write_finish_entry(struct archive *_a)
                int r2 = set_fflags(a);
                if (r2 < ret) ret = r2;
        }
+       if (a->todo & TODO_TIMES) {
+               int r2 = set_times(a);
+               if (r2 < ret) ret = r2;
+       }
 
        /* If there's an fd, we can close it now. */
        if (a->fd >= 0) {
index 345cb92a2532f24f529ac2e4d1c8959411b80c2c..a0c2ebc8d9f067b251da5e361be371f1f2ca0cea 100644 (file)
@@ -24,7 +24,7 @@
  */
 
 #include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_set_format_pax.c,v 1.48 2008/08/10 02:06:28 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_set_format_pax.c,v 1.49 2008/09/30 03:57:07 kientzle Exp $");
 
 #ifdef HAVE_ERRNO_H
 #include <errno.h>
index 5e6be1537f763e50b96727aae8c43bbe089d189b..a044d20b8055c012e085c116d216d588954b5314 100644 (file)
@@ -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/lib/libarchive/config_freebsd.h,v 1.14 2008/09/14 05:51:25 kientzle Exp $
+ * $FreeBSD: src/lib/libarchive/config_freebsd.h,v 1.15 2008/09/30 03:53:03 kientzle Exp $
  */
 
 /* FreeBSD 5.0 and later have ACL support. */
index 7fe1fb91c98c05220128950abc98de99743e52d3..c7ae043226d0fd434b854bd849400f06a9da9e9f 100644 (file)
@@ -1,4 +1,4 @@
-# $FreeBSD: src/lib/libarchive/test/Makefile,v 1.25 2008/09/08 00:58:12 kientzle Exp $
+# $FreeBSD: src/lib/libarchive/test/Makefile,v 1.28 2008/10/19 00:18:44 kientzle Exp $
 
 # Where to find the libarchive sources
 LA_SRCDIR=${.CURDIR}/..
@@ -9,6 +9,7 @@ LA_SRCS!=make -f ${LA_SRCDIR}/Makefile -V SRCS
 
 TESTS= \
        test_acl_basic.c                        \
+       test_acl_freebsd.c                      \
        test_acl_pax.c                          \
        test_archive_api_feature.c              \
        test_bad_fd.c                           \
index d172b227fb8dcfc2b369eb39b349c7d0761de5cb..f66014cdd31b467e236b9478f21655e151937f91 100644 (file)
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 #include "test.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/test/test_acl_basic.c,v 1.5 2008/09/01 05:38:33 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/test/test_acl_basic.c,v 1.6 2008/10/19 00:13:57 kientzle Exp $");
 
 /*
  * Exercise the system-independent portion of the ACL support.
- * Check that archive_entry objects can save and restore ACL data
- * and that pax archive can save and restore ACL data.
+ * Check that archive_entry objects can save and restore ACL data.
  *
  * This should work on all systems, regardless of whether local
  * filesystems support ACLs or not.
@@ -42,7 +41,7 @@ struct acl_t {
        const char *name; /* Name of user/group, depending on tag. */
 };
 
-struct acl_t acls0[] = {
+static struct acl_t acls0[] = {
        { ARCHIVE_ENTRY_ACL_TYPE_ACCESS, ARCHIVE_ENTRY_ACL_EXECUTE,
          ARCHIVE_ENTRY_ACL_USER_OBJ, 0, "" },
        { ARCHIVE_ENTRY_ACL_TYPE_ACCESS, ARCHIVE_ENTRY_ACL_READ,
@@ -51,7 +50,7 @@ struct acl_t acls0[] = {
          ARCHIVE_ENTRY_ACL_OTHER, 0, "" },
 };
 
-struct acl_t acls1[] = {
+static struct acl_t acls1[] = {
        { ARCHIVE_ENTRY_ACL_TYPE_ACCESS, ARCHIVE_ENTRY_ACL_EXECUTE,
          ARCHIVE_ENTRY_ACL_USER_OBJ, -1, "" },
        { ARCHIVE_ENTRY_ACL_TYPE_ACCESS, ARCHIVE_ENTRY_ACL_READ,
@@ -62,7 +61,7 @@ struct acl_t acls1[] = {
          ARCHIVE_ENTRY_ACL_OTHER, -1, "" },
 };
 
-struct acl_t acls2[] = {
+static struct acl_t acls2[] = {
        { ARCHIVE_ENTRY_ACL_TYPE_ACCESS, ARCHIVE_ENTRY_ACL_EXECUTE | ARCHIVE_ENTRY_ACL_READ,
          ARCHIVE_ENTRY_ACL_USER_OBJ, -1, "" },
        { ARCHIVE_ENTRY_ACL_TYPE_ACCESS, ARCHIVE_ENTRY_ACL_READ,
diff --git a/libarchive/test/test_acl_freebsd.c b/libarchive/test/test_acl_freebsd.c
new file mode 100644 (file)
index 0000000..47e694c
--- /dev/null
@@ -0,0 +1,243 @@
+/*-
+ * Copyright (c) 2003-2008 Tim Kientzle
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include "test.h"
+__FBSDID("$FreeBSD: src/lib/libarchive/test/test_acl_freebsd.c,v 1.1 2008/10/19 00:18:44 kientzle Exp $");
+
+#if defined(__FreeBSD__) && __FreeBSD__ > 4
+#include <sys/acl.h>
+
+struct myacl_t {
+       int type;  /* Type of ACL: "access" or "default" */
+       int permset; /* Permissions for this class of users. */
+       int tag; /* Owner, User, Owning group, group, other, etc. */
+       int qual; /* GID or UID of user/group, depending on tag. */
+       const char *name; /* Name of user/group, depending on tag. */
+};
+
+static struct myacl_t acls2[] = {
+       { ARCHIVE_ENTRY_ACL_TYPE_ACCESS, ARCHIVE_ENTRY_ACL_EXECUTE | ARCHIVE_ENTRY_ACL_READ,
+         ARCHIVE_ENTRY_ACL_USER_OBJ, -1, "" },
+       { ARCHIVE_ENTRY_ACL_TYPE_ACCESS, ARCHIVE_ENTRY_ACL_READ,
+         ARCHIVE_ENTRY_ACL_USER, 77, "user77" },
+       { ARCHIVE_ENTRY_ACL_TYPE_ACCESS, 0,
+         ARCHIVE_ENTRY_ACL_USER, 78, "user78" },
+       { ARCHIVE_ENTRY_ACL_TYPE_ACCESS, ARCHIVE_ENTRY_ACL_READ,
+         ARCHIVE_ENTRY_ACL_GROUP_OBJ, -1, "" },
+       { ARCHIVE_ENTRY_ACL_TYPE_ACCESS, 0007,
+         ARCHIVE_ENTRY_ACL_GROUP, 78, "group78" },
+       { ARCHIVE_ENTRY_ACL_TYPE_ACCESS,
+         ARCHIVE_ENTRY_ACL_WRITE | ARCHIVE_ENTRY_ACL_EXECUTE,
+         ARCHIVE_ENTRY_ACL_OTHER, -1, "" },
+       { ARCHIVE_ENTRY_ACL_TYPE_ACCESS,
+         ARCHIVE_ENTRY_ACL_WRITE | ARCHIVE_ENTRY_ACL_READ | ARCHIVE_ENTRY_ACL_EXECUTE,
+         ARCHIVE_ENTRY_ACL_MASK, -1, "" },
+       { 0, 0, 0, 0, NULL }
+};
+
+static void
+set_acls(struct archive_entry *ae, struct myacl_t *acls)
+{
+       int i;
+
+       archive_entry_acl_clear(ae);
+       for (i = 0; acls[i].name != NULL; i++) {
+               archive_entry_acl_add_entry(ae,
+                   acls[i].type, acls[i].permset, acls[i].tag, acls[i].qual,
+                   acls[i].name);
+       }
+}
+
+static int
+acl_match(acl_entry_t aclent, struct myacl_t *myacl)
+{
+       acl_tag_t tag_type;
+       acl_permset_t opaque_ps;
+       int permset = 0;
+
+       acl_get_tag_type(aclent, &tag_type);
+
+       /* translate the silly opaque permset to a bitmap */
+       acl_get_permset(aclent, &opaque_ps);
+       if (acl_get_perm_np(opaque_ps, ACL_EXECUTE))
+               permset |= ARCHIVE_ENTRY_ACL_EXECUTE;
+       if (acl_get_perm_np(opaque_ps, ACL_WRITE))
+               permset |= ARCHIVE_ENTRY_ACL_WRITE;
+       if (acl_get_perm_np(opaque_ps, ACL_READ))
+               permset |= ARCHIVE_ENTRY_ACL_READ;
+
+       if (permset != myacl->permset)
+               return (0);
+
+       switch (tag_type) {
+       case ACL_USER_OBJ:
+               if (myacl->tag != ARCHIVE_ENTRY_ACL_USER_OBJ) return (0);
+               break;
+       case ACL_USER:
+               if (myacl->tag != ARCHIVE_ENTRY_ACL_USER)
+                       return (0);
+               if ((uid_t)myacl->qual != *(uid_t *)acl_get_qualifier(aclent))
+                       return (0);
+               break;
+       case ACL_GROUP_OBJ:
+               if (myacl->tag != ARCHIVE_ENTRY_ACL_GROUP_OBJ) return (0);
+               break;
+       case ACL_GROUP:
+               if (myacl->tag != ARCHIVE_ENTRY_ACL_GROUP)
+                       return (0);
+               if ((gid_t)myacl->qual != *(gid_t *)acl_get_qualifier(aclent))
+                       return (0);
+               break;
+       case ACL_MASK:
+               if (myacl->tag != ARCHIVE_ENTRY_ACL_MASK) return (0);
+               break;
+       case ACL_OTHER:
+               if (myacl->tag != ARCHIVE_ENTRY_ACL_OTHER) return (0);
+               break;
+       }
+       return (1);
+}
+
+static void
+compare_acls(acl_t acl, struct myacl_t *myacls)
+{
+       int *marker;
+       int entry_id = ACL_FIRST_ENTRY;
+       int matched;
+       int i, n;
+       acl_entry_t acl_entry;
+
+       /* Count ACL entries in myacls array and allocate an indirect array. */
+       for (n = 0; myacls[n].name != NULL; ++n)
+               continue;
+       marker = malloc(sizeof(marker[0]) * n);
+       for (i = 0; i < n; i++)
+               marker[i] = i;
+
+       /*
+        * Iterate over acls in system acl object, try to match each
+        * one with an item in the myacls array.
+        */
+       while (1 == acl_get_entry(acl, entry_id, &acl_entry)) {
+               /* After the first time... */
+               entry_id = ACL_NEXT_ENTRY;
+
+               /* Search for a matching entry (tag and qualifier) */
+               for (i = 0, matched = 0; i < n && !matched; i++) {
+                       if (acl_match(acl_entry, &myacls[marker[i]])) {
+                               /* We found a match; remove it. */
+                               marker[i] = marker[n - 1];
+                               n--;
+                               matched = 1;
+                       }
+               }
+
+               /* TODO: Print out more details in this case. */
+               failure("ACL entry on file that shouldn't be there");
+               assert(matched == 1);
+       }
+
+       /* Dump entries in the myacls array that weren't in the system acl. */
+       for (i = 0; i < n; ++i) {
+               failure(" ACL entry missing from file: "
+                   "type=%d,permset=%d,tag=%d,qual=%d,name=``%s''\n",
+                   myacls[marker[i]].type, myacls[marker[i]].permset,
+                   myacls[marker[i]].tag, myacls[marker[i]].qual,
+                   myacls[marker[i]].name);
+               assert(0); /* Record this as a failure. */
+       }
+       free(marker);
+}
+
+#endif
+
+
+/*
+ * Verify ACL restore-to-disk.  This test is FreeBSD-specific.
+ */
+
+DEFINE_TEST(test_acl_freebsd)
+{
+#if !defined(__FreeBSD__)
+       skipping("FreeBSD-specific ACL restore test");
+#elif __FreeBSD__ < 5
+       skipping("ACL restore supported only on FreeBSD 5.0 and later");
+#else
+       struct stat st;
+       struct archive *a;
+       struct archive_entry *ae;
+       int n, fd;
+       acl_t acl;
+
+       /*
+        * First, do a quick manual set/read of ACL data to
+        * verify that the local filesystem does support ACLs.
+        * If it doesn't, we'll simply skip the remaining tests.
+        */
+       acl = acl_from_text("u::rwx,u:1:rw,g::rwx,g:15:rx,o::rwx,m::rwx");
+       assert((void *)acl != NULL);
+       /* Create a test file and try to set an ACL on it. */
+       fd = open("pretest", O_WRONLY | O_CREAT | O_EXCL, 0777);
+       failure("Could not create test file?!");
+       n = -1;
+       if (assert(fd >= 0)) {
+               n = acl_set_fd(fd, acl);
+               failure("acl_set_fd(): errno = %d (%s)",
+                   errno, strerror(errno));
+               assertEqualInt(0, n);
+               close(fd);
+       }
+
+       if (fd < 0 || n != 0) {
+               skipping("ACL tests require that ACL support be enabled on the filesystem");
+               return;
+       }
+
+       /* Create a write-to-disk object. */
+       assert(NULL != (a = archive_write_disk_new()));
+       archive_write_disk_set_options(a,
+           ARCHIVE_EXTRACT_TIME | ARCHIVE_EXTRACT_PERM | ARCHIVE_EXTRACT_ACL);
+
+       /* Populate an archive entry with some metadata, including ACL info */
+       ae = archive_entry_new();
+       assert(ae != NULL);
+       archive_entry_set_pathname(ae, "test0");
+       archive_entry_set_mtime(ae, 123456, 7890);
+       archive_entry_set_size(ae, 0);
+       set_acls(ae, acls2);
+       assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, ae));
+       archive_entry_free(ae);
+
+       /* Close the archive. */
+       assertEqualIntA(a, ARCHIVE_OK, archive_write_close(a));
+       assertEqualInt(ARCHIVE_OK, archive_write_finish(a));
+
+       /* Verify the data on disk. */
+       assertEqualInt(0, stat("test0", &st));
+       assertEqualInt(st.st_mtime, 123456);
+       acl = acl_get_file("test0", ACL_TYPE_ACCESS);
+       assert(acl != (acl_t)NULL);
+       compare_acls(acl, acls2);
+#endif
+}
index 8b9cb8b3c5dc826630a8e461df72cd84e1220111..072518c292fbbf19093aec254291233b52ae1a22 100644 (file)
@@ -23,7 +23,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 #include "test.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/test/test_entry.c,v 1.8 2008/09/01 05:38:33 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/test/test_entry.c,v 1.10 2008/09/30 04:13:21 kientzle Exp $");
 
 #include <locale.h>
 
@@ -629,6 +629,7 @@ DEFINE_TEST(test_entry)
        st.st_atimespec.tv_nsec = 6543210;
        st.st_ctimespec.tv_nsec = 5432109;
        st.st_mtimespec.tv_nsec = 3210987;
+       st.st_birthtimespec.tv_nsec = 7459386;
 #endif
        /* Copy them into the entry. */
        archive_entry_copy_stat(e, &st);
@@ -650,6 +651,7 @@ DEFINE_TEST(test_entry)
        assertEqualInt(archive_entry_atime_nsec(e), 6543210);
        assertEqualInt(archive_entry_ctime_nsec(e), 5432109);
        assertEqualInt(archive_entry_mtime_nsec(e), 3210987);
+       assertEqualInt(archive_entry_birthtime_nsec(e), 7459386);
 #endif
 
        /*
index 672ca130886f2afb27fdc9118d700347388de415..ef34af8f7e49738624578630693bfa63dd9fee1a 100644 (file)
@@ -23,7 +23,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 #include "test.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/test/test_read_format_mtree.c,v 1.3 2008/09/01 05:38:33 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/test/test_read_format_mtree.c,v 1.4 2008/09/18 04:13:36 kientzle Exp $");
 
 /* Single entry with a hardlink. */
 static unsigned char archive[] = {
index 2b9c1bb82940c95af7ab7630c9e07f6a78aa1970..ad8b9e92e5435650e89342ca356494d93e1967d8 100644 (file)
@@ -23,7 +23,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 #include "test.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/test/test_write_disk.c,v 1.14 2008/09/05 06:13:11 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/test/test_write_disk.c,v 1.15 2008/09/30 04:02:36 kientzle Exp $");
 
 #if ARCHIVE_VERSION_NUMBER >= 1009000