Accept only position-sensitive (file-selection) options in file list files.
Using such options as -f, -z, etc. is senseless in the file list file and bypasses the option consistency checks in decode_options. Therefore, only options related to file selection (a.k.a position-sensitive options) are allowed in files. * doc/tar.texi: Document changes. * src/common.h (tar_args): Move from tar.c (TAR_ARGS_INITIALIZER): New macro. * src/names.c: Declare option group identifiers as an enum. (names_parse_opt): Special handling for ARGP_KEY_ERROR. (names_argp): Remove static qualifier. (names_argp_children): Remove. * src/tar.c: Declare option group identifiers as an enum. (parse_opt): Special handling for ARGP_KEY_INIT. (argp_children): New static variable. (args): Remove static variable. (more_options): Allow only options from names_argp. (parse_default_options): Take a pointer to struct tar_args as argument. Replace the loc member during the call to argp_parse and restore it afterwards. (decode_options): Use automatic variable for args.
This commit is contained in:
@@ -7730,9 +7730,12 @@ any leading and trailing whitespace. If the resulting string begins
|
||||
with @samp{-} character, it is considered a @command{tar} option and is
|
||||
processed accordingly@footnote{Versions of @GNUTAR{} up to 1.15.1
|
||||
recognized only @option{-C} option in file lists, and only if the
|
||||
option and its argument occupied two consecutive lines.}. For example,
|
||||
the common use of this feature is to change to another directory by
|
||||
specifying @option{-C} option:
|
||||
option and its argument occupied two consecutive lines.}. Only a
|
||||
subset of @GNUTAR{} options is allowed for use in file lists. For
|
||||
a list of such options, @ref{Position-Sensitive Options}.
|
||||
|
||||
For example, the common use of this feature is to change to another
|
||||
directory by specifying @option{-C} option:
|
||||
|
||||
@smallexample
|
||||
@group
|
||||
|
||||
Reference in New Issue
Block a user