~ubuntu-branches/ubuntu/precise/net-snmp/precise

« back to all changes in this revision

Viewing changes to agent/mibgroup/mibII/vacm_conf.c

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2009-11-26 01:27:00 UTC
  • mfrom: (1.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20091126012700-pox7w0a5j2x305h9
Tags: 5.4.2.1~dfsg-3ubuntu1
* Merge from debian testing.  Remaining changes:
  - Set Ubuntu maintainer address.
  - net-snmp-config: Use bash. (LP: #104738)
  - Removed multiuser option when calling update-rc.d. (LP: #254261)
  - debian/snmpd.init: LSBify the init script.
  - debian/patches/52_fix_snmpcmd_1_typo.patch: Adjust a typo in snmpcmd.1
    (LP: #250459)
  - debian/patches/99-fix-ubuntu-div0.patch: Fix dvision by zero.
    (LP: #426813).
 * Dropped patches:
   - debian/patches/101-fix-ipalias.patch: Applied upstream.
   - debian/patches/99-fix-net-snmp-syslog.patch: Applied upstream.
   - debian/patches/99-fix-perl-counter-in-subagent.patch: Applied upstream.
   - ebian/patches/103-fix-ubuntu-lmsensors.patch: No longer needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1118
1118
        name = "snmpd";
1119
1119
    
1120
1120
    if (!vacm_is_configured()) {
1121
 
        if (MASTER_AGENT == agent_mode) {
 
1121
        /*
 
1122
         *  An AgentX subagent relies on the master agent to apply suitable
 
1123
         *    access control checks, so doesn't need local VACM configuration.
 
1124
         *  The trap daemon has a separate check (see below).
 
1125
         *
 
1126
         *  Otherwise, an AgentX master or SNMP standalone agent requires some
 
1127
         *    form of VACM configuration.  No config means that no incoming
 
1128
         *    requests will be accepted, so warn the user accordingly.
 
1129
         */
 
1130
        if ((MASTER_AGENT == agent_mode) && (strcmp(name, "snmptrapd") != 0)) {
1122
1131
            snmp_log(LOG_WARNING,
1123
1132
                 "Warning: no access control information configured.\n  It's "
1124
1133
                 "unlikely this agent can serve any useful purpose in this "
1126
1135
                 "configure the %s.conf file for this agent.\n", name );
1127
1136
        }
1128
1137
 
1129
 
/*
1130
 
 * XXX - HACK ALERT!!
1131
 
 *
1132
 
 * This duplicates a definition from "apps/snmptrapd_ds.h"
1133
 
 */
 
1138
        /*
 
1139
         *  The trap daemon implements VACM-style access control for incoming
 
1140
         *    notifications, but offers a way of turning this off (for backwards
 
1141
         *    compatability).  Check for this explicitly, and warn if necessary.
 
1142
         *
 
1143
         *  NB:  The NETSNMP_DS_APP_NO_AUTHORIZATION definition is a duplicate
 
1144
         *       of an identical setting in "apps/snmptrapd_ds.h".
 
1145
         *       These two need to be kept in synch.
 
1146
         */
1134
1147
#ifndef NETSNMP_DS_APP_NO_AUTHORIZATION
1135
1148
#define NETSNMP_DS_APP_NO_AUTHORIZATION 17
1136
1149
#endif