Deleted Added
sdiff udiff text old ( 216294 ) new ( 216594 )
full compact
1/*
2 * Copyright (c) 2001-2003
3 * Fraunhofer Institute for Open Communication Systems (FhG Fokus).
4 * All rights reserved.
5 *
6 * Author: Harti Brandt <harti@freebsd.org>
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.

--- 77 unchanged lines hidden (view full) ---

93struct snmpd_usmstat snmpd_usmstats;
94
95/* snmpEngine */
96struct snmp_engine snmpd_engine;
97
98/* snmpSerialNo */
99int32_t snmp_serial_no;
100
101/* search path for config files */
102const char *syspath = PATH_SYSCONFIG;
103
104/* list of all loaded modules */
105struct lmodules lmodules = TAILQ_HEAD_INITIALIZER(lmodules);
106
107/* list of loaded modules during start-up in the order they were loaded */
108static struct lmodules modules_start = TAILQ_HEAD_INITIALIZER(modules_start);

--- 247 unchanged lines hidden (view full) ---

356
357 return (SNMP_CODE_OK);
358}
359
360/*
361 * Check whether access to each of var bindings in the PDU is allowed based
362 * on the user credentials against the configured User groups & VACM views.
363 */
364static enum snmp_code
365snmp_pdu_auth_access(struct snmp_pdu *pdu, int32_t *ip)
366{
367 const char *uname;
368 int32_t suboid, smodel;
369 uint32_t i;
370 struct vacm_user *vuser;
371 struct vacm_access *acl;
372 struct vacm_context *vacmctx;

--- 1460 unchanged lines hidden (view full) ---

1833 exit(1);
1834 }
1835 if (or_register(&oid_begemotSnmpd, "The MIB module for the Begemot SNMPd.",
1836 NULL) == 0) {
1837 syslog(LOG_ERR, "cannot register begemotSnmpd MIB");
1838 exit(1);
1839 }
1840
1841 snmp_send_trap(&oid_coldStart, (struct snmp_value *)NULL);
1842
1843 while ((m = TAILQ_FIRST(&modules_start)) != NULL) {
1844 m->flags &= ~LM_ONSTARTLIST;
1845 TAILQ_REMOVE(&modules_start, m, start);
1846 lm_start(m);
1847 }
1848
1849 for (;;) {
1850#ifndef USE_LIBBEGEMOT
1851 evEvent event;
1852#endif
1853 struct lmodule *mod;
1854
1855 TAILQ_FOREACH(mod, &lmodules, link)
1856 if (mod->config->idle != NULL)

--- 1389 unchanged lines hidden ---