Re: Config file handling

On Fri, Mar 21, 2003 at 02:15:52AM -0500, Pavel Roskin wrote:
> Not sure if it's the right fix.  Sometimes there is more that one way to
> write home directory.  For example. /home is a link to /usr/home by
> default on some versions of FreeBSD.

I don't see the problem. There are only 2 possibilities.
The profile in mc code is always descibed as

concat_dir_and_file (home_dir, PROFILE_NAME)


concat_dir_and_file (mc_home, "mc.ini")

it the first one doesn't exist.
We have to block saving the latter, so we can filter it out, or accept
only the first one, which is more safe (my patch implements it this

I can't see in which place (sym)links are a problem...

> More importantly, mc shouldn't even attempt to save anything to mc.ini.
> dump_profile() shouldn't be called for global files.  I think the fix
> should be in some other place.

Maybe. But AFAIK mc code doesn't know how to distinct global files
from personal ones besides path checking.



  _.|._ |_  _.   :  Adam Byrtek /alpha/
 (_|||_)| |(_|   :  email  alpha@(|
     |           :  jabber, pgp 0xB25952C0

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