unzip: document some options we might support
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
75197998c2
commit
029740a3e4
1 changed files with 7 additions and 0 deletions
|
@ -559,6 +559,11 @@ int unzip_main(int argc, char **argv)
|
||||||
* 204372 1 file
|
* 204372 1 file
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
//TODO: accept and ignore these?
|
||||||
|
// -a convert to text files with 't' label, -aa: all files
|
||||||
|
// -b do not convert to text - bbox: we don't convert anything
|
||||||
|
// -D skip restoration of timestamps for extracted items - bbox: we don't restore these (yet?)
|
||||||
|
// -X restore user:group ownership
|
||||||
opts = 0;
|
opts = 0;
|
||||||
/* '-' makes getopt return 1 for non-options */
|
/* '-' makes getopt return 1 for non-options */
|
||||||
while ((i = getopt(argc, argv, "-d:lnotpqxjvK")) != -1) {
|
while ((i = getopt(argc, argv, "-d:lnotpqxjvK")) != -1) {
|
||||||
|
@ -583,6 +588,7 @@ int unzip_main(int argc, char **argv)
|
||||||
xmove_fd(xopen("/dev/null", O_WRONLY), STDOUT_FILENO);
|
xmove_fd(xopen("/dev/null", O_WRONLY), STDOUT_FILENO);
|
||||||
/*fallthrough*/
|
/*fallthrough*/
|
||||||
|
|
||||||
|
// NB: -c extract files to stdout/screen (unlike -p, also prints .zip and file names to stdout)
|
||||||
case 'p': /* Extract files to stdout */
|
case 'p': /* Extract files to stdout */
|
||||||
dst_fd = STDOUT_FILENO;
|
dst_fd = STDOUT_FILENO;
|
||||||
/*fallthrough*/
|
/*fallthrough*/
|
||||||
|
@ -853,6 +859,7 @@ int unzip_main(int argc, char **argv)
|
||||||
unzip_skip(zip.fmt.extra_len);
|
unzip_skip(zip.fmt.extra_len);
|
||||||
|
|
||||||
/* Guard against "/abspath", "/../" and similar attacks */
|
/* Guard against "/abspath", "/../" and similar attacks */
|
||||||
|
// NB: UnZip 6.00 has option -: to disable this
|
||||||
overlapping_strcpy(dst_fn, strip_unsafe_prefix(dst_fn));
|
overlapping_strcpy(dst_fn, strip_unsafe_prefix(dst_fn));
|
||||||
|
|
||||||
/* Filter zip entries */
|
/* Filter zip entries */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue