> Better coding practice to minimize the potential for abuse:

What "abuse"?  Someone hijacking the file by giving it their own permissions?  But the 
sysadm would have to have given them ownership or sufficient priviledges to change 
ownership.

I'm fairly new to net-snmp so I'm not indoctrinated in the philosphy.  To me it seems 
parsimonious to say, "if I'm rewriting a file, just keep the attributes the same" and 
wasteful to go adding new configuration everytime someone wants some slightly new 
behavior.  But maybe the maintainers don't mind a proliferation of configuration 
values.

> 1. Mode and user are obtained from configuration.
> 2. Unlink the file.
> 3. Write new persistent data to file.

Are you suggesting that we add new configure-time options (like PERSISTENT_MASK) to 
specify the owner, group, and mode of persistent data files?  Or that we add new 
variables in snmpd.conf?  Either way, the outline above seems wrong.  I'd think it 
would be:

1. Unlink the file (or copy to backup)  (this is existing).

2. Create new, empty file with configured user, group, and mode.

3. Let the persistent writing code do it's thing.  (this is existing).

No?




-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to