* lib/mc-wrapper.csh.in: Use "id" command to find the real user

id.  $USER is not reliable.
* lib/mc-wrapper.sh.in: Likewise.
Reported by Figura Peter <peterf@autus.sk>
This commit is contained in:
Pavel Roskin 2003-08-18 16:44:22 +00:00
parent d521073663
commit 807db8eda2
3 changed files with 13 additions and 3 deletions

View File

@ -1,3 +1,10 @@
2003-08-18 Pavel Roskin <proski@gnu.org>
* lib/mc-wrapper.csh.in: Use "id" command to find the real user
id. $USER is not reliable.
* lib/mc-wrapper.sh.in: Likewise.
Reported by Figura Peter <peterf@autus.sk>
2003-08-18 Andrew V. Samoilov <sav@bcs.zp.ua>
* acinclude.m4 (MC_WITH_NCURSES): Fix ESCDELAY check on Solaris.

View File

@ -1,7 +1,9 @@
set MC_USER="`id | sed 's/[^(]*(//;s/).*//'`"
if ($?TMPDIR) then
setenv MC_PWD_FILE $TMPDIR/mc-$USER/mc.pwd.$$
setenv MC_PWD_FILE $TMPDIR/mc-$MC_USER/mc.pwd.$$
else
setenv MC_PWD_FILE /tmp/mc-$USER/mc.pwd.$$
setenv MC_PWD_FILE /tmp/mc-$MC_USER/mc.pwd.$$
endif
@bindir@/mc -P "$MC_PWD_FILE" $*

View File

@ -1,4 +1,5 @@
MC_PWD_FILE="${TMPDIR-/tmp}/mc-$USER/mc.pwd.$$"
MC_USER=`id | sed 's/[^(]*(//;s/).*//'`
MC_PWD_FILE="${TMPDIR-/tmp}/mc-$MC_USER/mc.pwd.$$"
@bindir@/mc -P "$MC_PWD_FILE" "$@"
if test -r "$MC_PWD_FILE"; then