Re: keeping include: from overriding directives in the config

Kurt Cypher <[email protected]>
Newsgroups gmane.comp.web.htdig.general
Message-ID <[email protected]>
JupiterHost.Net wrote:
> 
> No need for any sort of special editor or interface, just in the config 
> file they do not have write access to does it need to be A or B:
> 
> a) if htdig uses the first instance of it then I need to specify it first:
> 
>   whatever: they shouldn't be able to change this
>   include: their/file
> 
> 
> b) if htdig uses the last instance of it then I need to specify it last
> to override anything they put in:
> 
>   include: their/file
>   whatever: they shouldn't be able to change this
> 
> Which way would make it so that even if they specified "whatever:" it 
> woudl still use the "whatever:" in the main config that they do not have 
> access to?
> 
> 

 From the definition of "include" at <http://www.htdig.org/confindex.html>

"The last definition of an attribute is the one that applies, so after 
including a file, any of its definitions can be overridden with 
subsequent definitions. This can be useful when setting up many 
configurations that are mostly the same, so all the common attributes 
can be maintained in a single configuration file. The include directives 
can be nested, but watch out for nesting loops."

So, according to that, anything you do not want the user to be able to 
change would need to be after the include statement, which would be 
option "B" above.

This paragraph does bring up the interesting point of what could happen 
if the user adds an include that references the main config file:

common.conf -> include: user.conf
user.conf -> include: common.conf

I don't know exactly how that would manifest itself, but I imagine it 
wouldn't be a good thing.

Kurt


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
ht://Dig general mailing list: <[email protected]>
ht://Dig FAQ: http://htdig.sourceforge.net/FAQ.html
List information (subscribe/unsubscribe, etc.)
https://lists.sourceforge.net/lists/listinfo/htdig-general
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.