mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 12:56:51 +03:00
d393e2e098
* lib/mc.sh: create temporary files in ~/.mc/tmp in order to avoid symlink attacks (mcfn_install and the man page still needs to be updated). * src/main.c (print_mc_usage): Print the bug reporting address. (main): Put prompt in a new line at termination. * vfs/shared_ftp_fish.c (get_line): Fixed off by one error ('\0' might have been written one slot past the supplied character array). * vfs/ftpfs.c (resolve_symlink_without_ls_options): Don't dump core on strange symlinks (ls -la doesn't reveal where the symlink points to and ls -lLa doesn't resolve the symlink either) Added protection against recursive symbolic links.
11 lines
173 B
Bash
11 lines
173 B
Bash
mc ()
|
|
{
|
|
mkdir -p ~/.mc/tmp 2> /dev/null
|
|
chmod 700 ~/.mc/tmp
|
|
MC=~/.mc/tmp/mc$$-"$RANDOM"
|
|
/usr/bin/mc -P "$@" > "$MC"
|
|
cd "`cat $MC`"
|
|
rm "$MC"
|
|
unset MC;
|
|
}
|