Ticket #2934: highlight OGV files as media.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Ticket #2913: CVE-2012-4463 mc-4.8.5: Does not sanitize MC_EXT_SELECTED variable properly

Paul Hartman reported the following (minor) security flaw into Gentoo's bugzilla:

https://bugs.gentoo.org/show_bug.cgi?id=436518

When multiple files are selected and F3 / Enter key is pressed on some of the files,
MC_EXT_SELECTED variable does not sanitize the whitespace characters properly
(leading into situation when first file is used as the actual value of MC_EXT_SELECTED
variable and the remaining files from the list are used as arguments passed to the
temporary script, created to handle F3 / Enter action on the first file).

A remote attacker could provide a specially-crafted archive and trick the local
Midnight Commander user into expanding and viewing it, which under certain
circumstances could lead to arbitrary code execution with the privileges of
the user running the mc executable.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
exec_get_export_variables(): reproduce bug in test

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Added tests for name_quote function.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Added parameter quotation

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Merge branch '2913_sanitize'

* 2913_sanitize:
  Added parameter quotation
  Added tests for name_quote function.
  exec_get_export_variables(): reproduce bug in test
  Ticket #2913: CVE-2012-4463 mc-4.8.5: Does not sanitize MC_EXT_SELECTED variable properly
Ticket #2924: attributes of existing directories are never preserved.

If superuser copies a directory tree (e.g. from a safe backup location
(with sane permission, owner, group, timestamp) over an existing tree,
any attributes are not preserved. All destination dirs retain all their
existing attributes instead of change attributes from source.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
(copy_dir_dir): refactoring: get rid of goto dont_mkdir.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
(copy_dir_dir): get rid of extra string duplication.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Merge branch '2924_preserve_dir_attributes'

* 2924_preserve_dir_attributes:
  (copy_dir_dir): get rid of extra string duplication.
  (copy_dir_dir): refactoring: get rid of goto dont_mkdir.
  Ticket #2924: attributes of existing directories are never preserved.
Ticket #2926: fail to check ncurses library

...if --with-ncurses-inc and --with-ncurses-libs options are used.

m4.include/mc-with-screen-ncurses.m4: clarify usage of LDFLAGS in
ncurses library checking: add $ac_curses_lib_path.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
m4.include/mc-with-screen-slang.m4: clarify usage of CPPFLAGS, CFLAGS and LDFLAGS

...in s-lang library checking.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
PCRE_CFLAGS are CPPFLAGS, actually.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Clarify usage of AM_CPPFLAGS.

Use AM_CPPFLAGS not AM_CFLAGS for includes. GLIB_CFLAGS are CPPFLAGS, actually.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Merge branch '2926_screen_lib_flags'

* 2926_screen_lib_flags:
  Clarify usage of AM_CPPFLAGS.
  PCRE_CFLAGS are CPPFLAGS, actually.
  m4.include/mc-with-screen-slang.m4: clarify usage of CPPFLAGS, CFLAGS and LDFLAGS
  Ticket #2926: fail to check ncurses library
Ticket #2883: non-portable test

Test has been rewritten for support actuality.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Fixed exec_get_export_variables_ext test

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Increase version of Check utility to 0.9.8

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Merge branch '2883_portable_tests'

* 2883_portable_tests:
  Increase version of Check utility to 0.9.8
  Fixed exec_get_export_variables_ext test
  Ticket #2883: non-portable test
Fixes in exec_get_export_variables_ext test

Signed-off-by: Slava Zanko <slavazanko@gmail.com>