Commit Graph

15296 Commits

Author SHA1 Message Date
Andrew Borodin
4fce4fa7c3 sftpfs: trivial optimization.
* (sftpfs_opendir): call sftpfs_fix_filename() before loop.
  * (sftpfs_mkdir): likewise.
  * (sftpfs_rmdir): likewise.
  * (sftpfs_open_file): likewise.
  * (sftpfs_stat_init): likewise.
  * (sftpfs_readlink): likewise.
  * (sftpfs_utime): likewise.
  * (sftpfs_chmod): likewise.
  * (sftpfs_unlink): likewise.
  * (sftpfs_rename): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-11-21 15:00:39 +03:00
Andrew Borodin
6623a9014f (panel_operate): update panel content before screen refresh.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-11-21 15:00:33 +03:00
Andrew Borodin
022c3d2f94 Refactoring of file operations.
(copy_cmd, copy_cmd_local, rename_cmd, rename_cmd_local, delete_cmd,
delete_cmd_local): move same code to panel_operate(), make inline.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-11-21 14:57:43 +03:00
Andrew Borodin
d410af27c0 (start_search): ret rid of extra screen redraw.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-11-21 14:57:43 +03:00
Andrew Borodin
cac689a81a Get rid of extra update of mini info.
(stop_search): don't update mini info if quick search is incative.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-11-21 14:57:43 +03:00
Andrew Borodin
d19b247c6d Ticket #4384: fix accelerator conflict in Left/Right menu.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-11-21 14:57:43 +03:00
Andy Alt
b71b7ea9d3 Ticket #4270: code clean up before 4.8.28 release.
MidnightCommander/#165: doc/README: grammar.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-11-21 14:57:43 +03:00
Andrew Borodin
b8262f22e8 Merge branch '3887_endianness'
* 3887_endianness:
  Ticket #3887: (handle_console_linux): fix endianness bug.
2021-11-21 14:50:39 +03:00
Andrew Borodin
a3d323c6b3 Ticket #3887: (handle_console_linux): fix endianness bug.
handle_console_linux() passes the address of action to write() and intends
to send one byte of data (the LSB). On LE this works, but one BE machines
this sends the MSB which is always zero. Fix this by assigning the value
first to a char type, and use that instead.

Thanks Sven Schnelle <svens@stackframe.org> for the original patch.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-11-21 14:49:46 +03:00
Andrew Borodin
53143b08a0 Merge branch '4150_mcview_MC_EXT_BASENAME'
* 4150_mcview_MC_EXT_BASENAME:
  Ticket #4150: support file/dir macros for standalone mcviewer.
2021-11-14 19:59:50 +03:00
Andrew Borodin
f1e2f0e93d Ticket #4150: support file/dir macros for standalone mcviewer.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-10-31 09:49:45 +03:00
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