[prev in list] [next in list] [prev in thread] [next in thread] 

List:       listar-dev
Subject:    [listar-dev] Re: [Listar] Feature roundup request for 0.125a
From:       JT <jtraub () dragoncat ! net>
Date:       1999-07-30 4:47:31
[Download RAW message or body]

On Fri, 30 Jul 1999, Martin Baehr wrote:
> what's wrong with 
>    administrivia-regexp-file = ../../skel/admin-regexp.
> ok, if its not checked right, then someone might access /etc/passwd that way,
> 
> or what about a prefix to denote listar-root?

that's exactly what <$listar-root> DOES! :) I would prefer to allow people
to place things where they want.   Yes, under my scheme someone could in
fact do welcome-file = /etc/password.   There isn't much we could do to
stop that except chrooting ourselves (requires root priveledge) or making
everything relative to the listar-root.   (this would *BREAK* debian
completely)

>    administrivia-regexp-file = /skel/admin-regexp.
>    administrivia-regexp-file = ~/skel/admin-regexp.
>    administrivia-regexp-file = +skel/admin-regexp.
>    administrivia-regexp-file = +/skel/admin-regexp.
> 
> about breaking current installs, what do you think about introducing a 
> variable that denotes the version of a config-file.

Yup.   And that was how I planned to handle it, and add a -upgrade switch.
Listar would read the config files, see the version you were upgrading
from and fix everything up in one swell foop.

> eachtime you access a configfile you check the versionnumber,
> if its an older one, then just special-case the whole file, instead of 
> specialcasing each variable...

I wouldn't want to run through this code every time through, much
preferring a specific upgrade switch on the program which did it once.
(speed and all that rot :)

> you could alos use this to alert the admin of problems:
> "your listar.cfg is version 0.114a, the following variables have been
> introduced since then: ... "
> 
> however, this could still be problematic since people edit these files
> by hand...

If done correctly, it would write out commented out versions of all the
new variables.   That would be all it needs to do.   Any variables set
would be munged (in the case of the change I was discussing) to be correct
for the new bits.  Any that weren't set would be written out as a
commented out version of the default so that the admin could look at them
and know what had changed.  Yes, a mail would need to be sent to the admin
as well I agree.

--JT

-- 
[-------------------------------------------------------------------------]
[ Practice random kindness and senseless acts of beauty.                  ]
[ It's hard to seize the day when you must first grapple with the morning ]
[-------------------------------------------------------------------------]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic