mc/lib/mc.sh
Norbert Warmuth d393e2e098 1999-08-30 Norbert Warmuth <nwarmuth@privat.circular.de>
* 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.
1999-08-30 06:01:37 +00:00

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;
}