net-snmp "persistent data file" question

Joe Orton jorton at redhat.com
Mon Apr 11 12:31:01 UTC 2005


Hiya, a net-snmp question for you:

The latest php releases were changed to call snmp_shutdown("snmpapp")
when the php-snmp extension is shut down; this happens each time httpd
is restarted or stopped, or when /usr/bin/php exits.

It seems this wants to write a "persistent data file" at
/var/net-snmp/snmpapp.conf, which is not a particularly good location,
nor one permitted by the SELinux policy for httpd, so a bunch of spam
gets sent to stderr instead.  You can see this from a vanilla system 
using /usr/bin/php, when /var/net-snmp doesn't exist:

[root at trash ~]# php < /dev/null > /dev/null
No log handling enabled - turning on stderr logging
Creating directory: /var/net-snmp

So, some questions:

1. what is this data file for, do we need this file?
2. can the location be changed to something sensible, /var/lib/net-snmp 
for instance?
3. should PHP by passing something less generic than "snmpapp" in the 
init_snmp() and snmp_shutdown() calls?

Regards,

joe




More information about the fedora-devel-list mailing list