.Fl print0
option to
.Xr find 1 .
+.It Fl -numeric-owner
+(x mode only)
+Ignore symbolic user and group names when restoring archives to disk,
+only numeric uid and gid values will be obeyed.
.It Fl O
(x, t modes only)
In extract (-x) mode, files will be written to standard out rather than
OPTION_NO_SAME_OWNER,
OPTION_NO_SAME_PERMISSIONS,
OPTION_NULL,
+ OPTION_NUMERIC_OWNER,
OPTION_ONE_FILE_SYSTEM,
OPTION_POSIX,
OPTION_STRIP_COMPONENTS,
{ "no-same-owner", no_argument, NULL, OPTION_NO_SAME_OWNER },
{ "no-same-permissions",no_argument, NULL, OPTION_NO_SAME_PERMISSIONS },
{ "null", no_argument, NULL, OPTION_NULL },
+ { "numeric-owner", no_argument, NULL, OPTION_NUMERIC_OWNER },
{ "one-file-system", no_argument, NULL, OPTION_ONE_FILE_SYSTEM },
{ "posix", no_argument, NULL, OPTION_POSIX },
{ "preserve-permissions", no_argument, NULL, 'p' },
case OPTION_NULL: /* GNU tar */
bsdtar->option_null++;
break;
+ case OPTION_NUMERIC_OWNER: /* GNU tar */
+ bsdtar->option_numeric_owner++;
+ break;
case 'O': /* GNU tar */
bsdtar->option_stdout = 1;
break;
char option_no_owner; /* -o */
char option_no_subdirs; /* -n */
char option_null; /* --null */
+ char option_numeric_owner; /* --numeric-owner */
char option_stdout; /* -O */
char option_totals; /* --totals */
char option_unlink_first; /* -U */
if (r == ARCHIVE_FATAL)
break;
+ if (bsdtar->option_numeric_owner) {
+ archive_entry_set_uname(entry, NULL);
+ archive_entry_set_gname(entry, NULL);
+ }
+
/*
* Exclude entries that are too old.
*/