Re: MC_PWD_FILE in mc-wrapper



On Fri, 15 Aug 2003, Figura Peter wrote:

> Mandrake 9.1, mc-4.6.0-1mdk.rpm
>
> login: peterf
> MC_PWD_FILE=/home/peterf/tmp/mc-peterf/mc.pwd.xxxx
>
> $su root
> MC_PWD_FILE=/root/tmp/mc-peterf/mc.pwd.xxxx
> but mc created a directory /root/tmp/mc-root !

Yes, I was told already that $USER is not reliable.

> 1c1,2
> < MC_PWD_FILE="${TMPDIR-/tmp}/mc-$USER/mc.pwd.$$"
> ---
> > # MC_PWD_FILE="${TMPDIR-/tmp}/mc-$USER/mc.pwd.$$"
> > MC_PWD_FILE="${TMPDIR-/tmp}/mc-${USERNAME-$USER}/mc.pwd.$$"

Why do you think that $USERNAME is better?  I cannot apply this patch
without explanation.  I think "id" is more portable than environment
variables, but it was told that the arguments to "id" are not portable.

-- 
Regards,
Pavel Roskin




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]