.\"
.\" $FreeBSD$
.\"
-.Dd February 23, 2017
+.Dd February 24, 2017
.Dt TAR 1
.Os
.Sh NAME
restricted pax format and bzip2 compression.
.It Fl Fl acls
(c, r, u, x modes only)
-Archive or extract ACLs. This is the reverse of
+Archive or extract POSIX.1e or NFSv4 ACLs. This is the reverse of
.Fl Fl no-acls
-and the default behavior in c, r, and u modes or if
+and the default behavior in c, r, and u modes (except Mac OS X) or if
.Nm
-is run in x mode as root.
+is run in x mode as root. On Mac OS X this option translates extended ACLs
+to NFSv4 ACLs. To store extended ACLs the
+.Fl Fl mac-metadata
+option is preferred.
.It Fl B , Fl Fl read-full-blocks
Ignored for compatibility with other
.Xr tar 1
By default, the modification time is set to the time stored in the archive.
.It Fl Fl mac-metadata
(c, r, u and x mode only)
-Mac OS X specific. Archive or extract ACLs and extended attributes using
+Mac OS X specific. Archive or extract extended ACLs and extended attributes
+using
.Xr copyfile 3
in AppleDouble format. This is the reverse of
.Fl Fl no-mac-metadata .
.Xr find 1 .
.It Fl Fl no-acls
(c, r, u, x modes only)
-Do not archive or extract ACLs. This is the reverse of
+Do not archive or extract POSIX.1e or NFSv4 ACLs. This is the reverse of
.Fl Fl acls
and the default behavior if
.Nm
-is run as non-root in x mode.
+is run as non-root in x mode (on Mac OS X also in c, r and u modes).
.It Fl Fl no-fflags
(c, r, u, x modes only)
Do not archive or extract file flags. This is the reverse of
if (getenv(COPYFILE_DISABLE_VAR))
bsdtar->readdisk_flags &= ~ARCHIVE_READDISK_MAC_COPYFILE;
#endif
+#if defined(__APPLE__)
+ /*
+ * On Mac OS ACLs are archived with copyfile() (--mac-metadata)
+ * Translation to NFSv4 ACLs has to be requested explicitly with --acls
+ */
+ bsdtar->readdisk_flags |= ARCHIVE_READDISK_NO_ACL;
+#endif
+
bsdtar->matching = archive_match_new();
if (bsdtar->matching == NULL)
lafe_errc(1, errno, "Out of memory");