Commit Graph

13359 Commits

Author SHA1 Message Date
Andrew Borodin
b3f5a0ae5e libssh2_session_startup() is deprecated in libssh2 >= 1.2.8.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-13 16:35:13 +03:00
Andreas Mohr
e740c7d3e5 SFTP: refactoring.
Re-order open_connection and reverse re-order close_connection steps.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-13 16:35:13 +03:00
Andreas Mohr
ece1d020fa SFTP: minor refactoring.
sftpfs_super_data created at sftpfs_cb_open_connection() was freed at sftpfs_close_connection().
It should be sftpfs_cb_close_connection() for logical right location.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-13 16:35:13 +03:00
Andreas Mohr
298273b8f5 (sftpfs_close_connection): fix connection memleaks.
mc missing to free up sftp session data.
This disclose that mc misleadingly freed an internal libssh2.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-13 16:35:13 +03:00
Andreas Mohr
49b59018c9 (sftpfs_close_connection): fix connection memleaks.
When sftpfs_open_connection failed free elements at sftpfs_close_connection().
This was not happen when mcerror was set.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-13 16:35:13 +03:00
Andrew Borodin
0376fb50e0 Ticket #3581: various SFTP fixes.
(sftpfs_cb_open_connection): initialise sftpfs_super_data_t::socket_handle correctrly.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-13 16:35:13 +03:00
Denys Vlasenko
9dcf03342a doc: man pages fixes
sentitive -> sensitive
cusor     -> cursor
toglle    -> toggle
"the the" -> the

