Commit Graph

15385 Commits

Author SHA1 Message Date
Ulya Trofimovich
044cd3d806 Ticket #4298: misc.sh; fix view for files
...on systems that have no /bin/cat (like NixOS).

When opening .diff or .patch files mcview invokes /bin/cat. NixOS has no
/bin/cat (the path to cat looks like /run/current-system/sw/bin/cat).
However cat is still in PATH, so replace /bin/cat with just cat. This
should not affect other systems as /bin should normally be in PATH.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-10-30 19:10:11 +03:00
Andrew Borodin
8b79bfe32d (free_erase_list): test queue before free.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-10-02 11:41:07 +03:00
Marco Ciampa
7871db5258 Added autogenerated mc-version.h to the list of git-ignored files 2021-09-29 09:49:03 +02:00
Marco Ciampa
f5bcd63921 Updated Italian translation 2021-09-29 09:45:30 +02:00
Andrew Borodin
6f676d0667 Merge branch '1_smbfs_remove'
* 1_smbfs_remove:
  Update po/*.po files.
  Ticket #1: remove SMB suport.
2021-09-26 10:09:15 +03:00
Andrew Borodin
037c14d339 Update po/*.po files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-09-26 10:07:40 +03:00
Andrew Borodin
89d8fa4ac1 Ticket #1: remove SMB suport.
The mc's built-in samba library which is used to access data across
smb links is taken from an old samba version.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-09-26 10:03:49 +03:00
Andrew Borodin
30fbbe75b8 Merge branch '4285_sftp_symlink_timestamps'
* 4285_sftp_symlink_timestamps:
  (sftpfs_chmod): set permissions only, don't touch other attributes.
  Ticket #4285: sftp: timestamps are not preserved for uploaded symlink.
2021-09-26 09:57:39 +03:00
Andrew Borodin
c3ba19b422 (sftpfs_chmod): set permissions only, don't touch other attributes.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-09-11 20:34:21 +03:00
Andrew Borodin
8e5f8255e1 Ticket #4285: sftp: timestamps are not preserved for uploaded symlink.
* (sftpfs_symlink): don't call sftpfs_fix_filename() for target file
    bacause it breaks symlink: relative symlinks became an absolute one.
  * (sftpfs_utime): set timestamps only, don't touch other attributes.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-09-11 20:24:30 +03:00
Andrew Borodin
899c926fcb Merge branch '4281_fish_upload_link'
* 4281_fish_upload_link:
  Ticket #4281: fish upload: symbolic link along with its target.
2021-09-11 09:38:08 +03:00
Andrew Borodin
399f25fe9f Ticket #4281: fish upload: symbolic link along with its target.
fish/utime: use `touch -h` to change the times of the link itself
rather than the file that the link points to. -h implies -c
and thus will not create any new files.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-09-11 09:37:55 +03:00
Andrew Borodin
130e50ec89 Merge branch '4287_slow_move'
* 4287_slow_move:
  Ticket #4287: file move across filesystems is slow.
2021-09-06 21:33:03 +03:00
Andrew Borodin
1b39025049 Ticket #4287: file move across filesystems is slow.
src/filemanager/file.c: reimplement erase_list using GQueue instead of
GSlist to get rid of walk each time through the whole linked list.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-09-05 11:39:42 +03:00
Michael Stilkerich
4973eb00bb Ticket #4286: mcedit: fix errors in syntax definitions.
Fixed:
  - use of "grey" instead of "gray" (same for "lightgray");
  - use of space in keywords;
  - typos.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-09-04 18:36:27 +03:00
Andrew Borodin
6a855b1d1f Merge branch '4272_mc.ext_man_pages'
* 4272_mc.ext_man_pages:
  Ticket #4272: nc.ext: fix recognition of plain and compressed man pages.
2021-09-04 18:23:39 +03:00
Andrew Borodin
53b1bb63ac Ticket #4272: nc.ext: fix recognition of plain and compressed man pages.
Support various versions of file utility which output is changed from
one version to another:

$ file --version
file-4.26
magic file from /etc/magic:/usr/share/file/magic
$ file mc.1
mc.1: ASCII troff or preprocessor input text
$ file -z -L mc.1.gz
mc.1.gz: ASCII troff or preprocessor input text (gzip compressed data, was "mc.1", last modified: Tue Aug 24 08:17:47 2021, from Unix)

$ file --version
file-5.40
magic file from /etc/file/magic
eccomp support included
$ file mc.1
mc.1: troff or preprocessor input, ASCII text
$ file -z -L -S mc.1.gz
mc.1.gz: troff or preprocessor input, ASCII text (gzip compressed data, was "mc.1", last modified: Wed Aug 18 04:41:29 2021, from Unix)

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-08-29 19:42:10 +03:00
Andrew Borodin
a4cccdff0d Merge branch '4273_mc.ext'
* 4273_mc.ext:
  Ticket #4273: mc.ext reorganization.
2021-08-29 17:42:47 +03:00
Tomas Szepe
78f8f97fed Ticket #4273: mc.ext reorganization.
Fix mc.ext breakage caused by c3848a689c.

While reorganizing /etc/mc/mc.ext, the order of rules was changed in the file,
causing a bug where more general matches (e. g. any gzipped file) are made
before more specific ones (e. g. a gzip-compressed manpage).

Fix this by reverting to the original order of rules.

Signed-off-by: Tomas Szepe <szepe@pinerecords.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-08-29 17:12:10 +03:00
Andrew Borodin
375f2a764d Merge branch '4200_ncurses_disable_widec'
* 4200_ncurses_disable_widec:
  Ticket #4200: fix FTBFS with ncurses build with --disable-widec.
2021-08-28 11:52:10 +03:00
Andrew Borodin
e7bbf72544 Ticket #4200: fix FTBFS with ncurses build with --disable-widec.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-08-28 11:46:53 +03:00
Yury V. Zaytsev
2b7c21bac6 Update translations from Transifex
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2021-08-15 15:55:03 +02:00
Sergey Larin
2234fd8357 Ticket #4269: (edit_close_cmd): fix use-after-free.
The old 'w' pointer became invalid after widget_destroy() call, so we need
to get the new widget directly after find_editor.

Found using PVS-Studio 7.14 with intermodular analysis mode.

Signed-off-by: Sergey Larin <cerg2010cerg2010@mail.ru>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-08-09 21:29:23 +03:00
Andrew Borodin
eab84392ef Merge branch '4266_ac_init'
* 4266_ac_init:
  doc/NEWS: update.
  version.sh: output short mc git version to prevent full rebuild.
  Ticket #4266: fix AC_INIT call for automake >= 1.16.4.
2021-08-07 20:31:47 +03:00
Andrew Borodin
2482131509 doc/NEWS: update.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-08-07 20:29:05 +03:00
Andreas Mohr
fcfa089b53 version.sh: output short mc git version to prevent full rebuild.
When using exact git version in AC_INIT, every git commit result in different
AC_PACKAGE_VERSION and AC_PACKAGE_STRING macros at config.h
Hence this will cause a full rebuild (see #2252).

4.8.26-217-ge819ed742 -> 4.8.26-git
4.8.27-pre1-1-gcbc214da8 -> 4.8.27-pre1-git

TODO: tests needed for final version release workflow!

Signed-off-by: Andreas Mohr <and@gmx.li>
2021-08-07 20:29:05 +03:00
Andrew Borodin
6a4107b277 Ticket #4266: fix AC_INIT call for automake >= 1.16.4.
FTBFS with following messages:

autoreconf: running: aclocal -I m4 --force -I m4
configure.ac:31: error: AC_INIT should be called with package and version arguments
/usr/local/Cellar/automake/1.16.4/share/aclocal-1.16/init.m4:29: AM_INIT_AUTOMAKE is expanded from...
configure.ac:31: the top level
autom4te: error: /usr/local/opt/m4/bin/m4 failed with exit status: 1
aclocal: error: /usr/local/Cellar/autoconf/2.71/bin/autom4te failed with exit status: 1
autoreconf: error: aclocal failed with exit status: 1

Initial changeset: partial revert of 32621b96d1.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-08-07 20:29:05 +03:00
sdk
fdf2140bc4 Fixup previous commit.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-08-07 14:50:39 +03:00
sdk
f533b37bf5 Ticket #4267: support of (alt+)shift+arrow keys in st terminal emulator.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-08-04 21:42:54 +03:00
Andrew Borodin
cbc214da82 lib/tty/tty.c: fix indentation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-08-02 09:41:42 +03:00
Yury V. Zaytsev
34126e8f49 Update doc/NEWS file
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2021-08-01 20:31:54 +02:00
Yury V. Zaytsev
f3b0165dbf Update hints translations from Transifex
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2021-08-01 19:31:46 +02:00
Yury V. Zaytsev
822ad91f66 Update translations from Transifex
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2021-08-01 19:19:46 +02:00
Andrew Borodin
9e5535e2d9 Merge branch '4259_sftp_verify_fingerprint'
* 4259_sftp_verify_fingerprint:
  Update po/*.po files.
  SFTPFS: verify server fingerprint (fix CVE-2021-36370).
  (sftpfs_open_connection): handle EAGAIN for libssh2_session_handshake().
  Ticket #4259: SFTPFS VFS: verify server fingerprint (CVE-2021-36370).
2021-07-26 20:35:53 +03:00
Andrew Borodin
b745eacf0a Update po/*.po files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-07-26 20:34:33 +03:00
Andrew Borodin
9235d3c232 SFTPFS: verify server fingerprint (fix CVE-2021-36370).
Use ~/.ssh/known_hosts file to verify server fingerprint
using ssh way:

$ ssh localhost
The authenticity of host 'localhost (127.0.0.1)' can't be established.
ED25519 key fingerprint is SHA256:FzqKTNTroFuNUj1wUzSeV2x/1lpcESnT0ZRCmq5H6o8.
Are you sure you want to continue connecting (yes/no)? no
ssh: Host key verification failed.

$ ssh localhost
The authenticity of host 'localhost (127.0.0.1)' can't be established.
ED25519 key fingerprint is SHA256:FzqKTNTroFuNUj1wUzSeV2x/1lpcESnT0ZRCmq5H6o8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'localhost' (ED25519) to the list of known hosts.
andrew@localhost's password:

Thanks the Curl project for the used code.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Yury V. Zaytsev <yury.zaytsev@moneymeets.com>
2021-07-26 20:34:17 +03:00
Andrew Borodin
fdd6706245 (sftpfs_open_connection): handle EAGAIN for libssh2_session_handshake().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-07-26 20:34:17 +03:00
Andrew Borodin
b0450a1e18 Ticket #4259: SFTPFS VFS: verify server fingerprint (CVE-2021-36370).
This vulnerability was discovered by AUT-milCERT during an audit of open
source software.

Initial changeset: set minimal version of libssh2 to 1.2.8.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-07-26 20:33:48 +03:00
Andrew Borodin
fa9ea0d61c Merge branch '4260_ftp_file_month'
* 4260_ftp_file_month:
  Ticket #4260: ftpfs: the month of file is always January.
2021-07-13 21:32:43 +03:00
m_ok
36e48b04bd Ticket #4260: ftpfs: the month of file is always January.
(parse_ls_line): fix test of vfs_parse_month() value.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-07-13 21:32:35 +03:00
Andrew Borodin
0c04e23821 Merge branch '4198_hang_on_start_with_zsh'
* 4198_hang_on_start_with_zsh:
  Ticket #4198: MC hangs on start randomly with zsh as subshell.
2021-07-11 20:59:57 +03:00
Eric Roberts
e89713a3d6 Ticket #4198: MC hangs on start randomly with zsh as subshell.
The bug happens because MC tells the shell to perform a "cd" command,
and waits indefinitely for the command to complete. If the shell, for
some reason, cannot complete the "cd" command, MC just freezes
indefinitely.

This patch removes all instances of MC waiting indefinitely for "cd"
commands. Now, if the shell freezes while doing a "cd", MC will timeout
after 1 second, and just set the subshell state to ACTIVE. If the user
tries to run a command, they will get the error "The shell is already
running a command".

Some other stuff where MC waits on the shell if an error occurred is
also simplified.

In feed_subshell(), the timeout time is changed from 10 seconds to
1 second. Ten seconds seemed like far too long to wait.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-07-04 19:06:28 +03:00
Andrew Borodin
5c1d3c55dd Merge branch '4233_screen_tmux_mouse'
* 4233_screen_tmux_mouse:
  (tty_check_term): support tmux.
  Ticket #4233: enables mouse support in screen/tmux.
2021-07-04 18:52:28 +03:00
filip-hejsek
bc8020e942 (tty_check_term): support tmux.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-07-04 18:50:46 +03:00
filip-hejsek
a2377be2ee Ticket #4233: enables mouse support in screen/tmux.
(tty_check_term): don't check $DISPLAY in screen to enable mouse support there.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-07-04 18:50:46 +03:00
Andrew Borodin
0e6721c32b Ticket #4213: workaround to avoid crash on FreeBSD.
Previous fix 443a8106f1
makes the command line inaccessible if mc runs with
disabled subshell (mc -u).

This commit fixes the command line.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-07-03 18:59:38 +03:00
Andrew Borodin
7ef1925a98 (render_edit_text): fix endless loop.
Thanks Sebastian Gniazdowski <sgniazdowski@gmail.com> for the issue.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-06-27 15:02:49 +03:00
Andrew Borodin
a81f1ca190 Merge branch '4179_cleanup'
* 4179_cleanup: (62 commits)
  Update po/*.po files.
  src/filemanager/mountlist.c: recognize fuse.portal as dummy file system.
  (check_dir_is_empty): minor optimization.
  (do_move_dir_dir): remove unused variable.
  (sftpfs_open_file): don't destroy file handler here.
  (mc_serialize_config): fix memory leak.
  (load_group): fix use after free.
  (exec_extension): fix memory leak.
  (dir_list_reload): fix resource leak.
  mcedit: move macros-related stuff to editmacros.[ch].
  (extfs_open_archive): fix NULL dereferences.
  (vfs_findgid): fix overrunning string.
  (vfs_finduid): fix overrunning string.
  (exec_make_shell_string): simplify condition, reduce variable scope.
  (panel_recursive_cd_to_parent): fix memory leak.
  (mc_skin_color_parse_ini_file): fix memory leak.
  (apply_rules_going_right): fix deadcode.DeadStores warning.
  (edit_replace_cmd): fix deadcode.DeadStores warning.
  (edit_draw_this_line): fix deadcode.DeadStores warning.
  (edit_do_search): search descriptor should not be NULL.
  ...
2021-06-20 16:18:30 +03:00
Andrew Borodin
6b9a2bbd48 Update po/*.po files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-06-20 16:16:46 +03:00
Andrew Borodin
eb58d94341 src/filemanager/mountlist.c: recognize fuse.portal as dummy file system.
Sync with gnulib 9a38d499ca16f2f4304992eb1ab0894cd0b478e1.

Add "fuse.portal" as a dummy file system (used in flatpak
implementations).

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-06-20 16:16:46 +03:00