Hi Jochen, > > The following patch deactivate IPv6 support, which is not supported on > > Hurd yet. It also deactivate a few modules, as collecting the > > host/routing/... information on Hurd is not that simple, as the > > information is not centralized, and there is no working solution yet. > > We'll reactivate those features as soon as a proper solution is > > available, but in the time being this package is blocking plenty of > > other packages having SNMP as _optional_ feature, so we'd like to > > unblock them. With the following patch the snmpd daemon is fully working > > even if it has not much information to give. > > > > Please note that part of this patch is a fix of the upstream code, as > > deactivating the mibII module should also deactivate all of its > > functions, but the VACM config calls are not, thus creating a build > > failure. So this part is absolutely not Hurd specific. > > could you have a look at the current 5.4.2.1 package in unstable and rebase > your patch? I'd like to upload this together with the patch from #557244.
On behalf on Marc, I have updated his work to current net-snmp (5.4.2.1~dfsg-3). The resulting patches are attached: - 61_vacm_missing_dependency_check.{patch,README}: the original Marc's patch, refreshed, with readme renamed to match patch file (like other patches) - hurd.diff: the needed changes to the debian/rules. They slightly differ from Marc's initial version: - the host check is done using DEB_HOST_ARCH_OS, like for the other archs - the "host" module is added for any non-hurd host - the link creation of config.{guess,sub} now forces the overwriting of the target destination (as they seem to exist already?) - ipv6 is enabled on Hurd, it seems it is compiling correctly now Thanks, -- Pino Toscano
--- a/agent/agent_read_config.c +++ b/agent/agent_read_config.c @@ -282,7 +282,9 @@ snmp_call_callbacks(SNMP_CALLBACK_APPLICATION, SNMPD_CALLBACK_PRE_UPDATE_CONFIG, NULL); free_config(); +#ifdef USING_MIBII_VACM_CONF_MODULE vacm_standard_views(0,0,NULL,NULL); +#endif read_configs(); } --- a/apps/snmptrapd.c +++ b/apps/snmptrapd.c @@ -1477,7 +1477,9 @@ trapd_update_config(void) { free_config(); +#ifdef USING_MIBII_VACM_CONF_MODULE vacm_standard_views(0,0,NULL,NULL); +#endif read_configs(); } --- a/apps/snmptrapd_auth.c +++ b/apps/snmptrapd_auth.c @@ -32,8 +32,10 @@ netsnmp_trapd_auth); traph->authtypes = TRAP_AUTH_NONE; +#ifdef USING_MIBII_VACM_CONF_MODULE /* register our configuration tokens for VACM configs */ init_vacm_config_tokens(); +#endif /* register a config token for turning off the authorization entirely */ netsnmp_ds_register_config(ASN_BOOLEAN, "snmptrapd", "disableAuthorization", @@ -109,6 +111,7 @@ return NETSNMPTRAPD_HANDLER_FINISH; } +#ifdef USING_MIBII_VACM_CONF_MODULE /* check the pdu against each typo of VACM access we may want to check up on later. We cache the results for future lookup on each call to netsnmp_trapd_check_auth */ @@ -125,6 +128,7 @@ } } DEBUGMSGTL(("snmptrapd:auth", "Final bitmask auth: %x\n", ret)); +#endif if (ret) { /* we have policy to at least do "something". Remember and continue. */
Do not call vacm_standard_views() if the corresponding module was not compiled.
--- a/debian/rules +++ b/debian/rules @@ -7,7 +7,8 @@ COMPAT_VERSION = $(UPSTREAM_VERSION)~dfsg PYTHON_VERSION = 1.0a1 -MIB_MODULES = host smux ucd-snmp/dlmod +MIB_MODULES = smux ucd-snmp/dlmod +EXCL_MIB_MODULES = PYVERS=$(shell pyversions -vr) @@ -21,14 +22,20 @@ DEB_DH_GENCONTROL_ARGS=-- -Vos-specific-dev="libkvm-dev" endif endif +ifeq (hurd,$(DEB_HOST_ARCH_OS)) +IPV6 = --enable-ipv6 +EXCL_MIB_MODULES += mibII +else +MIB_MODULES += host +endif %: dh --with quilt,python-central $@ .PHONY: override_dh_auto_configure override_dh_auto_configure: - ln -s /usr/share/misc/config.guess . - ln -s /usr/share/misc/config.sub . + ln -f -s /usr/share/misc/config.guess . + ln -f -s /usr/share/misc/config.sub . libtoolize --install --copy aclocal autoheader @@ -43,6 +50,7 @@ --without-dmalloc --without-efence --without-rsaref \ --with-sys-contact="root" --with-sys-location="Unknown" \ --with-mib-modules="$(MIB_MODULES)" \ + --with-out-mib-modules="$(EXCL_MIB_MODULES)" \ --enable-mfd-rewrites \ --with-mnttab=/etc/mtab \ --with-mibdirs="\$HOME/.snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp" \
signature.asc
Description: This is a digitally signed message part.