> /me is done thinking (yeah, right...)

Well, you wouldn't want to overdo it....

> Issues:
> 
> 1) I don't think we should switch back to root to write files
> 2) I think the files should be owned by something other than root if
>    they need to be written to by an agent running as a different user.

OK - so that was the immediate question that triggered this discussion.


> 3) I think the correct fix is actually to define which tokens are
>    allowed to exist in the persistent storage file.  Something like...:
 
>    if (user != root && file_owner == process_owner &&
>        ! netsnmp_ds_get_boolean(NEW_FLAG_FOR_ALLOW_ANYWAY)
>        token_is_not_registered_for_persistance(current_token)) {
>      log errer
>      skip to next line
>    }

This feels to be veering towards the deeper discussion we had a year
or so back about developing a more flexible configuration mechanism.
Not just what directives should be saved out into the persistent
file, but what settings make the corresponding value "read-only",
what can be overridden temporarily, what permanently (as here), etc.

I'll try and dig out the comments from last time round, but that'll
be tomorrow.  But I'd suggest that if we're going to follow this
line of attack, that we consider as general a design as possible
(and then think about how to map the current API onto it) - rather
than extending the config mechanism bit by bit.

Dave

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


-------------------------------------------------------
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
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to