Fixed bad English in a number of places.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2016-02-11 21:41:17 +01:00
Andrew Borodin
c49d7f76b0 tests/lib/serialize.c: fix error codes.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-02 10:08:08 +03:00
Andrew Borodin
2fa5952097 Merge branch '3269_error_message'
* 3269_error_message:
  Update po/*.po files.
  Clarify some error messages using error code.
  Use meaningful errno or 0.
  Ticket #3269: only print meaningful error code.
2016-02-02 09:47:23 +03:00
Andrew Borodin
ba27f137e6 Update po/*.po files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-02 09:46:20 +03:00
Andrew Borodin
6fac768fbf Clarify some error messages using error code.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-02 09:42:51 +03:00
Andreas Mohr
b9797d6637 Use meaningful errno or 0.
Use real errno or set it to 0 when no meaningful error code exists
for current user error message.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-02 09:42:51 +03:00
Andreas Mohr
842a723f9b Ticket #3269: only print meaningful error code.
Some error messages have no meaningful error code, don't display them.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-02 09:42:51 +03:00
Andrew Borodin
88b01bde42 Merge branch '3491_case_sens_search'
* 3491_case_sens_search:
  Ticket #3491: fix case insensitive search in non-unicode locales.
2016-02-02 09:37:48 +03:00
Andrew Borodin
98e66fe406 Ticket #3491: fix case insensitive search in non-unicode locales.
In non-unicode locales, search for non-latin symbols in any acharset was
case sensitive only.  This bug was introduced in
1a1496fc0d.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-02 09:37:15 +03:00
Andrew Borodin
f672aa859a Merge branch '2673_lzip'
* 2673_lzip:
  Ticket #2673: support LZIP compression.
2016-01-28 16:46:45 +03:00
Andrew Borodin
8fc0e1d76d Ticket #2673: support LZIP compression.
Thanks Matias A. Fonzo <selk at dragora.org> for the original patch.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-28 16:45:36 +03:00
Andrew Borodin
20bf50e776 Merge branch '3588_mini_format'
* 3588_mini_format:
  Ticket #2588: cannot set mini-format for "brief" listing type.
2016-01-28 16:28:47 +03:00
Mooffie
2347ac38b6 Ticket #2588: cannot set mini-format for "brief" listing type.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-28 16:28:30 +03:00
Andrew Borodin
b315bbc68e Merge branch '3582_info_panel_buffer_overflow'
* 3582_info_panel_buffer_overflow:
  Ticket #3582: fix infopanel overflow
2016-01-17 12:23:37 +03:00
Andreas Mohr
30b6888fcc Ticket #3582: fix infopanel overflow
Testcase: hit C-x i on a file and delete this file

==13429==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x607000031c48 at pc 0x0000005fd41b bp 0x7ffca3f466c0 sp 0x7ffca3f466b8
WRITE of size 4 at 0x607000031c48 thread T0
    #0 0x5fd41a in dirsize_status_deinit_cb /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/file.c:2557:24
    #1 0x7f333f2bda2f in status_msg_deinit /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/wtools.c:619:9
    #2 0x602fe3 in panel_operate_init_totals /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/file.c:1352:9
    #3 0x5fe784 in panel_operate /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/file.c:2840:13
    #4 0x528328 in copy_cmd /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/cmd.c:797:9
    #5 0x528328 in midnight_execute_cmd /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/midnight.c:1139
    #6 0x7f333f291949 in buttonbar_callback /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/buttonbar.c:172:42
    #7 0x7f333f296245 in send_message /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/../../lib/widget/widget-common.h:167:15
    #8 0x7f333f296245 in dlg_try_hotkey /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/dialog.c:464
    #9 0x7f333f296245 in dlg_key_event /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/dialog.c:509
    #10 0x7f333f296245 in dlg_process_event /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/dialog.c:1236
    #11 0x7f333f2979c7 in frontend_dlg_run /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/dialog.c:570:9
    #12 0x7f333f296565 in dlg_run /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/dialog.c:1267:5
    #13 0x4fc7b8 in create_panels_and_run_mc /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/midnight.c:954:5
    #14 0x4fc7b8 in do_nc /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/midnight.c:1757
    #15 0x4fc7b8 in main /tmp/portage/app-misc/mc-9999/work/mc-9999/src/main.c:401
    #16 0x7f333d7fc953 in __libc_start_main (/lib64/libc.so.6+0x20953)
    #17 0x4270e8 in _start (/tmp/portage/app-misc/mc-9999/work/mc-9999/src/.libs/mc+0x4270e8)

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-17 12:22:57 +03:00
Andrew Borodin
0074e39a68 Merge branch '3433_zip_dir_perms'
* 3433_zip_dir_perms:
  Ticket #3433: extfs/uzip: adjust abnormal directory permission.
2016-01-17 10:50:30 +03:00
Andreas Mohr
2e04dfd8f6 Ticket #3433: extfs/uzip: adjust abnormal directory permission.
unzip 6.0 source reveal that unzip depends on filename and less on given zip object attribute.

zipinfo can show something like
    Unix file attributes (177777 octal):            ?rwsrwsrwt
but unzip handle this object as directory if filename ended on '/'.

In this case adjust permission string for reasonable extfs handling
for all other cases uzip remain conservative and relay on proper permission.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-17 10:49:50 +03:00
Andrew Borodin
27c4c474a7 Merge branch '3412_device_link_info'
* 3412_device_link_info:
  Ticket #3412: info panel: rely on realpath for device info.
2016-01-17 10:35:02 +03:00
Andreas Mohr
c1ea489753 Ticket #3412: info panel: rely on realpath for device info.
When cd_symlinks is enabled cwd_vpath isn't pointed to real path.
Hence device info may wrong.

(Support for local filesystems only.)

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-17 10:28:33 +03:00
Andrew Borodin
1ba4e3015e Merge branch '3214_inode_info'
* 3214_inode_info:
  Ticket #3214: avoid invalid free nodes display.
2016-01-17 10:20:37 +03:00
Andreas Mohr
bcbea25234 Ticket #3214: avoid invalid free nodes display.
nfree and nodes can be -1. Don't print such numbers at info panel.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-17 10:18:01 +03:00
Yury V. Zaytsev
f74754c03d Merge branch '3578_mcext_fixes'
* 3578_mcext_fixes:
  Ticket #3115: add mc.ext patterns for initramfs / initrd (Red Hat and Debian)
  Ticket #3578: fix mc.ext patterns for different makefiles
  Ticket #3578: (regex_command_for) match filename, not full path in mc.ext
2016-01-12 21:11:41 +01:00
Yury V. Zaytsev
466a6f71bf Ticket #3115: add mc.ext patterns for initramfs / initrd (Red Hat and Debian)
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2016-01-10 16:59:47 +01:00
Yury V. Zaytsev
c27c5cf37d Ticket #3578: fix mc.ext patterns for different makefiles
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2016-01-10 16:59:47 +01:00
Andrew Borodin
e7bdd9c5b2 Ticket #3578: (regex_command_for) match filename, not full path in mc.ext
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2016-01-10 16:59:46 +01:00
Marco Ciampa
ac9dd488f9 Updated Italian translation 2016-01-08 21:49:17 +01:00
Andrew Borodin
209b616816 Merge branch '3569_listbox_fixups'
* 3569_listbox_fixups:
  Ticket #3161: WListbox: remember focus state.
  Ticket #3565: "External Panelize": use WListbox's notification. notification.
  Ticket #3563: "Directory hotlist": use WListbox's change notification.
  Ticket #3569: various fixups in WListbox engine.
2016-01-08 13:28:00 +03:00
Andreas Mohr
47590152fa Ticket #3161: WListbox: remember focus state.
When listbox is updated, e.g. new file match add MSG_DRAW event is triggered
but currently listbox re-draw has no knowledge about right focus state.
Fix it by remember current focus state.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-08 12:49:30 +03:00
Mooffie
755a2b820e Ticket #3565: "External Panelize": use WListbox's notification. notification.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-08 12:32:13 +03:00
Mooffie
e7fdb55005 Ticket #3563: "Directory hotlist": use WListbox's change notification.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-08 12:00:13 +03:00
Mooffie
aa693fb0c3 Ticket #3569: various fixups in WListbox engine.
Ticket #3562: Listbox should fire MSG_ACTION on mouse clicks too.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-08 11:40:42 +03:00
Phil Friderici
b4c550e23e Add Puppet v4 & stdlib keywords
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-07 09:04:35 +03:00
Andrew Borodin
f7b360d5a0 Fix typo.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-03 15:39:57 +03:00
Andrew Borodin
bc200742d1 Indentation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-03 15:36:09 +03:00
Andrew Borodin
1fc5dd5986 Merge branch '3443_patch_xz'
* 3443_patch_xz:
  Ticket #3443: patchfs extfs: support xz compression.
2016-01-03 11:23:05 +03:00
Holger Bruenjes
d0435fcfee Ticket #3443: patchfs extfs: support xz compression.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-03 11:21:28 +03:00
Andrew Borodin
82e434de1d Merge branch '3527_uc1541'
* 3527_uc1541:
  Ticket #3527: uc1541 extfs: update version.
2016-01-03 10:50:05 +03:00
Andrew Borodin
6dcba5568f Ticket #3527: uc1541 extfs: update version.
The current version is 2.8: besides of some tweaks and fixes,
support for compressed disk images was introduced.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-03 10:47:23 +03:00
Andrew Borodin
3468493968 Merge branch '3579_mcedit_buffer_overflow'
* 3579_mcedit_buffer_overflow:
  (edit_get_bracket): minor optimisation.
  Ticket #3579: (edit_get_bracket): fix buffer overflow.
2016-01-03 10:32:35 +03:00
Andrew Borodin
123ab6e1bf (edit_get_bracket): minor optimisation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-03 10:26:47 +03:00
Andreas Mohr
6dad88df1c Ticket #3579: (edit_get_bracket): fix buffer overflow.
Testcase:
create file with byte 0x28 and byte 0x00 -> open in mcedit -> move cursors

Found by Clang/AddressSanitizer

==3716==ERROR: AddressSanitizer: global-buffer-overflow on address 0x00000068886a at pc 0x000000598c09 bp 0x7ffeed4b0350 sp 0x7ffeed4b0348
READ of size 1 at 0x00000068886a thread T0
    #0 0x598c08 in edit_get_bracket /tmp/portage/app-misc/mc-9999/work/mc-9999/src/editor/edit.c:1525:9
    #1 0x58ea18 in edit_find_bracket /tmp/portage/app-misc/mc-9999/work/mc-9999/src/editor/edit.c:3173:32
    #2 0x596ed4 in edit_execute_cmd /tmp/portage/app-misc/mc-9999/work/mc-9999/src/editor/edit.c:3960:5
    #3 0x58ed08 in edit_execute_key_command /tmp/portage/app-misc/mc-9999/work/mc-9999/src/editor/edit.c:3224:5
    #4 0x5c4dcd in edit_callback /tmp/portage/app-misc/mc-9999/work/mc-9999/src/editor/editwidget.c:1136:17
    #5 0x7f80f324ca11 in send_message /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/../../lib/widget/widget-common.h:167:15
    #6 0x7f80f324ca11 in dlg_key_event /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/dialog.c:515
    #7 0x7f80f324ca11 in dlg_process_event /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/dialog.c:1236
    #8 0x7f80f324e0b7 in frontend_dlg_run /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/dialog.c:570:9
    #9 0x7f80f324cc35 in dlg_run /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/dialog.c:1267:5
    #10 0x5c1719 in edit_files /tmp/portage/app-misc/mc-9999/work/mc-9999/src/editor/editwidget.c:1255:9
    #11 0x5c0426 in edit_file /tmp/portage/app-misc/mc-9999/work/mc-9999/src/editor/editwidget.c:1194:10
    #12 0x5f048b in edit_file_at_line /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/cmd.c:704:9
    #13 0x52bf9c in do_edit /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/cmd.c:168:5
    #14 0x52bf9c in edit_cmd /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/cmd.c:742
    #15 0x52bf9c in midnight_execute_cmd /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/midnight.c:1175
    #16 0x7f80f3248019 in buttonbar_callback /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/buttonbar.c:172:42
    #17 0x7f80f324c915 in send_message /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/../../lib/widget/widget-common.h:167:15
    #18 0x7f80f324c915 in dlg_try_hotkey /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/dialog.c:464
    #19 0x7f80f324c915 in dlg_key_event /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/dialog.c:509
    #20 0x7f80f324c915 in dlg_process_event /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/dialog.c:1236
    #21 0x7f80f324e0b7 in frontend_dlg_run /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/dialog.c:570:9
    #22 0x7f80f324cc35 in dlg_run /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/dialog.c:1267:5
    #23 0x4fc967 in create_panels_and_run_mc /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/midnight.c:954:5
    #24 0x4fc967 in do_nc /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/midnight.c:1757
    #25 0x4fc967 in main /tmp/portage/app-misc/mc-9999/work/mc-9999/src/main.c:463
    #26 0x7f80f17c2953 in __libc_start_main (/lib64/libc.so.6+0x20953)
    #27 0x427008 in _start (/usr/bin/mc+0x427008)

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-03 10:22:44 +03:00
Andrew Borodin
221c75c90e Merge branch '3509_man_not_portable'
* 3509_man_not_portable:
  Ticket #3509: fix not portable invocation of man.
2016-01-03 08:41:17 +03:00
Ranjan1018
7dc7eb3d14 Ticket #3509: fix not portable invocation of man.
mc called "man -l" to display man page files, which is not correct on OS X,
FreeBSD, etc, so patch out the -l to make it work.

Original patch: https://svnweb.freebsd.org/ports/head/misc/mc/files/patch-misc__ext.d__text.sh.in?annotate=382039&pathrev=382039

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-03 08:36:55 +03:00
Andrew Borodin
4d92e9191e Merge branch '3550_unset_mc_user'
* 3550_unset_mc_user:
  Ticket #3550: unset MC_USER.
2016-01-02 20:37:56 +03:00