Config file handling

Adam Byrtek / alpha alpha at student.uci.agh.edu.pl
Fri Mar 21 22:06:03 UTC 2003


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)

or

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
way).

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.

Regards
Adam

-- 

  _.|._ |_  _.   :  Adam Byrtek /alpha/
 (_|||_)| |(_|   :  email  alpha@(irc.pl|debian.org)
     |           :  jabber alpha.pl(at)jabber.org, pgp 0xB25952C0



More information about the mc-devel mailing list