diff options
author | cvs2svn <cvs2svn@FreeBSD.org> | 2009-04-28 21:27:54 +0000 |
---|---|---|
committer | cvs2svn <cvs2svn@FreeBSD.org> | 2009-04-28 21:27:54 +0000 |
commit | b6bb8c3d3a17625aa826094130b3d84530b6dae4 (patch) | |
tree | f2de4a4d4b2f5c3fcbd1ee2ea6cce6d571bfb5f7 /net-mgmt | |
parent | - Fix PLIST (diff) |
This commit was manufactured by cvs2svn to create tag 'RELEASE_7_2_0'.release/7.2.0
Notes
Notes:
svn path=/head/; revision=232918
svn path=/tags/RELEASE_7_2_0/; revision=232919; tag=release/7.2.0
Diffstat (limited to 'net-mgmt')
88 files changed, 0 insertions, 6805 deletions
diff --git a/net-mgmt/collectd5/Makefile b/net-mgmt/collectd5/Makefile deleted file mode 100644 index e4caaed929dc..000000000000 --- a/net-mgmt/collectd5/Makefile +++ /dev/null @@ -1,218 +0,0 @@ -# New ports collection makefile for: collectd -# Date created: Sat Sep 29 05:19:31 PDT 2007 -# Whom: Matt Peterson <matt@peterson.org> -# -# $FreeBSD$ -# - -PORTNAME= collectd -PORTVERSION= 4.5.1 -PORTREVISION= 1 -CATEGORIES= net-mgmt -MASTER_SITES= http://collectd.org/files/ \ - http://mirror.roe.ch/dist/${PORTNAME}/ - -MAINTAINER= daniel@roe.ch -COMMENT= Systems & network statistics collection daemon - -USE_GMAKE= yes -GNU_CONFIGURE= yes -WANT_GNOME= yes - -OPTIONS= CGI "Install collection.cgi (requires RRDTOOL)" Off \ - DEBUG "Enable debugging" Off \ - APACHE "Input: Apache mod_status (libcurl)" Off \ - APCUPS "Input: APC UPS (apcupsd)" Off \ - INTERFACE "Input: Network interfaces (libstatgrab)" On \ - MBMON "Input: MBMon" Off \ - MYSQL "Input: MySQL" Off \ - PING "Input: Network latency (liboping)" On \ - SNMP "Input: SNMP" On \ - XMMS "Input: XMMS" Off \ - RRDTOOL "Output: RRDTool" On - -MAN1= collectd.1 collectd-nagios.1 collectdmon.1 -MAN5= collectd.conf.5 collectd-email.5 collectd-exec.5 \ - collectd-snmp.5 collectd-unixsock.5 collectd-perl.5 \ - types.db.5 -USE_RC_SUBR= collectd collectdmon - -CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ - LDFLAGS="-L${LOCALBASE}/lib" - -.include <bsd.port.pre.mk> - -.if ( ${OSVERSION} < 601103 ) -BROKEN= Need bind9 import post 6.1 -.endif - -# NOTE: Feel free to submit patches adding support for any of these -# disabled plugins. If a plugin requires external dependencies, -# make it optional through OPTIONS. Some of these are Linux -# specific, but others will probably run on FreeBSD as well, -# given a bit of careful attention. -CONFIGURE_ARGS= --localstatedir=/var \ - --disable-apple_sensors \ - --disable-ascent \ - --disable-battery \ - --disable-cpufreq \ - --disable-disk \ - --disable-entropy \ - --disable-hddtemp \ - --disable-iptables \ - --disable-ipmi \ - --disable-ipvs \ - --disable-irq \ - --disable-libvirt \ - --disable-multimeter \ - --disable-netlink \ - --disable-nfs \ - --disable-nginx \ - --disable-notify_desktop \ - --disable-notify_email \ - --disable-nut \ - --disable-onewire \ - --disable-perl \ - --disable-postgresql \ - --disable-sensors \ - --disable-serial \ - --disable-tape \ - --disable-thermal \ - --disable-users \ - --disable-vmem \ - --disable-vserver \ - --disable-wireless \ - --without-perl-bindings - -.if defined(WITH_DEBUG) -CONFIGURE_ARGS+=--enable-debug -.endif - -.if defined(WITH_CGI) -RUN_DEPENDS+= ${SITE_PERL}/URI/Escape.pm:${PORTSDIR}/net/p5-URI \ - ${SITE_PERL}/CGI.pm:${PORTSDIR}/www/p5-CGI.pm \ - ${SITE_PERL}/${PERL_ARCH}/Data/Dumper.pm:${PORTSDIR}/devel/p5-Data-Dumper -PLIST_SUB+= CGI="" -.else -PLIST_SUB+= CGI="@comment " -.endif - -.if defined(WITH_APACHE) -CONFIGURE_ARGS+=--enable-apache -LIB_DEPENDS+= curl.5:${PORTSDIR}/ftp/curl -PLIST_SUB+= APACHE="" -.else -CONFIGURE_ARGS+=--disable-apache -PLIST_SUB+= APACHE="@comment " -.endif - -.if defined(WITH_APCUPS) -CONFIGURE_ARGS+=--enable-apcups -BUILD_DEPENDS+= ${LOCALBASE}/sbin/apcupsd:${PORTSDIR}/sysutils/apcupsd -PLIST_SUB+= APCUPS="" -.else -CONFIGURE_ARGS+=--disable-apcups -PLIST_SUB+= APCUPS="@comment " -.endif - -.if defined(WITH_INTERFACE) -BUILD_DEPENDS+= pkg-config:${PORTSDIR}/devel/pkg-config -CONFIGURE_ARGS+=--enable-interface -LIB_DEPENDS+= statgrab.8:${PORTSDIR}/devel/libstatgrab -PLIST_SUB+= INTERFACE="" -CONFIGURE_ENV+= LIBS="`pkg-config --libs libstatgrab`" -.else -CONFIGURE_ARGS+=--disable-interface -PLIST_SUB+= INTERFACE="@comment " -.endif - -.if defined(WITH_MBMON) -CONFIGURE_ARGS+=--enable-mbmon -RUN_DEPENDS+= ${LOCALBASE}/sbin/mbmond:${PORTSDIR}/sysutils/mbmon -PLIST_SUB+= MBMON="" -.else -CONFIGURE_ARGS+=--disable-mbmon -PLIST_SUB+= MBMON="@comment " -.endif - -.if defined(WITH_MYSQL) -USE_MYSQL= yes -CONFIGURE_ARGS+=--enable-mysql -PLIST_SUB+= MYSQL="" -.else -CONFIGURE_ARGS+=--disable-mysql -PLIST_SUB+= MYSQL="@comment " -.endif - -.if defined(WITH_PING) -LIB_DEPENDS+= oping:${PORTSDIR}/net/liboping -CONFIGURE_ARGS+=--enable-ping -PLIST_SUB+= PING="" -.else -CONFIGURE_ARGS+=--disable-ping -PLIST_SUB+= PING="@comment " -.endif - -.if defined(WITH_RRDTOOL) -LIB_DEPENDS+= rrd:${PORTSDIR}/databases/rrdtool -CONFIGURE_ARGS+=--enable-rrdtool -PLIST_SUB+= RRD="" -.else -CONFIGURE_ARGS+=--disable-rrdtool -PLIST_SUB+= RRD="@comment " -.endif - -.if defined(WITH_SNMP) -LIB_DEPENDS+= netsnmp.16:${PORTSDIR}/net-mgmt/net-snmp -CONFIGURE_ARGS+=--enable-snmp -PLIST_SUB+= SNMP="" -.else -CONFIGURE_ARGS+=--disable-snmp -PLIST_SUB+= SNMP="@comment " -.endif - -.if defined(WITH_XMMS) -LIB_DEPENDS+= xmms.4:${PORTSDIR}/multimedia/xmms -CONFIGURE_ARGS+=--enable-xmms -CFLAGS+= `xmms-config --cflags` -PLIST_SUB+= XMMS="" -.else -CONFIGURE_ARGS+=--disable-xmms -PLIST_SUB+= XMMS="@comment " -.endif - -post-patch: - @${REINPLACE_CMD} \ - -e 's;@prefix@/var/;/var/;' \ - -e 's;/var/lib/;/var/db/;' \ - ${WRKSRC}/src/collectd.conf.in - @${REINPLACE_CMD} \ - -e 's;$$[(]DESTDIR)$$[(]sysconfdir)/collectd\.conf;&.sample;' \ - ${WRKSRC}/src/Makefile.in - @${REINPLACE_CMD} -e '/$$[(]mkinstalldirs)/d' ${WRKSRC}/Makefile.in - @${REINPLACE_CMD} \ - -e 's;/etc/collection\.conf;${WWWDIR}/collection.conf;' \ - ${WRKSRC}/contrib/collection.cgi - @${REINPLACE_CMD} \ - -e 's;/opt/collectd/var/lib;/var/db;' \ - -e 's;/opt/collectd/lib;${PREFIX}/lib;' \ - ${WRKSRC}/contrib/collection.conf - -post-install: - ${MKDIR} /var/db/collectd - if [ ! -f ${PREFIX}/etc/collectd.conf ]; then \ - ${CP} -p ${PREFIX}/etc/collectd.conf.sample \ - ${PREFIX}/etc/collectd.conf ; \ - fi -.if defined(WITH_CGI) - ${MKDIR} ${WWWDIR} - ${INSTALL_SCRIPT} ${WRKSRC}/contrib/collection.cgi ${WWWDIR}/ - ${INSTALL_DATA} ${WRKSRC}/contrib/collection.conf \ - ${WWWDIR}/collection.conf.sample - if [ ! -f ${WWWDIR}/collection.conf ]; then \ - ${CP} -p ${WWWDIR}/collection.conf.sample \ - ${WWWDIR}/collection.conf ; \ - fi -.endif - -.include <bsd.port.post.mk> diff --git a/net-mgmt/collectd5/distinfo b/net-mgmt/collectd5/distinfo deleted file mode 100644 index 24b577a02551..000000000000 --- a/net-mgmt/collectd5/distinfo +++ /dev/null @@ -1,3 +0,0 @@ -MD5 (collectd-4.5.1.tar.gz) = ab900d15662859b8793abf99eda15c29 -SHA256 (collectd-4.5.1.tar.gz) = 9ab967b7909d9c229cfcd4d1a5503da42f38a1246a53fc5cfaaf1dfde6fae8a1 -SIZE (collectd-4.5.1.tar.gz) = 1279434 diff --git a/net-mgmt/collectd5/files/collectd.in b/net-mgmt/collectd5/files/collectd.in deleted file mode 100644 index 0dd6c3f38847..000000000000 --- a/net-mgmt/collectd5/files/collectd.in +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh - -# PROVIDE: collectd -# REQUIRE: LOGIN -# -# Add the following lines to /etc/rc.conf.local or /etc/rc.conf -# to enable this service: -# -# collectd_enable (bool): Set to NO by default. -# Set it to YES to enable collectd. -# collectd_flags (string): Set to "" by default. -# Additional flags to collectd, see manual page. -# - -. %%RC_SUBR%% - -name="collectd" -rcvar=${name}_enable - -command=%%PREFIX%%/sbin/${name} - -load_rc_config $name - -: ${collectd_enable="NO"} -: ${collectd_flags=""} - -run_rc_command "$1" diff --git a/net-mgmt/collectd5/files/collectdmon.in b/net-mgmt/collectd5/files/collectdmon.in deleted file mode 100644 index 3d934e8223b2..000000000000 --- a/net-mgmt/collectd5/files/collectdmon.in +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh - -# PROVIDE: collectdmon -# REQUIRE: LOGIN -# -# Add the following lines to /etc/rc.conf.local or /etc/rc.conf -# to enable this service: -# -# collectdmon_enable (bool): Set to NO by default. -# Set it to YES to enable collectd. -# collectdmon_flags (string): Set to "-c %%PREFIX%%/sbin/collectd" by default. -# Additional flags to collectdmon, see manual page. -# - -. %%RC_SUBR%% - -name="collectdmon" -rcvar=${name}_enable - -command=%%PREFIX%%/sbin/${name} - -load_rc_config $name - -: ${collectdmon_enable="NO"} -: ${collectdmon_flags="-c %%PREFIX%%/sbin/collectd"} - -run_rc_command "$1" diff --git a/net-mgmt/collectd5/files/patch-src__collectd.h b/net-mgmt/collectd5/files/patch-src__collectd.h deleted file mode 100644 index 8058189613b1..000000000000 --- a/net-mgmt/collectd5/files/patch-src__collectd.h +++ /dev/null @@ -1,20 +0,0 @@ ---- ./src/collectd.h.orig 2007-09-28 17:55:34.000000000 +0300 -+++ ./src/collectd.h 2008-05-06 10:32:08.000000000 +0300 -@@ -183,7 +183,7 @@ - #endif - - #ifndef LOCALSTATEDIR --#define LOCALSTATEDIR PREFIX "/var" -+#define LOCALSTATEDIR "/var" - #endif - - #ifndef PKGLOCALSTATEDIR -@@ -191,7 +191,7 @@ - #endif - - #ifndef PIDFILE --#define PIDFILE PREFIX "/var/run/" PACKAGE_NAME ".pid" -+#define PIDFILE "/var/run/" PACKAGE_NAME ".pid" - #endif - - #ifndef PLUGINDIR diff --git a/net-mgmt/collectd5/files/patch-src__dns.c b/net-mgmt/collectd5/files/patch-src__dns.c deleted file mode 100644 index fb045049b25a..000000000000 --- a/net-mgmt/collectd5/files/patch-src__dns.c +++ /dev/null @@ -1,18 +0,0 @@ ---- src/dns.c.orig 2008-09-05 15:26:02.000000000 +0000 -+++ src/dns.c 2008-09-05 15:25:55.000000000 +0000 -@@ -210,6 +210,15 @@ - pthread_sigmask (SIG_SETMASK, &sigmask, NULL); - } - -+ /* Check for pcap_device, if needed */ -+#ifdef __sparc64__ -+ if (pcap_device == NULL) -+ { -+ ERROR ("dns plugin: Interface required"); -+ return (NULL); -+ } -+#endif -+ - /* Passing `pcap_device == NULL' is okay and the same as passign "any" */ - DEBUG ("Creating PCAP object.."); - pcap_obj = pcap_open_live (pcap_device, diff --git a/net-mgmt/collectd5/pkg-descr b/net-mgmt/collectd5/pkg-descr deleted file mode 100644 index a591a0195caa..000000000000 --- a/net-mgmt/collectd5/pkg-descr +++ /dev/null @@ -1,6 +0,0 @@ -collectd is a small daemon written in C for performance. It reads various -system & network statistics along with updating output RRD or CSV files. -The daemon is very fast and allows for frequent polling of values, with -support for polling as frequent as every 10 seconds. - -WWW: http://www.collectd.org/ diff --git a/net-mgmt/collectd5/pkg-plist b/net-mgmt/collectd5/pkg-plist deleted file mode 100644 index 0831641f3310..000000000000 --- a/net-mgmt/collectd5/pkg-plist +++ /dev/null @@ -1,80 +0,0 @@ -@stopdaemon collectd -sbin/collectd -sbin/collectdmon -@unexec if cmp -s %D/etc/collectd.conf.sample %D/etc/collectd.conf; then rm -f %D/etc/collectd.conf; fi -etc/collectd.conf.sample -@exec if [ ! -f %B/collectd.conf ] ; then cp -p %B/%f %B/collectd.conf; fi -%%CGI%%%%WWWDIR%%/collection.cgi -%%CGI%%@unexec if cmp -s %B/collection.conf.sample %B/collection.conf; then rm -f %B/collection.conf; fi -%%CGI%%%%WWWDIR%%/collection.conf.sample -%%CGI%%@exec if [ ! -f %B/collection.conf ] ; then cp -p %B/%f %B/collection.conf; fi -%%CGI%%@dirrmtry %%WWWDIR%% -bin/collectd-nagios -lib/collectd/types.db -%%APACHE%%lib/collectd/apache.la -%%APACHE%%lib/collectd/apache.so -%%APCUPS%%lib/collectd/apcups.la -%%APCUPS%%lib/collectd/apcups.so -lib/collectd/cpu.la -lib/collectd/cpu.so -lib/collectd/csv.la -lib/collectd/csv.so -lib/collectd/df.la -lib/collectd/df.so -lib/collectd/dns.la -lib/collectd/dns.so -lib/collectd/email.la -lib/collectd/email.so -lib/collectd/exec.la -lib/collectd/exec.so -lib/collectd/filecount.so -lib/collectd/filecount.la -%%INTERFACE%%lib/collectd/interface.la -%%INTERFACE%%lib/collectd/interface.so -lib/collectd/load.la -lib/collectd/load.so -lib/collectd/logfile.la -lib/collectd/logfile.so -%%MBMON%%lib/collectd/mbmon.la -%%MBMON%%lib/collectd/mbmon.so -lib/collectd/memcached.so -lib/collectd/memcached.la -lib/collectd/memory.la -lib/collectd/memory.so -%%MYSQL%%lib/collectd/mysql.la -%%MYSQL%%lib/collectd/mysql.so -lib/collectd/network.la -lib/collectd/network.so -lib/collectd/ntpd.la -lib/collectd/ntpd.so -%%PING%%lib/collectd/ping.la -%%PING%%lib/collectd/ping.so -lib/collectd/powerdns.so -lib/collectd/powerdns.la -lib/collectd/processes.so -lib/collectd/processes.la -%%RRD%%lib/collectd/rrdtool.la -%%RRD%%lib/collectd/rrdtool.so -%%SNMP%%lib/collectd/snmp.la -%%SNMP%%lib/collectd/snmp.so -lib/collectd/swap.la -lib/collectd/swap.so -lib/collectd/syslog.la -lib/collectd/syslog.so -lib/collectd/tail.so -lib/collectd/tail.la -lib/collectd/tcpconns.so -lib/collectd/tcpconns.la -lib/collectd/teamspeak2.so -lib/collectd/teamspeak2.la -lib/collectd/unixsock.la -lib/collectd/unixsock.so -lib/collectd/uuid.so -lib/collectd/uuid.la -%%XMMS%%lib/collectd/xmms.la -%%XMMS%%lib/collectd/xmms.so -share/collectd/postgresql_default.conf -@dirrm lib/collectd -@dirrm share/collectd -@exec mkdir -p /var/db/collectd -@unexec rmdir /var/db/collectd 2>/dev/null || true diff --git a/net-mgmt/net-snmp-devel/Makefile b/net-mgmt/net-snmp-devel/Makefile deleted file mode 100644 index 226f4b0a7026..000000000000 --- a/net-mgmt/net-snmp-devel/Makefile +++ /dev/null @@ -1,298 +0,0 @@ -# New ports collection makefile for: ucd-snmp -# Date created: 26 June 1996 -# Whom: gpalmer -# -# $FreeBSD$ -# - -PORTNAME= snmp -PORTVERSION= 5.4.2.1 -PORTREVISION= 3 -CATEGORIES= net-mgmt ipv6 -MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} -MASTER_SITE_SUBDIR= net-snmp -PKGNAMEPREFIX= net- -DISTNAME= ${PKGNAMEPREFIX}${PORTNAME}-${PORTVERSION} - -MAINTAINER= kuriyama@FreeBSD.org -COMMENT= An extendable SNMP implementation - -.if !defined(WITH_TKMIB) -EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-local:Makefile.in -.endif - -.if defined(WITH_TKMIB) -RUN_DEPEND= ${SITE_PERL}/${PERL_ARCH}/Tk.pm:${PORTSDIR}/x11-toolkits/p5-Tk -.endif - -GNU_CONFIGURE= yes -USE_RC_SUBR= snmpd.sh snmptrapd.sh -USE_OPENSSL= yes -USE_LDCONFIG= yes -.if defined(WITHOUT_PERL) -USE_PERL5_BUILD=yes -.else -USE_PERL5= yes -.endif - -CONFIGURE_ENV+= PERLPROG="${PERL}" PSPROG="${PS_CMD}" SED="${SED}" -CONFIGURE_ARGS+=--enable-shared --enable-internal-md5 \ - --with-mib-modules="${_NET_SNMP_MIB_MODULES}" \ - --with-default-snmp-version="${DEFAULT_SNMP_VERSION}" \ - --with-sys-contact="${NET_SNMP_SYS_CONTACT}" \ - --with-sys-location="${NET_SNMP_SYS_LOCATION}" \ - --with-logfile="${NET_SNMP_LOGFILE}" \ - --with-persistent-directory="${NET_SNMP_PERSISTENTDIR}" \ - --with-gnu-ld --with-libwrap --with-libs="-lm -lkvm -ldevstat" - -.if defined(BATCH) -CONFIGURE_ARGS+=--with-defaults -.endif - -.if !defined(WITHOUT_DUMMY_VALUES) -CONFIGURE_ARGS+=--with-dummy-values -.endif - -.include <bsd.port.pre.mk> - -.if defined(WITHOUT_PERL) -PLIST_SUB+= WITH_PERL="@comment " -CONFIGURE_ARGS+=--disable-embedded-perl --without-perl-modules -.else -CONFIGURE_ARGS+=--enable-embedded-perl --with-perl-modules -PLIST_SUB+= WITH_PERL="" -.endif - -.if defined(WITH_TKMIB) -PLIST_SUB+= WITH_TKMIB="" -.else -PLIST_SUB+= WITH_TKMIB="@comment " -.endif - -.if defined(WITH_DMALLOC) -LIB_DEPEND+= dmalloc:${PORTSDIR}/devel/dmalloc -CONFIGURE_ARGS+=--with-dmalloc=${LOCALBASE} -.endif - -.if !defined(WITHOUT_IPV6) -CONFIGURE_ARGS+=--enable-ipv6 -# --with-transport="UDPIPv6 TCPIPv6" --with-modules=mibII/ipv6" -PLIST_SUB+= WITH_IPV6="" -.else -PLIST_SUB+= WITH_IPV6="@comment " -.endif - -SHLIB_VERSION= 16 -PLIST_SUB+= SHLIB_VERSION=${SHLIB_VERSION} -SCRIPTS_SUB= PREFIX=${PREFIX} PERL=${PERL} - -DEFAULT_SNMP_VERSION?= 3 -NET_SNMP_SYS_CONTACT?= nobody@nowhere.invalid -NET_SNMP_SYS_LOCATION?= somewhere -NET_SNMP_LOGFILE?= /var/log/snmpd.log -NET_SNMP_PERSISTENTDIR?=/var/net-snmp -NET_SNMP_MIB_MODULES?= ${NET_SNMP_MIB_MODULE_LIST} - -NET_SNMP_MIB_MODULE_LIST=host disman/event-mib smux mibII/mta_sendmail mibII/tcpTable ucd-snmp/diskio - -.if ${OSVERSION} >= 700028 -NET_SNMP_MIB_MODULE_LIST+= sctp-mib -.endif - -.if defined(WITH_MFD_REWRITES) -CONFIGURE_ARGS+=--enable-mfd-rewrites -NET_SNMP_MIB_MODULE_LIST+= if-mib -.endif - -_NET_SNMP_MIB_MODULES= -.for module1 in ${NET_SNMP_MIB_MODULE_LIST} -_module1=${module1} -_define=false -. for module2 in ${NET_SNMP_MIB_MODULES} -_module2=${module2} -. if ${_module1} == ${_module2} -_define=true -. endif -. endfor -. if ${_define} == true -_NET_SNMP_MIB_MODULES+=${module1} -PLIST_SUB+= WITH_${module1:C|.*/||:U}="" -. else -PLIST_SUB+= WITH_${module1:C|.*/||:U}="@comment " -. endif -.endfor - -MAN1= encode_keychange.1 fixproc.1 mib2c.1 mib2c-update.1 \ - net-snmp-config.1 \ - snmpbulkget.1 snmpbulkwalk.1 snmpcmd.1 snmpconf.1 \ - snmpdelta.1 snmpdf.1 snmpget.1 snmpgetnext.1 snmpinform.1 \ - snmpnetstat.1 snmpset.1 snmpstatus.1 snmptable.1 snmptest.1 \ - snmptranslate.1 snmptrap.1 snmpusm.1 snmpvacm.1 snmpwalk.1 \ - tkmib.1 traptoemail.1 -MAN3= add_mibdir.3 add_module_replacement.3 \ - config_perror.3 config_pwarn.3 \ - default_store.3 fprint_description.3 \ - fprint_objid.3 fprint_value.3 fprint_variable.3 \ - get_module_node.3 init_mib.3 init_mib_internals.3 mib_api.3 \ - netsnmp_Container_iterator.3 \ - netsnmp_agent.3 \ - netsnmp_baby_steps.3 \ - netsnmp_bulk_to_next.3 \ - netsnmp_cache_handler.3 netsnmp_container.3 \ - netsnmp_debug.3 \ - netsnmp_ds_get_boolean.3 netsnmp_ds_get_int.3 \ - netsnmp_ds_get_string.3 \ - netsnmp_ds_register_config.3 netsnmp_ds_register_premib.3 \ - netsnmp_ds_set_boolean.3 netsnmp_ds_set_int.3 \ - netsnmp_ds_set_string.3 netsnmp_ds_shutdown.3 \ - netsnmp_example_scalar_int.3 netsnmp_handler.3 \ - netsnmp_instance.3 \ - netsnmp_iterator_info_s.3 \ - netsnmp_leaf.3 netsnmp_library.3 \ - netsnmp_mib_handler_methods.3 netsnmp_mib_utilities.3 \ - netsnmp_mode_end_call.3 netsnmp_multiplexer.3 \ - netsnmp_old_api.3 netsnmp_read_only.3 \ - netsnmp_row_merge.3 \ - netsnmp_scalar.3 \ - netsnmp_scalar_group_group.3 \ - netsnmp_serialize.3 \ - netsnmp_stash_cache.3 \ - netsnmp_table.3 netsnmp_table_array.3 \ - netsnmp_table_data.3 netsnmp_table_dataset.3 \ - netsnmp_table_iterator.3 \ - netsnmp_utilities.3 \ - netsnmp_watcher.3 \ - print_description.3 print_mib.3 print_objid.3 print_value.3 \ - print_variable.3 read_all_mibs.3 \ - read_config.3 read_configs.3 read_config_print_usage.3 \ - read_mib.3 read_module.3 read_module_node.3 read_objid.3 \ - read_premib_configs.3 \ - register_app_config_handler.3 register_app_premib_handler.3 \ - register_config_handler.3 register_mib_handlers.3 \ - register_premib_handler.3 \ - send_easy_trap.3 send_trap_vars.3 send_v2trap.3 \ - shutdown_mib.3 \ - snmp_agent_api.3 \ - snmp_alarm.3 snmp_alarm_register.3 \ - snmp_alarm_register_hr.3 snmp_alarm_unregister.3 \ - snmp_api.3 snmp_api_errstring.3 snmp_close.3 \ - snmp_error.3 snmp_free_pdu.3 snmp_open.3 snmp_perror.3 \ - snmp_read.3 snmp_select_info.3 \ - snmp_send.3 snmp_sess_api.3 snmp_sess_async_send.3 \ - snmp_sess_close.3 snmp_sess_error.3 snmp_sess_init.3 \ - snmp_sess_open.3 snmp_sess_perror.3 \ - snmp_sess_read.3 snmp_sess_select_info.3 \ - snmp_sess_send.3 snmp_sess_session.3 snmp_sess_timeout.3 \ - snmp_set_mib_warnings.3 snmp_set_save_descriptions.3 \ - snmp_timeout.3 snmp_trap_api.3 \ - snprint_objid.3 snprint_value.3 snprint_variable.3 \ - sprint_realloc_objid.3 sprint_realloc_value.3 \ - sprint_realloc_variable.3 \ - unregister_app_config_handler.3 \unregister_config_handler.3 - -.if !defined(WITHOUT_PERL) -MAN3PERL= NetSNMP::ASN.3 NetSNMP::OID.3 NetSNMP::agent.3 \ - NetSNMP::TrapReceiver.3 \ - NetSNMP::agent::default_store.3 \ - NetSNMP::default_store.3 \ - NetSNMP::netsnmp_request_infoPtr.3 SNMP.3 -MAN3PERLPREFIX= ${PREFIX}/lib/perl5/${PERL_VERSION} -_MANPAGES+= ${MAN3PERL:S%^%${MAN3PERLPREFIX}/man/man3/%} -.endif - -MAN5= mib2c.conf.5 snmp.conf.5 snmp_config.5 snmpd.conf.5 \ - snmpd.examples.5 snmpd.internal.5 \ - snmptrapd.conf.5 variables.5 -MAN8= snmpd.8 snmptrapd.8 - -BIN_FILES= snmpbulkwalk snmpget snmpgetnext snmpset \ - snmpstatus snmptest snmptranslate snmptrap snmpwalk -SBIN_FILES= snmpd snmptrapd -STARTUP_DIR= ${PREFIX}/etc/rc.d -SCRIPT_FILES= snmpcheck.def mib2c fixproc ipf-mod.pl snmpconf \ - traptoemail -.if defined(WITH_TKMIB) -SCRIPT_FILES+= tkmib -.endif -DOC_FILES= AGENT.txt COPYING FAQ NEWS README \ - README.agentx README.krb5 README.snmpv3 README.thread \ - agent/mibgroup/README.smux - -PS_CMD?= /bin/ps -CONFLICTS= ucd-snmp-4.* net-snmp-5.3.* - -pre-everything:: - @${ECHO_MSG} - @${ECHO_MSG} "You may use the following build options:" - @${ECHO_MSG} - @${ECHO_MSG} "WITH_TKMIB=yes Install a graphical Perl/Tk/SNMP based mib browser" - @${ECHO_MSG} "WITHOUT_DUMMY_VALUES=yes Provide 'placeholder' dummy values where" - @${ECHO_MSG} " the necessary information is not available." - @${ECHO_MSG} "WITHOUT_PERL=yes Do not install the perl modules along with the rest" - @${ECHO_MSG} " of the net-snmp toolkit." - @${ECHO_MSG} "WITHOUT_IPV6=yes Disable IPv6." - @${ECHO_MSG} - @${ECHO_MSG} "DEFAULT_SNMP_VERSION=\"3\" Default version of SNMP to use." - @${ECHO_MSG} "NET_SNMP_SYS_CONTACT=\"${NET_SNMP_SYS_CONTACT}\"" - @${ECHO_MSG} " Default system contact." - @${ECHO_MSG} "NET_SNMP_SYS_LOCATION=\"${NET_SNMP_SYS_LOCATION}\"" - @${ECHO_MSG} " Default system location." - @${ECHO_MSG} "NET_SNMP_LOGFILE=\"${NET_SNMP_LOGFILE}\"" - @${ECHO_MSG} " Default log file location for snmpd." - @${ECHO_MSG} "NET_SNMP_PERSISTENTDIR=\"${NET_SNMP_PERSISTENTDIR}\"" - @${ECHO_MSG} " Default directory for persistent data storage." - @${ECHO_MSG} "NET_SNMP_MIB_MODULES=\"${NET_SNMP_MIB_MODULE_LIST}\"" - @${ECHO_MSG} " Optional mib modules that can be built into the" - @${ECHO_MSG} " agent" - @${ECHO_MSG} - -post-patch: -.for filename in ${SCRIPT_FILES} - @${REINPLACE_CMD} ${SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ - ${WRKSRC}/local/${filename} -.endfor - -post-configure: - @${FIND} ${WRKSRC} -name Makefile | \ - ${XARGS} ${REINPLACE_CMD} -E -e '/^INSTALL[ ]+=/s|$$| -m 755|' - -post-build: -.if !defined(WITHOUT_PERL) - ${FIND} ${WRKSRC}/perl -name Makefile | \ - ${XARGS} ${REINPLACE_CMD} -E -e '\ - s!^(PREFIX) = .*!\1 = ${PREFIX}!; \ - s!^(INSTALLMAN3DIR|INSTALLSITEMAN3DIR) = .*!\1 = ${MAN3PERLPREFIX}/man/man3!; \ - s!^(INSTALLSITELIB|INSTALLSITEARCH) = /usr/local/(.*)!\1 = ${PREFIX}/\2!; \ - s! doc_(perl|site|\$$\(INSTALLDIRS\))_install$$!!; \ - ' -.else - ${REINPLACE_CMD} -e 's| perlinstall||' ${WRKSRC}/Makefile -.endif - -post-install: strip-files install-config-files install-doc-files display-message - ${MKDIR} /var/agentx - -strip-files: - @cd ${PREFIX}/bin; ${STRIP_CMD} ${BIN_FILES} - @cd ${PREFIX}/sbin; ${STRIP_CMD} ${SBIN_FILES} - -install-config-files: - @${INSTALL_DATA} ${WRKSRC}/EXAMPLE.conf ${DATADIR}/snmpd.conf.example - -install-doc-files: -.if !defined(NOPORTDOCS) - @${MKDIR} ${DOCSDIR} -. for filename in ${DOC_FILES} - @${INSTALL_DATA} ${WRKSRC}/${filename} ${DOCSDIR} -. endfor -.endif - -display-message: - @${ECHO_MSG} - @${CAT} ${PKGMESSAGE} - -# Maintainer's note: -# Don't forget to bump library version in these ports. -# french/plgrenouille,graphics/hpoj,lang/php4,lang/php5,mail/cyrus-imapd22,mail/cyrus-imapd23,misc/kdeutils3,net-mgmt/braa,net-mgmt/docsis,net-mgmt/mbrowse,net-mgmt/nagios-snmp-plugins,net-mgmt/p5-SNMP-Info,net-mgmt/py-yapsnmp,net-mgmt/sdig,net-mgmt/zabbix,net/cactid,net/wireshark,net/ifstat,net/quagga,net/rtg,print/hplip,security/libfwbuilder,sysutils/apcupsd,sysutils/jailadmin,sysutils/nut - -.include <bsd.port.post.mk> diff --git a/net-mgmt/net-snmp-devel/distinfo b/net-mgmt/net-snmp-devel/distinfo deleted file mode 100644 index d23d7dcb5c54..000000000000 --- a/net-mgmt/net-snmp-devel/distinfo +++ /dev/null @@ -1,3 +0,0 @@ -MD5 (net-snmp-5.4.2.1.tar.gz) = 984932520143f0c8bf7b7ce1fc9e1da1 -SHA256 (net-snmp-5.4.2.1.tar.gz) = 11a8baf167f7bfff60d2590e050991400a3a082923dbcdbf85e0e0ce46eb247c -SIZE (net-snmp-5.4.2.1.tar.gz) = 5185390 diff --git a/net-mgmt/net-snmp-devel/files/extra-patch-local:Makefile.in b/net-mgmt/net-snmp-devel/files/extra-patch-local:Makefile.in deleted file mode 100644 index 50a941bffa3a..000000000000 --- a/net-mgmt/net-snmp-devel/files/extra-patch-local:Makefile.in +++ /dev/null @@ -1,11 +0,0 @@ ---- local/Makefile.in.orig Tue Oct 11 03:47:48 2005 -+++ local/Makefile.in Wed Nov 30 11:32:52 2005 -@@ -16,7 +16,7 @@ - # - SNMPCONFPATH=@SNMPCONFPATH@ - PERSISTENT_DIRECTORY=@PERSISTENT_DIRECTORY@ --PERLSCRIPTS=snmpcheck tkmib mib2c fixproc ipf-mod.pl snmpconf traptoemail -+PERLSCRIPTS=snmpcheck mib2c fixproc ipf-mod.pl snmpconf traptoemail - SHELLSCRIPTS=mib2c-update - SCRIPTSMADEFORPERL=snmpcheck.made tkmib.made mib2c.made fixproc.made \ - ipf-mod.pl.made snmpconf.made traptoemail.made diff --git a/net-mgmt/net-snmp-devel/files/patch-Makefile.in b/net-mgmt/net-snmp-devel/files/patch-Makefile.in deleted file mode 100644 index fece19085317..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-Makefile.in +++ /dev/null @@ -1,11 +0,0 @@ ---- Makefile.in.orig 2007-06-09 05:32:56.000000000 +0900 -+++ Makefile.in 2008-03-25 21:10:08.842515763 +0900 -@@ -16,7 +16,7 @@ - INSTALLHEADERS=version.h - INCLUDESUBDIR=system - INCLUDESUBDIRHEADERS= aix.h bsd.h bsdi3.h bsdi4.h bsdi.h cygwin.h \ -- darwin.h darwin7.h darwin8.h darwin9.h freebsd5.h freebsd6.h \ -+ darwin.h darwin7.h darwin8.h darwin9.h freebsd5.h freebsd6.h freebsd7.h freebsd8.h \ - dynix.h freebsd2.h freebsd3.h freebsd4.h freebsd.h generic.h hpux.h \ - irix.h linux.h mingw32.h mips.h netbsd.h openbsd.h osf5.h \ - solaris2.3.h solaris2.4.h solaris2.5.h solaris2.6.h \ diff --git a/net-mgmt/net-snmp-devel/files/patch-agent_mibgroup_hardware_cpu_cpu__sysctl.c b/net-mgmt/net-snmp-devel/files/patch-agent_mibgroup_hardware_cpu_cpu__sysctl.c deleted file mode 100644 index d35125033448..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-agent_mibgroup_hardware_cpu_cpu__sysctl.c +++ /dev/null @@ -1,36 +0,0 @@ ---- agent/mibgroup/hardware/cpu/cpu_sysctl.c.orig 2008-05-27 21:47:30.000000000 +0900 -+++ agent/mibgroup/hardware/cpu/cpu_sysctl.c 2008-11-14 16:41:12.000000000 +0900 -@@ -16,6 +16,8 @@ - #if !defined(CPUSTATES) - #include <sys/dkstat.h> - #endif -+#elif defined(__FreeBSD__) -+#define NETSNMP_KERN_CPU 0 /* FreeBSD - dummy value, sysctlnametomib(2) should be used */ - #else - #include <sys/sched.h> - #endif -@@ -117,7 +119,7 @@ - #define NS_VM_SWAPIN v_swapin - #define NS_VM_SWAPOUT v_swapout - --#elif defined(VM_METER) /* OpenBSD, NetBSD */ -+#elif defined(VM_METER) && !defined(__FreeBSD__) /* OpenBSD, NetBSD */ - #define NETSNMP_VM_STATS VM_METER - #define NETSNMP_VM_STATS_TYPE struct vmtotal - -@@ -130,6 +132,15 @@ - #undef NS_VM_PAGEOUT - #define NS_VM_SWAPIN v_swpin - #define NS_VM_SWAPOUT v_swpout -+#elif defined(__FreeBSD__) /* FreeBSD */ -+#define NETSNMP_VM_STATS VM_METER -+#define NETSNMP_VM_STATS_TYPE struct vmmeter -+ #define NS_VM_INTR v_intr -+ #define NS_VM_SWTCH v_swtch -+ #define NS_VM_PAGEIN v_swappgsin -+ #define NS_VM_PAGEOUT v_swappgsout -+ #define NS_VM_SWAPIN v_swapin -+ #define NS_VM_SWAPOUT v_swapout - #endif - - diff --git a/net-mgmt/net-snmp-devel/files/patch-at.c b/net-mgmt/net-snmp-devel/files/patch-at.c deleted file mode 100644 index 12070f96cc23..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-at.c +++ /dev/null @@ -1,14 +0,0 @@ ---- agent/mibgroup/mibII/at.c.orig 2008-12-25 10:40:04.000000000 +0900 -+++ agent/mibgroup/mibII/at.c 2008-12-25 10:40:59.000000000 +0900 -@@ -686,7 +686,11 @@ - mib[2] = 0; - mib[3] = AF_INET; - mib[4] = NET_RT_FLAGS; -+#if defined(RTF_LLINFO) - mib[5] = RTF_LLINFO; -+#else -+ mib[5] = 0; -+#endif - - if (at) - free(at); diff --git a/net-mgmt/net-snmp-devel/files/patch-cache_handler.c b/net-mgmt/net-snmp-devel/files/patch-cache_handler.c deleted file mode 100644 index 0bcb75fb057b..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-cache_handler.c +++ /dev/null @@ -1,34 +0,0 @@ ---- agent/helpers/cache_handler.c.orig 2009-01-25 22:40:13.000000000 +0900 -+++ agent/helpers/cache_handler.c 2009-01-25 22:44:30.000000000 +0900 -@@ -173,6 +173,31 @@ - return cache; - } - -+/** frees a cache -+ */ -+int -+netsnmp_cache_free(netsnmp_cache *cache) -+{ -+ netsnmp_cache *pos; -+ -+ if (NULL == cache) -+ return SNMPERR_SUCCESS; -+ -+ for (pos = cache_head; pos; pos = pos->next) { -+ if (pos == cache) { -+ snmp_log(LOG_WARNING, "not freeing cache (still in list)\n"); -+ return SNMP_ERR_GENERR; -+ } -+ } -+ -+ if (cache->rootoid) -+ free(cache->rootoid); -+ -+ free(cache); -+ -+ return SNMPERR_SUCCESS; -+} -+ - /** callback function to call cache load function */ - static void - _timer_reload(unsigned int regNo, void *clientargs) diff --git a/net-mgmt/net-snmp-devel/files/patch-cache_handler.h b/net-mgmt/net-snmp-devel/files/patch-cache_handler.h deleted file mode 100644 index 04a597be080f..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-cache_handler.h +++ /dev/null @@ -1,11 +0,0 @@ ---- include/net-snmp/agent/cache_handler.h.orig 2009-01-25 22:37:09.000000000 +0900 -+++ include/net-snmp/agent/cache_handler.h 2009-01-25 22:38:07.000000000 +0900 -@@ -85,6 +85,8 @@ - netsnmp_cache_create(int timeout, NetsnmpCacheLoad * load_hook, - NetsnmpCacheFree * free_hook, - oid * rootoid, int rootoid_len); -+ int netsnmp_cache_free(netsnmp_cache *cache); -+ - netsnmp_mib_handler * - netsnmp_cache_handler_get(netsnmp_cache* cache); - diff --git a/net-mgmt/net-snmp-devel/files/patch-callback.c b/net-mgmt/net-snmp-devel/files/patch-callback.c deleted file mode 100644 index 840d12c0d881..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-callback.c +++ /dev/null @@ -1,12 +0,0 @@ ---- snmplib/callback.c.orig Tue Jan 25 10:19:39 2005 -+++ snmplib/callback.c Tue Jan 25 10:19:53 2005 -@@ -34,6 +34,9 @@ - #include <strings.h> - #endif - -+#if HAVE_UNISTD_H -+#include <unistd.h> -+#endif - #if HAVE_DMALLOC_H - #include <dmalloc.h> - #endif diff --git a/net-mgmt/net-snmp-devel/files/patch-configure b/net-mgmt/net-snmp-devel/files/patch-configure deleted file mode 100644 index 63b240ea8942..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-configure +++ /dev/null @@ -1,11 +0,0 @@ ---- configure.orig 2009-01-25 21:34:07.000000000 +0900 -+++ configure 2009-01-25 21:34:30.000000000 +0900 -@@ -6074,7 +6074,7 @@ - - - for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ -- inttypes.h stdint.h unistd.h -+ inttypes.h stdint.h unistd.h stdarg.h - do - as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` - echo "$as_me:$LINENO: checking for $ac_header" >&5 diff --git a/net-mgmt/net-snmp-devel/files/patch-default_store.c b/net-mgmt/net-snmp-devel/files/patch-default_store.c deleted file mode 100644 index 076ecec1431e..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-default_store.c +++ /dev/null @@ -1,12 +0,0 @@ ---- snmplib/default_store.c.orig Tue Jan 25 10:20:31 2005 -+++ snmplib/default_store.c Tue Jan 25 10:20:47 2005 -@@ -145,6 +145,9 @@ - #include <winsock.h> - #endif - -+#if HAVE_UNISTD_H -+#include <unistd.h> -+#endif - #if HAVE_DMALLOC_H - #include <dmalloc.h> - #endif diff --git a/net-mgmt/net-snmp-devel/files/patch-disk.c b/net-mgmt/net-snmp-devel/files/patch-disk.c deleted file mode 100644 index d58269d1e08d..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-disk.c +++ /dev/null @@ -1,31 +0,0 @@ ---- agent/mibgroup/ucd-snmp/disk.c.orig 2008-07-05 22:11:22.366362753 +0900 -+++ agent/mibgroup/ucd-snmp/disk.c 2008-07-06 00:32:19.611196878 +0900 -@@ -73,6 +73,9 @@ - #if HAVE_SYS_VFS_H - #include <sys/vfs.h> - #endif -+#if defined(__FreeBSD__) && __FreeBSD_version >= 700055 -+#include <sys/ucred.h> -+#endif - #if defined(HAVE_STATFS) - #if HAVE_SYS_MOUNT_H - #include <sys/mount.h> -@@ -491,6 +494,18 @@ - dummy = 1; - } - endfsent(); /* close /etc/fstab */ -+#if defined(__FreeBSD__) && __FreeBSD_version >= 700055 -+ { -+ struct statfs *mntbuf; -+ size_t i, mntsize; -+ mntsize = getmntinfo(&mntbuf, MNT_NOWAIT); -+ for (i = 0; i < mntsize; i++) { -+ if (strncmp(mntbuf[i].f_fstypename, "zfs", 3) == 0) { -+ add_device(mntbuf[i].f_mntonname, mntbuf[i].f_mntfromname, -1, minpercent, 0); -+ } -+ } -+ } -+#endif - if(dummy != 0) { - /* - * dummy clause for else below diff --git a/net-mgmt/net-snmp-devel/files/patch-freebsd8.h b/net-mgmt/net-snmp-devel/files/patch-freebsd8.h deleted file mode 100644 index c8ca163d5223..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-freebsd8.h +++ /dev/null @@ -1,5 +0,0 @@ ---- include/net-snmp/system/freebsd8.h.orig 2009-01-24 13:29:00.000000000 +0900 -+++ include/net-snmp/system/freebsd8.h 2009-01-24 23:23:25.000000000 +0900 -@@ -0,0 +1,2 @@ -+#include "freebsd7.h" -+#define freebsd7 freebsd7 diff --git a/net-mgmt/net-snmp-devel/files/patch-generic.h b/net-mgmt/net-snmp-devel/files/patch-generic.h deleted file mode 100644 index 9eddc80e0d1a..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-generic.h +++ /dev/null @@ -1,14 +0,0 @@ ---- include/net-snmp/system/generic.h.orig 2008-03-26 10:28:25.802233395 +0900 -+++ include/net-snmp/system/generic.h 2008-03-26 10:29:40.629721291 +0900 -@@ -1,3 +1,5 @@ -+#ifndef __NET_SNMP_SYSTEM_GENERIC_H__ -+#define __NET_SNMP_SYSTEM_GENERIC_H__ - - #define bsdlike bsdlike - -@@ -72,3 +74,5 @@ - */ - #define INP_NEXT_SYMBOL inp_next - #define INP_PREV_SYMBOL inp_prev -+ -+#endif /* !__NET_SNMP_SYSTEM_GENERIC_H__ */ diff --git a/net-mgmt/net-snmp-devel/files/patch-hr_storage.c b/net-mgmt/net-snmp-devel/files/patch-hr_storage.c deleted file mode 100644 index 4fc2bd0d5544..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-hr_storage.c +++ /dev/null @@ -1,17 +0,0 @@ ---- agent/mibgroup/host/hr_storage.c.orig 2007-06-08 19:33:58.000000000 +0900 -+++ agent/mibgroup/host/hr_storage.c 2008-03-25 21:26:23.470718989 +0900 -@@ -489,11 +489,13 @@ - * - *********************/ - -+/* kuriyama: should be removed? */ - static const char *hrs_descr[] = { - NULL, - "Memory Buffers", /* HRS_TYPE_MBUF */ - "Real Memory", /* HRS_TYPE_MEM */ -- "Swap Space" /* HRS_TYPE_SWAP */ -+ "Swap Space", /* HRS_TYPE_SWAP */ -+ "Memory Buffer Clusters" /* HRS_TYPE_MBUFCLUSTER */ - }; - - diff --git a/net-mgmt/net-snmp-devel/files/patch-hr_storage.h b/net-mgmt/net-snmp-devel/files/patch-hr_storage.h deleted file mode 100644 index a14eb9f1043c..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-hr_storage.h +++ /dev/null @@ -1,11 +0,0 @@ ---- agent/mibgroup/host/hr_storage.h.orig Tue Feb 25 22:17:48 2003 -+++ agent/mibgroup/host/hr_storage.h Wed May 5 15:27:40 2004 -@@ -12,6 +12,7 @@ - #define HRS_TYPE_MBUF 1 - #define HRS_TYPE_MEM 2 - #define HRS_TYPE_SWAP 3 --#define HRS_TYPE_FIXED_MAX 3 /* the largest fixed type */ -+#define HRS_TYPE_MBUFCLUSTER 4 -+#define HRS_TYPE_FIXED_MAX 4 /* the largest fixed type */ - - #endif /* _MIBGROUP_HRSTORAGE_H */ diff --git a/net-mgmt/net-snmp-devel/files/patch-hr_system.c b/net-mgmt/net-snmp-devel/files/patch-hr_system.c deleted file mode 100644 index f2d810ac0771..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-hr_system.c +++ /dev/null @@ -1,11 +0,0 @@ ---- agent/mibgroup/host/hr_system.c.orig Mon Feb 23 02:29:34 2004 -+++ agent/mibgroup/host/hr_system.c Sat Apr 3 00:00:24 2004 -@@ -596,6 +596,8 @@ - #ifndef UTMP_HAS_NO_TYPE - if (utmp_p->ut_type != USER_PROCESS) - continue; -+#else -+ if (*utmp_p->ut_name != '~') - #endif - #ifndef UTMP_HAS_NO_PID - /* This block of code fixes zombie user PIDs in the diff --git a/net-mgmt/net-snmp-devel/files/patch-interface.c b/net-mgmt/net-snmp-devel/files/patch-interface.c deleted file mode 100644 index 871f9e427e5c..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-interface.c +++ /dev/null @@ -1,11 +0,0 @@ ---- agent/mibgroup/if-mib/data_access/interface.c.orig 2009-01-25 17:49:04.000000000 +0900 -+++ agent/mibgroup/if-mib/data_access/interface.c 2009-01-25 17:49:57.000000000 +0900 -@@ -775,7 +775,7 @@ - netsnmp_conf_if_list *if_ptr = conf_list, *if_next; - while (if_ptr) { - if_next = if_ptr->next; -- free(if_ptr->name); -+ free((void*)if_ptr->name); - free(if_ptr); - if_ptr = if_next; - } diff --git a/net-mgmt/net-snmp-devel/files/patch-interface_ioctl.c b/net-mgmt/net-snmp-devel/files/patch-interface_ioctl.c deleted file mode 100644 index 4939166949be..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-interface_ioctl.c +++ /dev/null @@ -1,13 +0,0 @@ ---- ./agent/mibgroup/if-mib/data_access/interface_ioctl.c.orig Mon Oct 25 12:57:23 2004 -+++ ./agent/mibgroup/if-mib/data_access/interface_ioctl.c Mon Oct 25 12:56:33 2004 -@@ -385,6 +385,10 @@ - if (rc < 0) - return 0; - -+#if defined(__FreeBSD__) -+ return ifrq.ifr_index; -+#else - return ifrq.ifr_ifindex; -+#endif - #endif /* SIOCGIFINDEX */ - } diff --git a/net-mgmt/net-snmp-devel/files/patch-interface_sysctl.c b/net-mgmt/net-snmp-devel/files/patch-interface_sysctl.c deleted file mode 100644 index 262e9c7c12ab..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-interface_sysctl.c +++ /dev/null @@ -1,41 +0,0 @@ -Index: agent/mibgroup/if-mib/data_access/interface_sysctl.c -=================================================================== ---- agent/mibgroup/if-mib/data_access/interface_sysctl.c (revision 17324) -+++ agent/mibgroup/if-mib/data_access/interface_sysctl.c (working copy) -@@ -451,22 +451,22 @@ - NETSNMP_INTERFACE_FLAGS_HAS_V6_REASMMAX; - - /* get counters */ -- entry->stats.ibytes.low = ifp->ifm_data.ifi_ibytes; -- entry->stats.ibytes.high = 0; -- entry->stats.iucast.low = ifp->ifm_data.ifi_ipackets; -- entry->stats.iucast.high = 0; -- entry->stats.imcast.low = ifp->ifm_data.ifi_imcasts; -- entry->stats.imcast.high = 0; -+ entry->stats.ibytes.low = ifp->ifm_data.ifi_ibytes & 0xffffffff; -+ entry->stats.ibytes.high = ifp->ifm_data.ifi_ibytes >> 32; -+ entry->stats.iucast.low = ifp->ifm_data.ifi_ipackets & 0xffffffff; -+ entry->stats.iucast.high = ifp->ifm_data.ifi_ipackets >> 32; -+ entry->stats.imcast.low = ifp->ifm_data.ifi_imcasts & 0xffffffff; -+ entry->stats.imcast.high = ifp->ifm_data.ifi_imcasts >> 32; - entry->stats.ierrors = ifp->ifm_data.ifi_ierrors; - entry->stats.idiscards = ifp->ifm_data.ifi_iqdrops; - entry->stats.iunknown_protos = ifp->ifm_data.ifi_noproto; - -- entry->stats.obytes.low = ifp->ifm_data.ifi_obytes; -- entry->stats.obytes.high = 0; -- entry->stats.oucast.low = ifp->ifm_data.ifi_opackets; -- entry->stats.oucast.high = 0; -- entry->stats.omcast.low = ifp->ifm_data.ifi_omcasts; -- entry->stats.omcast.high = 0; -+ entry->stats.obytes.low = ifp->ifm_data.ifi_obytes & 0xffffffff; -+ entry->stats.obytes.high = ifp->ifm_data.ifi_obytes >> 32; -+ entry->stats.oucast.low = ifp->ifm_data.ifi_opackets & 0xffffffff; -+ entry->stats.oucast.high = ifp->ifm_data.ifi_opackets >> 32; -+ entry->stats.omcast.low = ifp->ifm_data.ifi_omcasts & 0xffffffff; -+ entry->stats.omcast.high = ifp->ifm_data.ifi_omcasts >> 32; - entry->stats.oerrors = ifp->ifm_data.ifi_oerrors; - entry->ns_flags |= NETSNMP_INTERFACE_FLAGS_HAS_BYTES | - NETSNMP_INTERFACE_FLAGS_HAS_DROPS | - - diff --git a/net-mgmt/net-snmp-devel/files/patch-interfaces.c b/net-mgmt/net-snmp-devel/files/patch-interfaces.c deleted file mode 100644 index bc56d6ca3a3e..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-interfaces.c +++ /dev/null @@ -1,157 +0,0 @@ ---- agent/mibgroup/mibII/interfaces.c.orig Wed Oct 26 00:52:19 2005 -+++ agent/mibgroup/mibII/interfaces.c Tue Feb 27 20:44:48 2007 -@@ -395,6 +395,133 @@ - return NULL; - } - -+#if defined(freebsd2) -+static char *physaddrbuf; -+static int nphysaddrs; -+struct sockaddr_dl **physaddrs; -+ -+void -+init_interfaces_setup(void) -+{ -+ int naddrs, ilen, bit; -+ static int mib[6] -+ = { CTL_NET, PF_ROUTE, 0, AF_LINK, NET_RT_IFLIST, 0 }; -+ char *cp; -+ size_t len; -+ struct rt_msghdr *rtm; -+ struct if_msghdr *ifm; -+ struct ifa_msghdr *ifam; -+ struct sockaddr *sa; -+ -+ naddrs = 0; -+ if (physaddrs) -+ free(physaddrs); -+ if (physaddrbuf) -+ free(physaddrbuf); -+ physaddrbuf = 0; -+ physaddrs = 0; -+ nphysaddrs = 0; -+ len = 0; -+ if (sysctl(mib, 6, 0, &len, 0, 0) < 0) -+ return; -+ -+ cp = physaddrbuf = malloc(len); -+ if (physaddrbuf == 0) -+ return; -+ if (sysctl(mib, 6, physaddrbuf, &len, 0, 0) < 0) { -+ free(physaddrbuf); -+ physaddrbuf = 0; -+ return; -+ } -+ -+ loop: -+ ilen = len; -+ cp = physaddrbuf; -+ while (ilen > 0) { -+ rtm = (struct rt_msghdr *) cp; -+ if (rtm->rtm_version != RTM_VERSION || rtm->rtm_type != RTM_IFINFO) { -+ free(physaddrs); -+ physaddrs = 0; -+ free(physaddrbuf); -+ physaddrbuf = 0; -+ } -+ ifm = (struct if_msghdr *) rtm; -+#if defined(freebsd3) || defined(freebsd4) || defined(freebsd5) -+ if (physaddrs != 0) -+ physaddrs[naddrs] = (void *) (ifm + 1); -+ naddrs++; -+#endif -+ ilen -= ifm->ifm_msglen; -+ cp += ifm->ifm_msglen; -+ rtm = (struct rt_msghdr *) cp; -+ while (ilen > 0 && rtm->rtm_type == RTM_NEWADDR) { -+#if defined(freebsd3) || defined(freebsd4) || defined(freebsd5) -+ ilen -= rtm->rtm_msglen; -+ cp += rtm->rtm_msglen; -+#else -+ int is_alias = 0; -+ ifam = (struct ifa_msghdr *) rtm; -+ ilen -= sizeof(*ifam); -+ cp += sizeof(*ifam); -+ sa = (struct sockaddr *) cp; -+#define ROUND(x) (((x) + sizeof(long) - 1) & ~sizeof(long)) -+ for (bit = 1; bit && ilen > 0; bit <<= 1) { -+ if (!(ifam->ifam_addrs & bit)) -+ continue; -+ ilen -= ROUND(sa->sa_len); -+ cp += ROUND(sa->sa_len); -+ -+ if (bit == RTA_IFA) { -+ if (physaddrs) -+#define satosdl(sa) ((struct sockaddr_dl *)(sa)) -+ physaddrs[naddrs++] -+ = satosdl(sa); -+ else -+ naddrs++; -+ } -+ sa = (struct sockaddr *) cp; -+ } -+#endif -+ rtm = (struct rt_msghdr *) cp; -+ } -+ } -+ if (physaddrs) { -+ nphysaddrs = naddrs; -+ return; -+ } -+ physaddrs = malloc(naddrs * sizeof(*physaddrs)); -+ if (physaddrs == 0) -+ return; -+ naddrs = 0; -+ goto loop; -+ -+} -+ -+static int -+get_phys_address(int iindex, char **ap, int *len) -+{ -+ int i; -+ int once = 1; -+ -+ do { -+ for (i = 0; i < nphysaddrs; i++) { -+ if (physaddrs[i]->sdl_index == iindex) -+ break; -+ } -+ if (i < nphysaddrs) -+ break; -+ init_interfaces_setup(); -+ } while (once--); -+ -+ if (i < nphysaddrs) { -+ *ap = LLADDR(physaddrs[i]); -+ *len = physaddrs[i]->sdl_alen; -+ return 0; -+ } -+ return -1; -+} -+#endif -+ - #ifdef USE_SYSCTL_IFLIST - - static u_char *if_list = 0; -@@ -603,10 +730,20 @@ - } - return (u_char *) & long_return; - case IFPHYSADDRESS: -+#if defined(freebsd2) -+ { -+ char *cp; -+ if (get_phys_address(interface, &cp, var_len)) -+ return NULL; -+ else -+ return cp; -+ } -+#else - /* - * XXX - */ - return NULL; -+#endif - case IFADMINSTATUS: - long_return = if_msg.ifm_flags & IFF_UP ? 1 : 2; - return (u_char *) & long_return; diff --git a/net-mgmt/net-snmp-devel/files/patch-ipv6.c b/net-mgmt/net-snmp-devel/files/patch-ipv6.c deleted file mode 100644 index 5d0356e60741..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-ipv6.c +++ /dev/null @@ -1,598 +0,0 @@ ---- agent/mibgroup/mibII/ipv6.c.orig 2007-05-25 07:01:04.000000000 +0900 -+++ agent/mibgroup/mibII/ipv6.c 2008-03-26 07:29:07.122940424 +0900 -@@ -8,10 +8,25 @@ - #define _KERNEL 1 - #define _I_DEFINED_KERNEL - #endif -+ -+/* make this source a wee bit more readable */ -+#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/ -+#define OS_NET_BSD_16_OR_LATER 1 -+#endif -+#if !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin) -+#define OS_NOT_FREEBSD_NOR_DARWIN 1 -+#endif -+#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin) -+#define OS_FREEBSD_OR_DARWIN 1 -+#if !defined(INP_IPV6PROTO) -+#define INP_IPV6PROTO 0x04 -+#endif -+#endif -+ - #include <sys/types.h> - #include <sys/param.h> - #include <sys/socket.h> --#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin) -+#if OS_FREEBSD_OR_DARWIN - # if HAVE_SYS_SOCKETVAR_H - # include <sys/socketvar.h> - # endif -@@ -80,7 +95,7 @@ - # include <netinet6/ip6_var.h> - #endif - #include <net/route.h> --#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin) -+#if OS_FREEBSD_OR_DARWIN - # if HAVE_NETINET_IN_PCB_H - # include <netinet/in_pcb.h> - # endif -@@ -578,7 +593,7 @@ - memcpy(result, &tmp, sizeof(tmp)); - return 0; - } --#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin) -+#if OS_FREEBSD_OR_DARWIN - q = (caddr_t) TAILQ_NEXT(&tmp, if_link); - #else - # if defined(__NetBSD__) || defined(__OpenBSD__) -@@ -809,7 +824,7 @@ - - if (if_getifnet(interface, &ifnet) < 0) - break; --#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin) -+#if OS_FREEBSD_OR_DARWIN - ifa = (caddr_t) TAILQ_FIRST(&ifnet.if_addrhead); - #else - # if defined(__NetBSD__) || defined(__OpenBSD__) -@@ -836,7 +851,7 @@ - *var_len = sdl.sdl_alen; - return (u_char *) (sdl.sdl_data + sdl.sdl_nlen); - } --#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin) -+#if OS_FREEBSD_OR_DARWIN - ifa = (caddr_t) TAILQ_NEXT(&ifaddr, ifa_link); - #else - # if defined(__NetBSD__) || defined(__OpenBSD__) -@@ -1229,32 +1244,33 @@ - size_t * length, - int exact, size_t * var_len, WriteMethod ** write_method) - { -- oid newname[MAX_OID_LEN]; -- oid savname[MAX_OID_LEN]; -+ oid newname[MAX_OID_LEN], savname[MAX_OID_LEN]; - int result; - int i, j; - caddr_t p; -- static struct in6pcb in6pcb, savpcb; -+ static struct in6pcb tstpcb, savpcb; - int found, savnameLen; --#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/ -+#if OS_NOT_FREEBSD_NOR_DARWIN -+ static struct in6pcb udb6; -+#endif -+#if OS_NET_BSD_16_OR_LATER - struct inpcbtable udbtable; - caddr_t first; --#elif (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin) -+#endif -+#if OS_FREEBSD_OR_DARWIN - char *sysctl_buf; - struct xinpgen *xig, *oxig; --#else -- static struct in6pcb udb6; - #endif - - DEBUGMSGTL(("mibII/ipv6", "var_udp6: ")); - DEBUGMSGOID(("mibII/ipv6", name, *length)); - DEBUGMSG(("mibII/ipv6", " %d\n", exact)); - --#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/ -+#if OS_NET_BSD_16_OR_LATER - if (!auto_nlist("udbtable", (char *) &udbtable, sizeof(udbtable))) - return NULL; - first = p = (caddr_t)udbtable.inpt_queue.cqh_first; --#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin) -+#elif OS_NOT_FREEBSD_NOR_DARWIN - if (!auto_nlist("udb6", (char *) &udb6, sizeof(udb6))) - return NULL; - p = (caddr_t) udb6.in6p_next; -@@ -1283,9 +1299,10 @@ - (int) vp->namelen * sizeof(oid)); - DEBUGMSGTL(("mibII/ipv6", "start: p=%x\n", p)); - while ( --#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/ -+#if OS_NET_BSD_16_OR_LATER - p && p != first --#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin) -+#elif OS_NOT_FREEBSD_NOR_DARWIN -+ - p && (u_long) p != auto_nlist_value("udb6") - #else - xig->xig_len > sizeof(struct xinpgen) -@@ -1293,31 +1310,32 @@ - ) { - DEBUGMSGTL(("mibII/ipv6", "looping: p=%x\n", p)); - --#if !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin) -- if (!NETSNMP_KLOOKUP(p, (char *) &in6pcb, sizeof(in6pcb))) { -+#if OS_NOT_FREEBSD_NOR_DARWIN -+ if (!NETSNMP_KLOOKUP(p, (char *) &tstpcb, sizeof(tstpcb))) { - DEBUGMSGTL(("mibII/ipv6", "klookup fail for udb6 at %x\n", - p)); - found = 0; - break; - } - #else -- in6pcb = ((struct xinpcb *) xig)->xi_inp; -+ tstpcb = ((struct xinpcb *) xig)->xi_inp; - #endif --#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/ -- if (in6pcb.in6p_af != AF_INET6) -+#if OS_NET_BSD_16_OR_LATER -+ if (tstpcb.in6p_af != AF_INET6) { -+ p = (caddr_t)tstpcb.in6p_queue.cqe_next; - goto skip; --#elif (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin) -- if (0 == (in6pcb.inp_vflag & INP_IPV6)) -+#elif OS_FREEBSD_OR_DARWIN -+ if (0 == (tstpcb.inp_vflag & INP_IPV6PROTO)) - goto skip; - #endif - - j = (int) vp->namelen; - for (i = 0; i < sizeof(struct in6_addr); i++) -- newname[j++] = in6pcb.in6p_laddr.s6_addr[i]; -- newname[j++] = ntohs(in6pcb.in6p_lport); -- if (IN6_IS_ADDR_LINKLOCAL(&in6pcb.in6p_laddr)) -+ newname[j++] = tstpcb.in6p_laddr.s6_addr[i]; -+ newname[j++] = ntohs(tstpcb.inp_lport); -+ if (IN6_IS_ADDR_LINKLOCAL(&tstpcb.in6p_laddr)) - newname[j++] = -- ntohs(*(uint16_t *) & in6pcb.in6p_laddr.s6_addr[2]); -+ ntohs(*(uint16_t *) & tstpcb.in6p_laddr.s6_addr[2]); - else - newname[j++] = 0; - /*XXX*/ -@@ -1328,7 +1346,7 @@ - - result = snmp_oid_compare(name, *length, newname, j); - if (exact && (result == 0)) { -- memcpy(&savpcb, &in6pcb, sizeof(savpcb)); -+ memcpy(&savpcb, &tstpcb, sizeof(savpcb)); - savnameLen = j; - memcpy(savname, newname, j * sizeof(oid)); - found++; -@@ -1339,7 +1357,7 @@ - */ - if ((savnameLen == 0) || - (snmp_oid_compare(savname, savnameLen, newname, j) > 0)) { -- memcpy(&savpcb, &in6pcb, sizeof(savpcb)); -+ memcpy(&savpcb, &tstpcb, sizeof(savpcb)); - savnameLen = j; - memcpy(savname, newname, j * sizeof(oid)); - found++; -@@ -1347,15 +1365,15 @@ - } - - skip: --#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/ -- p = (caddr_t)in6pcb.in6p_queue.cqe_next; --#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin) -- p = (caddr_t) in6pcb.in6p_next; -+#if OS_NET_BSD_16_OR_LATER -+ p = (caddr_t)tstpcb.in6p_queue.cqe_next; -+#elif OS_NOT_FREEBSD_NOR_DARWIN -+ p = (caddr_t) tstpcb.in6p_next; - #else - xig = (struct xinpgen *) ((char *) xig + xig->xig_len); - #endif - } --#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin) -+#if OS_FREEBSD_OR_DARWIN - free(sysctl_buf); - #endif - DEBUGMSGTL(("mibII/ipv6", "found=%d\n", found)); -@@ -1363,7 +1381,7 @@ - return NULL; - *length = savnameLen; - memcpy((char *) name, (char *) savname, *length * sizeof(oid)); -- memcpy(&in6pcb, &savpcb, sizeof(savpcb)); -+ memcpy(&tstpcb, &savpcb, sizeof(savpcb)); - *write_method = 0; - *var_len = sizeof(long); /* default to 'long' results */ - -@@ -1376,14 +1394,14 @@ - switch (vp->magic) { - case IPV6UDPLOCALADDRESS: - *var_len = sizeof(struct in6_addr); -- return in6pcb.in6p_laddr.s6_addr; -+ return savpcb.in6p_laddr.s6_addr; - case IPV6UDPLOCALPORT: -- long_return = ntohs(in6pcb.in6p_lport); -+ long_return = ntohs(savpcb.inp_lport); - return (u_char *) & long_return; - case IPV6UDPIFINDEX: -- if (IN6_IS_ADDR_LINKLOCAL(&in6pcb.in6p_laddr)) -+ if (IN6_IS_ADDR_LINKLOCAL(&savpcb.in6p_laddr)) - long_return = -- ntohs(*(uint16_t *) & in6pcb.in6p_laddr.s6_addr[2]); -+ ntohs(*(uint16_t *) & savpcb.in6p_laddr.s6_addr[2]); - else - long_return = 0; - /*XXX*/ return (u_char *) & long_return; -@@ -1401,24 +1419,24 @@ - size_t * length, - int exact, size_t * var_len, WriteMethod ** write_method) - { -- oid newname[MAX_OID_LEN]; -- oid savname[MAX_OID_LEN]; -+ oid newname[MAX_OID_LEN], savname[MAX_OID_LEN]; - int result; - int i, j; - caddr_t p; -- static struct in6pcb in6pcb, savpcb; -+ static struct in6pcb tstpcb, savpcb; - struct tcp6cb tcp6cb; - int found, savnameLen; - static int tcp6statemap[TCP6_NSTATES]; - static int initialized = 0; --#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/ -+#if OS_NOT_FREEBSD_NOR_DARWIN -+ static struct in6pcb tcb6; -+#endif -+#if OS_NET_BSD_16_OR_LATER - struct inpcbtable tcbtable; - caddr_t first; --#elif (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin) -+#elif OS_FREEBSD_OR_DARWIN - char *sysctl_buf; - struct xinpgen *xig, *oxig; --#else -- static struct in6pcb tcb6; - #endif - - if (!initialized) { -@@ -1440,11 +1458,11 @@ - DEBUGMSGOID(("mibII/ipv6", name, *length)); - DEBUGMSG(("mibII/ipv6", " %d\n", exact)); - --#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/ -+#if OS_NET_BSD_16_OR_LATER - if (!auto_nlist("tcbtable", (char *) &tcbtable, sizeof(tcbtable))) - return NULL; - first = p = (caddr_t)tcbtable.inpt_queue.cqh_first; --#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin) -+#elif OS_NOT_FREEBSD_NOR_DARWIN - if (!auto_nlist("tcb6", (char *) &tcb6, sizeof(tcb6))) - return NULL; - p = (caddr_t) tcb6.in6p_next; -@@ -1473,9 +1491,10 @@ - (int) vp->namelen * sizeof(oid)); - DEBUGMSGTL(("mibII/ipv6", "start: p=%x\n", p)); - while ( --#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/ -+#if OS_NET_BSD_16_OR_LATER - p && p != first --#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin) -+#elif OS_NOT_FREEBSD_NOR_DARWIN -+ - p && (u_long) p != auto_nlist_value("tcb6") - #else - xig->xig_len > sizeof(struct xinpgen) -@@ -1483,39 +1502,39 @@ - ) { - DEBUGMSGTL(("mibII/ipv6", "looping: p=%x\n", p)); - --#if !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin) -- if (!NETSNMP_KLOOKUP(p, (char *) &in6pcb, sizeof(in6pcb))) { -+#if OS_NOT_FREEBSD_NOR_DARWIN -+ if (!NETSNMP_KLOOKUP(p, (char *) &tstpcb, sizeof(tstpcb))) { - DEBUGMSGTL(("mibII/ipv6", "klookup fail for tcb6 at %x\n", - p)); - found = 0; - break; - } - #else -- in6pcb = ((struct xinpcb *) xig)->xi_inp; -+ tstpcb = ((struct xinpcb *) xig)->xi_inp; - #endif --#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/ -- if (in6pcb.in6p_af != AF_INET6) -+#if OS_NET_BSD_16_OR_LATER -+ if (tstpcb.in6p_af != AF_INET6) - goto skip; --#elif (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin) -- if (0 == (in6pcb.inp_vflag & INP_IPV6)) -+#elif OS_FREEBSD_OR_DARWIN -+ if (0 == (tstpcb.inp_vflag & INP_IPV6)) - goto skip; - #endif -- if (!NETSNMP_KLOOKUP(in6pcb.in6p_ppcb, (char *) &tcp6cb, sizeof(tcp6cb))) { -+ if (!NETSNMP_KLOOKUP(tstpcb.inp_ppcb, (char *) &tcp6cb, sizeof(tcp6cb))) { - DEBUGMSGTL(("mibII/ipv6", "klookup fail for tcb6.tcp6cb at %x\n", -- in6pcb.in6p_ppcb)); -+ tstpcb.inp_ppcb)); - found = 0; - break; - } - j = (int) vp->namelen; - for (i = 0; i < sizeof(struct in6_addr); i++) -- newname[j++] = in6pcb.in6p_laddr.s6_addr[i]; -- newname[j++] = ntohs(in6pcb.in6p_lport); -+ newname[j++] = tstpcb.in6p_laddr.s6_addr[i]; -+ newname[j++] = ntohs(tstpcb.inp_lport); - for (i = 0; i < sizeof(struct in6_addr); i++) -- newname[j++] = in6pcb.in6p_faddr.s6_addr[i]; -- newname[j++] = ntohs(in6pcb.in6p_fport); -- if (IN6_IS_ADDR_LINKLOCAL(&in6pcb.in6p_laddr)) -+ newname[j++] = tstpcb.in6p_faddr.s6_addr[i]; -+ newname[j++] = ntohs(tstpcb.inp_fport); -+ if (IN6_IS_ADDR_LINKLOCAL(&tstpcb.in6p_laddr)) - newname[j++] = -- ntohs(*(uint16_t *) & in6pcb.in6p_laddr.s6_addr[2]); -+ ntohs(*(uint16_t *) & tstpcb.in6p_laddr.s6_addr[2]); - else - newname[j++] = 0; - /*XXX*/ newname[j++] = tcp6statemap[tcp6cb.t_state]; -@@ -1526,13 +1545,13 @@ - DEBUGMSG(("mibII/ipv6", " %d\n", exact)); - - #if 1 /* this is very odd but sometimes happen, and cause infinite loop */ -- if (ntohs(in6pcb.in6p_lport) == 0) -+ if (ntohs(tstpcb.inp_lport) == 0) - goto skip; - #endif - - result = snmp_oid_compare(name, *length, newname, j); - if (exact && (result == 0)) { -- memcpy(&savpcb, &in6pcb, sizeof(savpcb)); -+ memcpy(&savpcb, &tstpcb, sizeof(savpcb)); - savnameLen = j; - memcpy(savname, newname, j * sizeof(oid)); - found++; -@@ -1543,7 +1562,7 @@ - */ - if ((savnameLen == 0) || - (snmp_oid_compare(savname, savnameLen, newname, j) > 0)) { -- memcpy(&savpcb, &in6pcb, sizeof(savpcb)); -+ memcpy(&savpcb, &tstpcb, sizeof(savpcb)); - savnameLen = j; - memcpy(savname, newname, j * sizeof(oid)); - found++; -@@ -1551,15 +1570,15 @@ - } - - skip: --#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/ -- p = (caddr_t)in6pcb.in6p_queue.cqe_next; --#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin) -- p = (caddr_t) in6pcb.in6p_next; -+#if OS_NET_BSD_16_OR_LATER -+ p = (caddr_t)tstpcb.in6p_queue.cqe_next; -+#elif OS_NOT_FREEBSD_NOR_DARWIN -+ p = (caddr_t) tstpcb.in6p_next; - #else - xig = (struct xinpgen *) ((char *) xig + xig->xig_len); - #endif - } --#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin) -+#if OS_FREEBSD_OR_DARWIN - free(sysctl_buf); - #endif - DEBUGMSGTL(("mibII/ipv6", "found=%d\n", found)); -@@ -1580,20 +1599,20 @@ - switch (vp->magic) { - case IPV6TCPLOCALADDR: - *var_len = sizeof(struct in6_addr); -- return (u_char *) & in6pcb.in6p_laddr.s6_addr[0]; -+ return (u_char *) & savpcb.in6p_laddr.s6_addr[0]; - case IPV6TCPLOCALPORT: -- long_return = ntohs(in6pcb.in6p_lport); -+ long_return = ntohs(savpcb.inp_lport); - return (u_char *) & long_return; - case IPV6TCPREMOTEADDR: - *var_len = sizeof(struct in6_addr); -- return (u_char *) & in6pcb.in6p_faddr.s6_addr[0]; -+ return (u_char *) & savpcb.in6p_faddr.s6_addr[0]; - case IPV6TCPREMOTEPORT: -- long_return = ntohs(in6pcb.in6p_fport); -+ long_return = ntohs(savpcb.inp_fport); - return (u_char *) & long_return; - case IPV6TCPIFINDEX: -- if (IN6_IS_ADDR_LINKLOCAL(&in6pcb.in6p_laddr)) -+ if (IN6_IS_ADDR_LINKLOCAL(&savpcb.in6p_laddr)) - long_return = -- ntohs(*(uint16_t *) & in6pcb.in6p_laddr.s6_addr[2]); -+ ntohs(*(uint16_t *) & savpcb.in6p_laddr.s6_addr[2]); - else - long_return = 0; - /*XXX*/ return (u_char *) & long_return; -@@ -1640,22 +1659,23 @@ - size_t * length, - int exact, size_t * var_len, WriteMethod ** write_method) - { -- oid newname[MAX_OID_LEN]; -- oid savname[MAX_OID_LEN]; -+ oid newname[MAX_OID_LEN], savname[MAX_OID_LEN]; - int result; - int i, j; - caddr_t p; -- static struct in6pcb in6pcb, savpcb; -+ static struct in6pcb tstpcb, savpcb; - struct tcpcb tcpcb; - int found, savnameLen; --#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/ -+#if OS_NOT_FREEBSD_NOR_DARWIN -+ static struct in6pcb tcb6; -+#endif -+#if OS_NET_BSD_16_OR_LATER - struct inpcbtable tcbtable; - caddr_t first; --#elif (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin) -+#endif -+#if OS_FREEBSD_OR_DARWIN - char *sysctl_buf; - struct xinpgen *xig, *oxig; --#else -- static struct in6pcb tcb6; - #endif - - DEBUGMSGTL(("mibII/ipv6", "var_tcp6: ")); -@@ -1695,9 +1715,9 @@ - (int) vp->namelen * sizeof(oid)); - DEBUGMSGTL(("mibII/ipv6", "start: p=%x\n", p)); - while ( --#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/ -+#if OS_NET_BSD_16_OR_LATER - p && p != first --#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin) -+#elif OS_NOT_FREEBSD_NOR_DARWIN - p && (u_long) p != auto_nlist_value("tcb6") - #else - xig->xig_len > sizeof(struct xinpgen) -@@ -1705,39 +1725,39 @@ - ) { - DEBUGMSGTL(("mibII/ipv6", "looping: p=%x\n", p)); - --#if !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin) -- if (!NETSNMP_KLOOKUP(p, (char *) &in6pcb, sizeof(in6pcb))) { -+#if OS_NOT_FREEBSD_NOR_DARWIN -+ if (!NETSNMP_KLOOKUP(p, (char *) &tstpcb, sizeof(tstpcb))) { - DEBUGMSGTL(("mibII/ipv6", "klookup fail for tcb6 at %x\n", - p)); - found = 0; - break; - } - #else -- in6pcb = ((struct xinpcb *) xig)->xi_inp; -+ tstpcb = ((struct xinpcb *) xig)->xi_inp; - #endif --#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/ -- if (in6pcb.in6p_af != AF_INET6) -+#if OS_NET_BSD_16_OR_LATER -+ if (tstpcb.in6p_af != AF_INET6) - goto skip; --#elif (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin) -- if (0 == (in6pcb.inp_vflag & INP_IPV6)) -+#elif OS_FREEBSD_OR_DARWIN -+ if (0 == (tstpcb.inp_vflag & INP_IPV6)) - goto skip; - #endif -- if (!NETSNMP_KLOOKUP(in6pcb.in6p_ppcb, (char *) &tcpcb, sizeof(tcpcb))) { -+ if (!NETSNMP_KLOOKUP(tstpcb.inp_ppcb, (char *) &tcpcb, sizeof(tcpcb))) { - DEBUGMSGTL(("mibII/ipv6", "klookup fail for tcb6.tcpcb at %x\n", -- in6pcb.in6p_ppcb)); -+ tstpcb.inp_ppcb)); - found = 0; - break; - } - j = (int) vp->namelen; - for (i = 0; i < sizeof(struct in6_addr); i++) -- newname[j++] = in6pcb.in6p_laddr.s6_addr[i]; -- newname[j++] = ntohs(in6pcb.in6p_lport); -+ newname[j++] = tstpcb.in6p_laddr.s6_addr[i]; -+ newname[j++] = ntohs(tstpcb.inp_lport); - for (i = 0; i < sizeof(struct in6_addr); i++) -- newname[j++] = in6pcb.in6p_faddr.s6_addr[i]; -- newname[j++] = ntohs(in6pcb.in6p_fport); -- if (IN6_IS_ADDR_LINKLOCAL(&in6pcb.in6p_laddr)) -+ newname[j++] = tstpcb.in6p_faddr.s6_addr[i]; -+ newname[j++] = ntohs(tstpcb.inp_fport); -+ if (IN6_IS_ADDR_LINKLOCAL(&tstpcb.in6p_laddr)) - newname[j++] = -- ntohs(*(uint16_t *) & in6pcb.in6p_laddr.s6_addr[2]); -+ ntohs(*(uint16_t *) & tstpcb.in6p_laddr.s6_addr[2]); - else - newname[j++] = 0; - /*XXX*/ newname[j++] = mapTcpState((int)tcpcb.t_state); -@@ -1748,12 +1768,12 @@ - DEBUGMSG(("mibII/ipv6", " %d\n", exact)); - - #if 1 /* this is very odd but sometimes happen, and cause infinite loop */ -- if (ntohs(in6pcb.in6p_lport) == 0) -+ if (ntohs(tstpcb.inp_lport) == 0) - goto skip; - #endif - result = snmp_oid_compare(name, *length, newname, j); - if (exact && (result == 0)) { -- memcpy(&savpcb, &in6pcb, sizeof(savpcb)); -+ memcpy(&savpcb, &tstpcb, sizeof(savpcb)); - savnameLen = j; - memcpy(savname, newname, j * sizeof(oid)); - found++; -@@ -1764,7 +1784,7 @@ - */ - if ((savnameLen == 0) || - (snmp_oid_compare(savname, savnameLen, newname, j) > 0)) { -- memcpy(&savpcb, &in6pcb, sizeof(savpcb)); -+ memcpy(&savpcb, &tstpcb, sizeof(savpcb)); - savnameLen = j; - memcpy(savname, newname, j * sizeof(oid)); - found++; -@@ -1772,15 +1792,15 @@ - } - - skip: --#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /*1.6Y*/ -- p = (caddr_t)in6pcb.in6p_queue.cqe_next; --#elif !(defined(__FreeBSD__) && __FreeBSD__ >= 3) && !defined(darwin) -- p = (caddr_t) in6pcb.in6p_next; -+#if OS_NET_BSD_16_OR_LATER -+ p = (caddr_t)tstpcb.in6p_queue.cqe_next; -+#elif OS_NOT_FREEBSD_NOR_DARWIN -+ p = (caddr_t) tstpcb.in6p_next; - #else - xig = (struct xinpgen *) ((char *) xig + xig->xig_len); - #endif - } --#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(darwin) -+#if OS_FREEBSD_OR_DARWIN - free(sysctl_buf); - #endif - DEBUGMSGTL(("mibII/ipv6", "found=%d\n", found)); -@@ -1788,7 +1808,7 @@ - return NULL; - *length = savnameLen; - memcpy((char *) name, (char *) savname, *length * sizeof(oid)); -- memcpy(&in6pcb, &savpcb, sizeof(savpcb)); -+ memcpy(&tstpcb, &savpcb, sizeof(savpcb)); - *write_method = 0; - *var_len = sizeof(long); /* default to 'long' results */ - -@@ -1801,20 +1821,20 @@ - switch (vp->magic) { - case IPV6TCPLOCALADDR: - *var_len = sizeof(struct in6_addr); -- return (u_char *) & in6pcb.in6p_laddr.s6_addr[0]; -+ return (u_char *) & savpcb.in6p_laddr.s6_addr[0]; - case IPV6TCPLOCALPORT: -- long_return = ntohs(in6pcb.in6p_lport); -+ long_return = ntohs(savpcb.inp_lport); - return (u_char *) & long_return; - case IPV6TCPREMOTEADDR: - *var_len = sizeof(struct in6_addr); -- return (u_char *) & in6pcb.in6p_faddr.s6_addr[0]; -+ return (u_char *) & savpcb.in6p_faddr.s6_addr[0]; - case IPV6TCPREMOTEPORT: -- long_return = ntohs(in6pcb.in6p_fport); -+ long_return = ntohs(savpcb.inp_fport); - return (u_char *) & long_return; - case IPV6TCPIFINDEX: -- if (IN6_IS_ADDR_LINKLOCAL(&in6pcb.in6p_laddr)) -+ if (IN6_IS_ADDR_LINKLOCAL(&savpcb.in6p_laddr)) - long_return = -- ntohs(*(uint16_t *) & in6pcb.in6p_laddr.s6_addr[2]); -+ ntohs(*(uint16_t *) & savpcb.in6p_laddr.s6_addr[2]); - else - long_return = 0; - /*XXX*/ return (u_char *) & long_return; diff --git a/net-mgmt/net-snmp-devel/files/patch-iquery.c b/net-mgmt/net-snmp-devel/files/patch-iquery.c deleted file mode 100644 index e6325ba4c2f9..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-iquery.c +++ /dev/null @@ -1,11 +0,0 @@ ---- agent/mibgroup/utilities/iquery.c.orig 2009-01-25 17:44:17.000000000 +0900 -+++ agent/mibgroup/utilities/iquery.c 2009-01-25 17:47:04.000000000 +0900 -@@ -186,7 +186,7 @@ - ss->securityEngineIDLen = engIDLen; - if ( version == SNMP_VERSION_3 ) { - ss->securityNameLen = strlen(secName); -- memdup(&(ss->securityName), (u_char*)secName, ss->securityNameLen); -+ memdup((u_char**)&(ss->securityName), (u_char*)secName, ss->securityNameLen); - } else { - memdup( &(ss->community), secName, strlen(secName)); - ss->community_len = strlen(secName); diff --git a/net-mgmt/net-snmp-devel/files/patch-keytools.c b/net-mgmt/net-snmp-devel/files/patch-keytools.c deleted file mode 100644 index b6bf51299bd9..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-keytools.c +++ /dev/null @@ -1,12 +0,0 @@ ---- snmplib/keytools.c.orig Tue Jan 25 10:17:48 2005 -+++ snmplib/keytools.c Tue Jan 25 10:18:07 2005 -@@ -32,6 +32,9 @@ - #include <strings.h> - #endif - -+#if HAVE_UNISTD_H -+#include <unistd.h> -+#endif - #if HAVE_DMALLOC_H - #include <dmalloc.h> - #endif diff --git a/net-mgmt/net-snmp-devel/files/patch-lcd_time.c b/net-mgmt/net-snmp-devel/files/patch-lcd_time.c deleted file mode 100644 index 60d00ac6a960..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-lcd_time.c +++ /dev/null @@ -1,12 +0,0 @@ ---- snmplib/lcd_time.c.orig Tue Jan 25 10:16:53 2005 -+++ snmplib/lcd_time.c Tue Jan 25 10:17:10 2005 -@@ -38,6 +38,9 @@ - #include <netinet/in.h> - #endif - -+#if HAVE_UNISTD_H -+#include <unistd.h> -+#endif - #if HAVE_DMALLOC_H - #include <dmalloc.h> - #endif diff --git a/net-mgmt/net-snmp-devel/files/patch-local:fixproc b/net-mgmt/net-snmp-devel/files/patch-local:fixproc deleted file mode 100644 index fa0f3fb65767..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-local:fixproc +++ /dev/null @@ -1,90 +0,0 @@ ---- local/fixproc.orig Wed May 25 01:23:54 2005 -+++ local/fixproc Wed Nov 30 12:16:05 2005 -@@ -1,4 +1,4 @@ --#!/usr/bin/perl -+#!%%PERL%% - # - # fixproc [-min n] [-max n] [-check | -kill | -restart | -exist | -fix] proc ... - # -@@ -131,7 +131,7 @@ - - use File::Temp qw(tempfile); - --$database_file = '/local/etc/fixproc.conf'; -+$database_file = '%%PREFIX%%/etc/fixproc.conf'; - - $debug = 0; # specify debug level using -dN - # currently defined: -d1 -@@ -157,6 +157,14 @@ - $shell_header = "#!/bin/sh\n"; - $shell_end_marker = 'shell_end_marker'; - -+open(command, "/bin/ps -p $$ |") || die "$0: can't run ps command\n"; -+if (split(' ', <command>) > 4) { -+ $ps_opts = 'ax'; -+} else { -+ $ps_opts = '-e'; -+} -+close command; -+ - &read_args(); - &read_database(); - # &dump_database(); # debug only -@@ -305,41 +313,47 @@ - - # first try kill - $! = $fixproc_error; -- open (COMMAND, "/bin/ps -e | /bin/grep $proc |") -+ open (COMMAND, "/bin/ps $ps_opts |") - || die "$0: can't run ps-grep-awk command\n"; - while (<COMMAND>) - { -- # match the first field of ps -e -+ if /$proc/ { -+ # match the first field of ps $ps_opts - $! = $fixproc_error; -- /^\s*(\d+)\s/ || die "$0: can't match ps -e output\n"; -- system "kill $1"; -+ /^\s*(\d+)\s/ || die "$0: can't match ps $ps_opts output\n"; -+ kill 15, $1; -+ } - } -+ close COMMAND; - - # if process still exist, try kill -9 - sleep 2; - $! = $fixproc_error; -- open (COMMAND, "/bin/ps -e | /bin/grep $proc |") -+ open (COMMAND, "/bin/ps $ps_opts |") - || die "$0: can't run ps-grep-awk command\n"; - $second_kill_needed = 0; - while (<COMMAND>) - { -- # match the first field of ps -e -+ if /$proc/ { -+ # match the first field of ps $ps_opts - $! = $fixproc_error; -- /^\s*(\d+)\s/ || die "$0: can't match ps -e output\n"; -- system "kill -9 $1"; -+ /^\s*(\d+)\s/ || die "$0: can't match ps $ps_opts output\n"; -+ kill 9, $1; - $second_kill_needed = 1; - } -+ close COMMAND; - return ($no_error) if ($second_kill_needed == 0); - - # see if kill -9 worked - sleep 2; - $! = $fixproc_error; -- open (COMMAND, "/bin/ps -e | /bin/grep $proc |") -+ open (COMMAND, "/bin/ps $ps_opts |") - || die "$0: can't run ps-grep-awk command\n"; - while (<COMMAND>) - { # a process still exist, return error -- return $cannot_kill_error; -+ return $cannot_kill_error if /$proc/; - } -+ close COMMAND; - return $no_error; # good, all dead - } - diff --git a/net-mgmt/net-snmp-devel/files/patch-local:ipf-mod.pl b/net-mgmt/net-snmp-devel/files/patch-local:ipf-mod.pl deleted file mode 100644 index 8bf98d4f1d52..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-local:ipf-mod.pl +++ /dev/null @@ -1,21 +0,0 @@ ---- local/ipf-mod.pl.orig Thu May 29 05:30:19 2003 -+++ local/ipf-mod.pl Thu May 29 05:40:13 2003 -@@ -1,4 +1,4 @@ --#!/usr/bin/perl -s -+#!%%PERL%% -s - ## - ## IP Filter UCD-SNMP pass module - ## -@@ -9,10 +9,10 @@ - ## Date: $ Tue Dec 1 10:24:08 EET 1998 $ - ## Version: 1.1a - --# Put this file in /usr/local/bin/ipf-mod.pl and then add the following -+# Put this file in %%PREFIX%%/bin/ipf-mod.pl and then add the following - # line to your snmpd.conf file (without the # at the front): - # --# pass .1.3.6.1.4.1.2021.13.2 /usr/local/bin/ipf-mod.pl -+# pass .1.3.6.1.4.1.2021.13.2 %%PREFIX%%/bin/ipf-mod.pl - - # enterprises.ucdavis.ucdExperimental.ipFilter = .1.3.6.1.4.1.2021.13.2 - # ipfInTable.ipfInEntry.ipfInIndex integer = 1.1.1 diff --git a/net-mgmt/net-snmp-devel/files/patch-local:mib2c b/net-mgmt/net-snmp-devel/files/patch-local:mib2c deleted file mode 100644 index a0a2ce336f86..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-local:mib2c +++ /dev/null @@ -1,21 +0,0 @@ ---- local/mib2c.orig Fri Sep 10 21:30:15 2004 -+++ local/mib2c Mon Oct 25 08:38:30 2004 -@@ -1,5 +1,4 @@ --#!/usr/bin/perl --#!/usr/bin/perl -w -+#!%%PERL%% - - # - # $Id: mib2c,v 5.57 2004/09/10 12:30:15 dts12 Exp $ -@@ -60,8 +59,9 @@ - if($ENV{MIB2C_DIR}) { - push @def_search_dirs, split(/:/, $ENV{MIB2C_DIR}); - } --push @def_search_dirs, "/usr/local/share/snmp/"; --push @def_search_dirs, "/usr/local/share/snmp/mib2c-data"; -+push @def_search_dirs, "%%PREFIX%%/share/snmp/"; -+push @def_search_dirs, "%%PREFIX%%/etc/snmp/"; -+push @def_search_dirs, "%%PREFIX%%/share/snmp/mib2c-data"; - push @def_search_dirs, "./mib2c-conf.d"; - - sub usage { diff --git a/net-mgmt/net-snmp-devel/files/patch-local:snmpcheck.def b/net-mgmt/net-snmp-devel/files/patch-local:snmpcheck.def deleted file mode 100644 index 4f3b4a2491da..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-local:snmpcheck.def +++ /dev/null @@ -1,8 +0,0 @@ ---- local/snmpcheck.def.orig Thu May 29 05:28:22 2003 -+++ local/snmpcheck.def Thu May 29 05:29:49 2003 -@@ -1,4 +1,4 @@ --#!/usr/local/bin/perl -w -+#!%%PERL%% -w - - use strict 'refs'; - require Net::Ping; diff --git a/net-mgmt/net-snmp-devel/files/patch-local:snmpconf b/net-mgmt/net-snmp-devel/files/patch-local:snmpconf deleted file mode 100644 index f2a0b11cf75e..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-local:snmpconf +++ /dev/null @@ -1,35 +0,0 @@ ---- local/snmpconf.orig Sun Aug 21 10:23:23 2005 -+++ local/snmpconf Wed Nov 30 12:19:42 2005 -@@ -1,4 +1,4 @@ --#!/usr/bin/perl -w -+#!%%PERL%% -w - - # - # A simple configuration file builder based on questions listed in -@@ -31,7 +31,7 @@ - $opts{'c'} = &my_getenv("SNMPSHAREPATH") . "/snmpconf-data"; - } - else { -- $opts{'c'} = "/usr/local/share/snmp/snmpconf-data"; -+ $opts{'c'} = "%%PREFIX%%/share/snmp/snmpconf-data"; - } - - # default config file path -@@ -39,7 +39,7 @@ - $confpath = &my_getenv("SNMPCONFPATH"); - } - else { -- $confpath = "/usr/local/share/snmp"; -+ $confpath = "%%PREFIX%%/share/snmp"; - } - - # home environment variable -@@ -100,7 +100,7 @@ - $ENV_SEPARATOR = ';'; - } - my @searchpath = split(/$ENV_SEPARATOR/, $confpath); --push @searchpath, "/usr/local/etc/snmp"; -+push @searchpath, "%%PREFIX%%/etc/snmp"; - push @searchpath, "."; - push @searchpath, "$home"; - diff --git a/net-mgmt/net-snmp-devel/files/patch-local:tkmib b/net-mgmt/net-snmp-devel/files/patch-local:tkmib deleted file mode 100644 index 3278d27c3809..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-local:tkmib +++ /dev/null @@ -1,9 +0,0 @@ ---- local/tkmib.orig Thu May 29 05:30:19 2003 -+++ local/tkmib Thu May 29 05:31:46 2003 -@@ -1,5 +1,4 @@ --#!/usr/bin/perl --#!/usr/bin/perl -w -+#!%%PERL%% -w - - require 5; - diff --git a/net-mgmt/net-snmp-devel/files/patch-local:traptoemail b/net-mgmt/net-snmp-devel/files/patch-local:traptoemail deleted file mode 100644 index 402506b540c6..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-local:traptoemail +++ /dev/null @@ -1,16 +0,0 @@ ---- local/traptoemail.orig Thu May 29 05:30:19 2003 -+++ local/traptoemail Thu May 29 05:35:13 2003 -@@ -1,11 +1,11 @@ --#!/usr/bin/perl -+#!%%PERL%% - - # This is a snmptrapd handler script to convert snmp traps into email - # messages. - - # Usage: - # Put a line like the following in your snmptrapd.conf file: --# traphandle TRAPOID|default /usr/local/bin/traptoemail [-f FROM] [-s SMTPSERVER]b ADDRESSES -+# traphandle TRAPOID|default %%PREFIX%%/bin/traptoemail [-f FROM] [-s SMTPSERVER]b ADDRESSES - # FROM defaults to "root" - # SMTPSERVER defaults to "localhost" - diff --git a/net-mgmt/net-snmp-devel/files/patch-memory_freebsd.c b/net-mgmt/net-snmp-devel/files/patch-memory_freebsd.c deleted file mode 100644 index ccdc537e629a..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-memory_freebsd.c +++ /dev/null @@ -1,37 +0,0 @@ ---- agent/mibgroup/hardware/memory/memory_freebsd.c.orig 2008-05-28 20:48:46.000000000 +0900 -+++ agent/mibgroup/hardware/memory/memory_freebsd.c 2008-11-14 16:56:48.000000000 +0900 -@@ -59,6 +59,7 @@ - sysctlbyname("vfs.bufspace", &bufspace, &buf_size, NULL, 0); - sysctlbyname("vfs.maxbufspace", &maxbufspace, &buf_size, NULL, 0); - auto_nlist(SUM_SYMBOL, (char *) &vmem, sizeof(vmem)); -+ auto_nlist(BUFSPACE_SYMBOL, (char *) &bufspace, sizeof(bufspace)); - #ifndef freebsd4 - pagesize = 1024; - #else -@@ -75,7 +76,7 @@ - if (!mem->descr) - mem->descr = strdup("Physical memory"); - mem->units = pagesize; -- mem->size = user_mem/pagesize; -+ mem->size = phys_mem/pagesize; - mem->free = total.t_free; - } - -@@ -134,6 +135,17 @@ - mem->free = vmem.v_cache_max - vmem.v_cache_count; - } - -+ mem = netsnmp_memory_get_byIdx( NETSNMP_MEM_TYPE_MBUF, 1 ); -+ if (!mem) { -+ snmp_log_perror("No Memory Buffer info entry"); -+ } else { -+ if (!mem->descr) -+ mem->descr = strdup("Memory Buffer"); -+ mem->units = pagesize; -+ mem->size = bufspace/pagesize; -+ mem->free = -1; -+ } -+ - nswap = swapmode(pagesize); - mem = netsnmp_memory_get_byIdx( NETSNMP_MEM_TYPE_SWAP, 1 ); - if (!mem) { diff --git a/net-mgmt/net-snmp-devel/files/patch-mib.c b/net-mgmt/net-snmp-devel/files/patch-mib.c deleted file mode 100644 index af73abff4101..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-mib.c +++ /dev/null @@ -1,12 +0,0 @@ ---- snmplib/mib.c.orig Tue Jan 25 10:01:11 2005 -+++ snmplib/mib.c Tue Jan 25 10:02:02 2005 -@@ -75,6 +75,9 @@ - #include <winsock.h> - #endif - -+#if HAVE_UNISTD_H -+#include <unistd.h> -+#endif - #if HAVE_DMALLOC_H - #include <dmalloc.h> - #endif diff --git a/net-mgmt/net-snmp-devel/files/patch-net-snmp-config.h.in b/net-mgmt/net-snmp-devel/files/patch-net-snmp-config.h.in deleted file mode 100644 index 98de6015f10f..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-net-snmp-config.h.in +++ /dev/null @@ -1,20 +0,0 @@ ---- include/net-snmp/net-snmp-config.h.in.orig 2008-07-28 20:41:40.000000000 +0900 -+++ include/net-snmp/net-snmp-config.h.in 2009-01-25 22:15:35.000000000 +0900 -@@ -126,7 +126,7 @@ - #undef STRUCT_SIGACTION_HAS_SA_SIGACTION - - /* Does struct tm have a tm_gmtoff field? */ --#undef STRUCT_TM_HAS_TM_GMTOFFF -+#undef STRUCT_TM_HAS_TM_GMTOFF - - /* Does struct sockaddr have a sa_len field? */ - #undef STRUCT_SOCKADDR_HAS_SA_LEN -@@ -1564,7 +1564,7 @@ - - #define NETSNMP_EXCACHETIME 30 - #define NETSNMP_CACHEFILE ".snmp-exec-cache" --#define NETSNMP_MAXCACHESIZE (200*80) /* roughly 200 lines max */ -+#define NETSNMP_MAXCACHESIZE (1500*80) /* roughly 1500 lines max */ - - /* misc defaults */ - diff --git a/net-mgmt/net-snmp-devel/files/patch-net-snmp-includes.h b/net-mgmt/net-snmp-devel/files/patch-net-snmp-includes.h deleted file mode 100644 index cfb1dd29e981..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-net-snmp-includes.h +++ /dev/null @@ -1,13 +0,0 @@ ---- include/net-snmp/net-snmp-includes.h.orig Mon Jan 24 08:24:47 2005 -+++ include/net-snmp/net-snmp-includes.h Mon Jan 24 08:25:11 2005 -@@ -49,6 +49,10 @@ - # endif - #endif - -+#if HAVE_UNISTD_H -+#include <unistd.h> -+#endif -+ - /* - * Must be right after system headers, but before library code for best usage - */ diff --git a/net-mgmt/net-snmp-devel/files/patch-parse.c b/net-mgmt/net-snmp-devel/files/patch-parse.c deleted file mode 100644 index 63eb1e023f19..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-parse.c +++ /dev/null @@ -1,12 +0,0 @@ ---- snmplib/parse.c.orig Tue Jan 25 10:04:35 2005 -+++ snmplib/parse.c Tue Jan 25 10:05:02 2005 -@@ -106,6 +106,9 @@ - #if defined(HAVE_REGEX_H) && defined(HAVE_REGCOMP) - #include <regex.h> - #endif -+#if HAVE_UNISTD_H -+#include <unistd.h> -+#endif - #if HAVE_DMALLOC_H - #include <dmalloc.h> - #endif diff --git a/net-mgmt/net-snmp-devel/files/patch-scapi.c b/net-mgmt/net-snmp-devel/files/patch-scapi.c deleted file mode 100644 index 2d6711989e35..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-scapi.c +++ /dev/null @@ -1,12 +0,0 @@ ---- snmplib/scapi.c.orig Tue Jan 25 10:18:44 2005 -+++ snmplib/scapi.c Tue Jan 25 10:19:01 2005 -@@ -46,6 +46,9 @@ - #include <netinet/in.h> - #endif - -+#if HAVE_UNISTD_H -+#include <unistd.h> -+#endif - #if HAVE_DMALLOC_H - #include <dmalloc.h> - #endif diff --git a/net-mgmt/net-snmp-devel/files/patch-sctpAssocTable.c b/net-mgmt/net-snmp-devel/files/patch-sctpAssocTable.c deleted file mode 100644 index cbcfaffba6c0..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-sctpAssocTable.c +++ /dev/null @@ -1,10 +0,0 @@ ---- agent/mibgroup/sctp-mib/sctpAssocTable.c.orig 2009-03-07 23:12:27.000000000 +0900 -+++ agent/mibgroup/sctp-mib/sctpAssocTable.c 2009-03-07 23:12:37.000000000 +0900 -@@ -6,7 +6,6 @@ - #include <net-snmp/net-snmp-config.h> - #include <net-snmp/net-snmp-includes.h> - #include <net-snmp/agent/net-snmp-agent-includes.h> --#include <net-snmp/agent/net-snmp-agent-includes.h> - #include <net-snmp/agent/table_container.h> - #include "sctpAssocTable.h" - diff --git a/net-mgmt/net-snmp-devel/files/patch-sctpLookupLocalPortTable.c b/net-mgmt/net-snmp-devel/files/patch-sctpLookupLocalPortTable.c deleted file mode 100644 index 9e192849fc54..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-sctpLookupLocalPortTable.c +++ /dev/null @@ -1,10 +0,0 @@ ---- agent/mibgroup/sctp-mib/sctpLookupLocalPortTable.c.orig 2009-03-07 23:14:02.000000000 +0900 -+++ agent/mibgroup/sctp-mib/sctpLookupLocalPortTable.c 2009-03-07 23:14:09.000000000 +0900 -@@ -6,7 +6,6 @@ - #include <net-snmp/net-snmp-config.h> - #include <net-snmp/net-snmp-includes.h> - #include <net-snmp/agent/net-snmp-agent-includes.h> --#include <net-snmp/agent/net-snmp-agent-includes.h> - #include <net-snmp/agent/table_container.h> - #include "sctpLookupLocalPortTable.h" - diff --git a/net-mgmt/net-snmp-devel/files/patch-sctpScalars.h b/net-mgmt/net-snmp-devel/files/patch-sctpScalars.h deleted file mode 100644 index 036dff4a28b8..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-sctpScalars.h +++ /dev/null @@ -1,11 +0,0 @@ ---- agent/mibgroup/sctp-mib/sctpScalars.h.orig 2009-01-23 23:43:37.000000000 +0900 -+++ agent/mibgroup/sctp-mib/sctpScalars.h 2009-01-23 23:44:12.000000000 +0900 -@@ -7,6 +7,8 @@ - config_require(sctp-mib/sctpScalars_common) - #if defined( linux ) - config_require(sctp-mib/sctpScalars_linux) -+#elif defined ( freebsd7 ) -+config_require(sctp-mib/sctpScalars_freebsd) - #else - /* - * couldn't determine the correct file! diff --git a/net-mgmt/net-snmp-devel/files/patch-sctpScalars_freebsd.c b/net-mgmt/net-snmp-devel/files/patch-sctpScalars_freebsd.c deleted file mode 100644 index 2f187705d29b..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-sctpScalars_freebsd.c +++ /dev/null @@ -1,106 +0,0 @@ ---- agent/mibgroup/sctp-mib/sctpScalars_freebsd.c.orig 1970-01-01 09:00:00.000000000 +0900 -+++ agent/mibgroup/sctp-mib/sctpScalars_freebsd.c 2009-01-23 23:49:22.000000000 +0900 -@@ -0,0 +1,103 @@ -+#include <net-snmp/net-snmp-config.h> -+#include <net-snmp/net-snmp-includes.h> -+#include <net-snmp/agent/net-snmp-agent-includes.h> -+ -+#include "sctpScalars_common.h" -+ -+#include <stdio.h> -+#include <errno.h> -+#include <stdlib.h> -+#include <unistd.h> -+#include <sys/types.h> -+#include <sys/sysctl.h> -+#include <stdint.h> -+#include <sys/socket.h> -+#include <netinet/in.h> -+#include <netinet/sctp.h> -+#include <netinet/sctp_constants.h> -+ -+#define PROC_PREFIX "/proc" -+#define PROC_RTO_MIN PROC_PREFIX "/sys/net/sctp/rto_min" -+#define PROC_RTO_MAX PROC_PREFIX "/sys/net/sctp/rto_max" -+#define PROC_RTO_INITIAL PROC_PREFIX "/sys/net/sctp/rto_initial" -+#define PROC_VAL_COOKIE_LIFE PROC_PREFIX "/sys/net/sctp/valid_cookie_life" -+#define PROC_MAX_INIT_RETR PROC_PREFIX "/sys/net/sctp/max_init_retransmits" -+#define PROC_STATS PROC_PREFIX "/net/sctp/snmp" -+ -+void -+netsnmp_access_sctp_stats_arch_init() -+{ -+} -+ -+int -+netsnmp_access_sctp_stats_arch_load(netsnmp_sctp_stats * sctp_stats) -+{ -+ struct sctpstat stat; -+ size_t len = sizeof(struct sctpstat); -+ -+ if (sysctlbyname("net.inet.sctp.stats", &stat, &len, NULL, 0) < 0) { -+ return(-1); -+ } -+ memset(sctp_stats, 0, sizeof(netsnmp_sctp_stats)); -+ sctp_stats->curr_estab = stat.sctps_currestab; -+ sctp_stats->active_estabs = stat.sctps_activeestab; -+ sctp_stats->passive_estabs = stat.sctps_passiveestab; -+ sctp_stats->aborteds = stat.sctps_aborted; -+ sctp_stats->shutdowns = stat.sctps_shutdown; -+ sctp_stats->out_of_blues = stat.sctps_outoftheblue; -+ sctp_stats->checksum_errors = stat.sctps_checksumerrors; -+ sctp_stats->out_ctrl_chunks.low = stat.sctps_outcontrolchunks; -+ sctp_stats->out_order_chunks.low = stat.sctps_outorderchunks; -+ sctp_stats->out_unorder_chunks.low = stat.sctps_outunorderchunks; -+ sctp_stats->in_ctrl_chunks.low = stat.sctps_incontrolchunks; -+ sctp_stats->in_order_chunks.low = stat.sctps_inorderchunks; -+ sctp_stats->in_unorder_chunks.low = stat.sctps_inunorderchunks; -+ sctp_stats->frag_usr_msgs.low = stat.sctps_fragusrmsgs; -+ sctp_stats->reasm_usr_msgs.low = stat.sctps_reasmusrmsgs; -+ sctp_stats->out_sctp_packs.low = stat.sctps_outpackets; -+ sctp_stats->in_sctp_packs.low = stat.sctps_inpackets; -+ sctp_stats->discontinuity_time = 0; -+ return 0; -+} -+ -+void -+netsnmp_access_sctp_params_arch_init() -+{ -+} -+ -+int -+netsnmp_access_sctp_params_arch_load(netsnmp_sctp_params * sctp_params) -+{ -+ int ret; -+ size_t len = sizeof(uint32_t); -+ unsigned int cnt = 0; -+ -+ sctp_params->rto_algorithm = NETSNMP_SCTP_ALGORITHM_VANJ; -+ sctp_params->max_assocs = SCTP_MAX_NUM_OF_ASOC; -+ if (sysctlbyname("net.inet.sctp.rto_max", -+ &sctp_params->rto_max, -+ &len, NULL, 0) < 0) { -+ return(-1); -+ } -+ if (sysctlbyname("net.inet.sctp.rto_min", -+ &sctp_params->rto_min, -+ &len, NULL, 0) < 0) { -+ return(-1); -+ } -+ if (sysctlbyname("net.inet.sctp.rto_initial", -+ &sctp_params->rto_initial, -+ &len, NULL, 0) < 0) { -+ return(-1); -+ } -+ if (sysctlbyname("net.inet.sctp.valid_cookie_life", -+ &sctp_params->val_cookie_life, -+ &len, NULL, 0) < 0) { -+ return(-1); -+ } -+ if (sysctlbyname("net.inet.sctp.init_rtx_max", -+ &sctp_params->max_init_retr, -+ &len, NULL, 0) < 0) { -+ return(-1); -+ } -+ return 0; -+} diff --git a/net-mgmt/net-snmp-devel/files/patch-sctpTables.h b/net-mgmt/net-snmp-devel/files/patch-sctpTables.h deleted file mode 100644 index 50d48e431b5d..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-sctpTables.h +++ /dev/null @@ -1,11 +0,0 @@ ---- agent/mibgroup/sctp-mib/sctpTables.h.orig 2009-01-23 23:46:39.000000000 +0900 -+++ agent/mibgroup/sctp-mib/sctpTables.h 2009-01-23 23:47:35.000000000 +0900 -@@ -14,6 +14,8 @@ - config_require(sctp-mib/sctpAssocTable) - #if defined( linux ) - config_require(sctp-mib/sctpTables_linux) -+#elif defined( freebsd7 ) -+config_require(sctp-mib/sctpTables_freebsd) - #else - /* - * couldn't determine the correct file! diff --git a/net-mgmt/net-snmp-devel/files/patch-sctpTables_common.c b/net-mgmt/net-snmp-devel/files/patch-sctpTables_common.c deleted file mode 100644 index 9047ca289e2a..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-sctpTables_common.c +++ /dev/null @@ -1,9 +0,0 @@ ---- agent/mibgroup/sctp-mib/sctpTables_common.c.orig 2009-03-07 23:32:28.000000000 +0900 -+++ agent/mibgroup/sctp-mib/sctpTables_common.c 2009-03-07 23:33:09.000000000 +0900 -@@ -1,3 +1,6 @@ -+#include <net-snmp/net-snmp-config.h> -+#include <net-snmp/net-snmp-includes.h> -+#include <net-snmp/agent/net-snmp-agent-includes.h> - #include "sctpTables_common.h" - #include "sctpAssocTable.h" - #include "sctpAssocRemAddrTable.h" diff --git a/net-mgmt/net-snmp-devel/files/patch-sctpTables_common.h b/net-mgmt/net-snmp-devel/files/patch-sctpTables_common.h deleted file mode 100644 index b9152bea0544..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-sctpTables_common.h +++ /dev/null @@ -1,15 +0,0 @@ ---- agent/mibgroup/sctp-mib/sctpTables_common.h.orig 2008-08-18 06:29:11.000000000 +0900 -+++ agent/mibgroup/sctp-mib/sctpTables_common.h 2009-02-28 14:06:27.000000000 +0900 -@@ -1,9 +1,9 @@ - #ifndef SCTP_TABLES_COMMON_H - #define SCTP_TABLES_COMMON_H - --#include <net-snmp/net-snmp-config.h> --#include <net-snmp/net-snmp-includes.h> --#include <net-snmp/agent/net-snmp-agent-includes.h> -+#if defined(freebsd7) -+#define netsnmp_table_registration_info_free SNMP_FREE -+#endif - - #define SCTP_IPADDRESS_SIZE 16 - #define SCTP_HOSTNAME_SIZE 255 diff --git a/net-mgmt/net-snmp-devel/files/patch-sctpTables_freebsd.c b/net-mgmt/net-snmp-devel/files/patch-sctpTables_freebsd.c deleted file mode 100644 index 22d898f6b7d3..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-sctpTables_freebsd.c +++ /dev/null @@ -1,252 +0,0 @@ ---- agent/mibgroup/sctp-mib/sctpTables_freebsd.c.orig 2009-03-07 23:31:54.000000000 +0900 -+++ agent/mibgroup/sctp-mib/sctpTables_freebsd.c 2009-03-07 23:55:04.000000000 +0900 -@@ -0,0 +1,249 @@ -+#include <net-snmp/net-snmp-config.h> -+#include <net-snmp/net-snmp-includes.h> -+#include <net-snmp/agent/net-snmp-agent-includes.h> -+ -+#include "sctpAssocTable.h" -+#include "sctpAssocLocalAddrTable.h" -+#include "sctpAssocRemAddrTable.h" -+#include "sctpTables_common.h" -+ -+#include <util_funcs.h> -+ -+#include <stdio.h> -+#include <errno.h> -+#include <stdlib.h> -+#include <unistd.h> -+#include <sys/types.h> -+#include <sys/sysctl.h> -+#include <stdint.h> -+#include <sys/socket.h> -+#include <netinet/in.h> -+#include <netinet/sctp.h> -+#include <netinet/sctp_constants.h> -+ -+ -+static int -+parse_assoc_local_addresses(sctpTables_containers * containers, -+ struct xsctp_laddr *xladdr) -+{ -+ int ret; -+ sctpAssocLocalAddrTable_entry *entry; -+ entry = sctpAssocLocalAddrTable_entry_create(); -+ if (entry == NULL) -+ return SNMP_ERR_GENERR; -+ -+ entry->sctpAssocId = 0; -+ if (xladdr->address.sa.sa_family == AF_INET) { -+ entry->sctpAssocLocalAddrType = INETADDRESSTYPE_IPV4; -+ entry->sctpAssocLocalAddr_len = 4; -+ memcpy(entry->sctpAssocLocalAddr, -+ &xladdr->address.sin.sin_addr, -+ entry->sctpAssocLocalAddr_len); -+ } else if (xladdr->address.sa.sa_family == AF_INET6) { -+ entry->sctpAssocLocalAddrType = INETADDRESSTYPE_IPV6; -+ entry->sctpAssocLocalAddr_len = 16; -+ memcpy(entry->sctpAssocLocalAddr, -+ &xladdr->address.sin6.sin6_addr, -+ entry->sctpAssocLocalAddr_len); -+ } -+ entry->sctpAssocLocalAddrStartTime = xladdr->start_time.tv_sec; -+ ret = sctpAssocLocalAddrTable_add_or_update(containers->sctpAssocLocalAddrTable, -+ entry); -+ if (ret != SNMP_ERR_NOERROR) -+ return SNMP_ERR_GENERR; -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+static int -+parse_assoc_xstcb(sctpTables_containers * containers, struct xsctp_tcb *xstcb) -+{ -+ long inode; -+ char *token; -+ int ret; -+ sctpAssocTable_entry *entry; -+ -+ entry = sctpAssocTable_entry_create(); -+ if (entry == NULL) -+ return SNMP_ERR_GENERR; -+ -+ switch (xstcb->state) { -+ case SCTP_STATE_INUSE: -+ entry->sctpAssocState = SCTPASSOCSTATE_DELETETCB; -+ break; -+ case SCTP_STATE_COOKIE_WAIT: -+ entry->sctpAssocState = SCTPASSOCSTATE_COOKIEWAIT; -+ break; -+ case SCTP_STATE_COOKIE_ECHOED: -+ entry->sctpAssocState = SCTPASSOCSTATE_COOKIEECHOED; -+ break; -+ case SCTP_STATE_OPEN: -+ entry->sctpAssocState = SCTPASSOCSTATE_ESTABLISHED; -+ break; -+ case SCTP_STATE_SHUTDOWN_SENT: -+ entry->sctpAssocState = SCTPASSOCSTATE_SHUTDOWNSENT; -+ break; -+ case SCTP_STATE_SHUTDOWN_RECEIVED: -+ entry->sctpAssocState = SCTPASSOCSTATE_SHUTDOWNRECEIVED; -+ break; -+ case SCTP_STATE_SHUTDOWN_ACK_SENT: -+ entry->sctpAssocState = SCTPASSOCSTATE_SHUTDOWNACKSENT; -+ break; -+ default: -+ case SCTP_STATE_EMPTY: -+ entry->sctpAssocState = SCTPASSOCSTATE_CLOSED; -+ break; -+ }; -+ entry->sctpAssocHeartBeatInterval = xstcb->heartbeat_interval; -+ entry->sctpAssocId = 0; -+ entry->sctpAssocPrimProcess = xstcb->primary_process; -+ entry->sctpAssocLocalPort = xstcb->local_port; -+ entry->sctpAssocRemPort = xstcb->remote_port; -+ entry->sctpAssocHeartBeatInterval = xstcb->heartbeat_interval; -+ entry->sctpAssocInStreams = xstcb->in_streams; -+ entry->sctpAssocOutStreams = xstcb->out_streams; -+ entry->sctpAssocMaxRetr = xstcb->max_nr_retrans; -+ entry->sctpAssocT1expireds = xstcb->T1_expireries; -+ entry->sctpAssocRtxChunks = xstcb->retransmitted_tsns; -+ entry->sctpAssocT2expireds = xstcb->T2_expireries; -+ entry->sctpAssocRemHostName[0] = 0; -+ entry->sctpAssocRemHostName_len = 0; -+ entry->sctpAssocDiscontinuityTime = xstcb->discontinuity_time.tv_sec; -+ entry->sctpAssocStartTime = xstcb->start_time.tv_sec; -+ -+ ret = sctpAssocTable_add_or_update(containers->sctpAssocTable, entry); -+ if (ret != SNMP_ERR_NOERROR) { -+ return ret; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+ -+static int -+parse_remaddr_xraddr(sctpTables_containers * containers, -+ struct xsctp_raddr *xraddr) -+{ -+ char *token; -+ int ret; -+ sctpAssocRemAddrTable_entry *entry; -+ -+ entry = sctpAssocRemAddrTable_entry_create(); -+ if (entry == NULL) -+ return SNMP_ERR_GENERR; -+ -+ -+ entry->sctpAssocId = 0; -+ -+ if(xraddr->active) -+ entry->sctpAssocRemAddrActive = TRUTHVALUE_TRUE; -+ else -+ entry->sctpAssocRemAddrActive = TRUTHVALUE_FALSE; -+ -+ if (xraddr->heartbeat_enabled) -+ entry->sctpAssocRemAddrHBActive = TRUTHVALUE_TRUE; -+ else -+ entry->sctpAssocRemAddrHBActive = TRUTHVALUE_FALSE; -+ -+ entry->sctpAssocRemAddrRTO = xraddr->rto; -+ entry->sctpAssocRemAddrMaxPathRtx = xraddr->max_path_rtx; -+ entry->sctpAssocRemAddrRtx = xraddr->rtx; -+ entry->sctpAssocRemAddrStartTime = xraddr->start_time.tv_sec; -+ -+ if (xraddr->address.sa.sa_family == AF_INET) { -+ entry->sctpAssocRemAddrType = INETADDRESSTYPE_IPV4; -+ entry->sctpAssocRemAddr_len = 4; -+ memcpy(entry->sctpAssocRemAddr, -+ &xraddr->address.sin.sin_addr, -+ entry->sctpAssocRemAddr_len); -+ } else if (xraddr->address.sa.sa_family == AF_INET6) { -+ entry->sctpAssocRemAddrType = INETADDRESSTYPE_IPV6; -+ entry->sctpAssocRemAddr_len = 16; -+ memcpy(entry->sctpAssocRemAddr, -+ &xraddr->address.sin6.sin6_addr, -+ entry->sctpAssocRemAddr_len); -+ } -+ ret = -+ sctpAssocRemAddrTable_add_or_update(containers-> -+ sctpAssocRemAddrTable, entry); -+ if (ret != SNMP_ERR_NOERROR) { -+ return ret; -+ } -+ return SNMP_ERR_NOERROR; -+} -+ -+ -+int -+sctpTables_arch_load(sctpTables_containers * containers, u_long * flags) -+{ -+ int ret = SNMP_ERR_NOERROR; -+ size_t len; -+ caddr_t buf; -+ unsigned int offset; -+ struct xsctp_inpcb *xinp; -+ struct xsctp_tcb *xstcb; -+ struct xsctp_laddr *xladdr; -+ struct xsctp_raddr *xraddr; -+ sa_family_t family; -+ void *addr; -+ -+ -+ *flags |= SCTP_TABLES_LOAD_FLAG_DELETE_INVALID; -+ *flags |= SCTP_TABLES_LOAD_FLAG_AUTO_LOOKUP; -+ len = 0; -+ if (sysctlbyname("net.inet.sctp.assoclist", 0, &len, 0, 0) < 0) { -+ printf("Error %d (%s) could not get the assoclist\n", errno, strerror(errno)); -+ return(-1); -+ } -+ if ((buf = (caddr_t)malloc(len)) == 0) { -+ printf("malloc %lu bytes failed.\n", (long unsigned)len); -+ return(-1); -+ } -+ if (sysctlbyname("net.inet.sctp.assoclist", buf, &len, 0, 0) < 0) { -+ printf("Error %d (%s) could not get the assoclist\n", errno, strerror(errno)); -+ free(buf); -+ return(-1); -+ } -+ offset = 0; -+ xinp = (struct xsctp_inpcb *)(buf + offset); -+ while (xinp->last == 0) { -+ /* for each INP */ -+ offset += sizeof(struct xsctp_inpcb); -+ /* Local addresses */ -+ xladdr = (struct xsctp_laddr *)(buf + offset); -+ while (xladdr->last == 0) { -+ offset += sizeof(struct xsctp_laddr); -+ xladdr = (struct xsctp_laddr *)(buf + offset); -+ } -+ offset += sizeof(struct xsctp_laddr); -+ /* Associations */ -+ xstcb = (struct xsctp_tcb *)(buf + offset); -+ while (xstcb->last == 0) { -+ xstcb = (struct xsctp_tcb *)(buf + offset); -+ offset += sizeof(struct xsctp_tcb); -+ parse_assoc_xstcb(containers, xstcb); -+ /* Local addresses */ -+ xladdr = (struct xsctp_laddr *)(buf + offset); -+ while (xladdr->last == 0) { -+ parse_assoc_local_addresses(containers, xladdr); -+ offset += sizeof(struct xsctp_laddr); -+ xladdr = (struct xsctp_laddr *)(buf + offset); -+ } -+ offset += sizeof(struct xsctp_laddr); -+ -+ /* Remote addresses */ -+ xraddr = (struct xsctp_raddr *)(buf + offset); -+ while (xraddr->last == 0) { -+ parse_remaddr_xraddr(containers, xraddr); -+ offset += sizeof(struct xsctp_raddr); -+ xraddr = (struct xsctp_raddr *)(buf + offset); -+ } -+ offset += sizeof(struct xsctp_raddr); -+ xstcb = (struct xsctp_tcb *)(buf + offset); -+ } -+ offset += sizeof(struct xsctp_tcb); -+ xinp = (struct xsctp_inpcb *)(buf + offset); -+ } -+ free((void *)buf); -+ return ret; -+} diff --git a/net-mgmt/net-snmp-devel/files/patch-snmpTCPIPv6Domain.c b/net-mgmt/net-snmp-devel/files/patch-snmpTCPIPv6Domain.c deleted file mode 100644 index 44c26b86d08c..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-snmpTCPIPv6Domain.c +++ /dev/null @@ -1,31 +0,0 @@ ---- snmplib/snmpTCPIPv6Domain.c.orig 2008-06-17 17:57:14.000000000 +0900 -+++ snmplib/snmpTCPIPv6Domain.c 2008-11-14 21:34:12.000000000 +0900 -@@ -96,12 +96,23 @@ - if (to == NULL) { - return strdup("TCP/IPv6: unknown"); - } else { -- char addr[INET6_ADDRSTRLEN]; -- char tmp[INET6_ADDRSTRLEN + 18]; -+ char addr[NI_MAXHOST], tmp[NI_MAXHOST + NI_MAXSERV + 12]; - -- sprintf(tmp, "TCP/IPv6: [%s]:%hd", -- inet_ntop(AF_INET6, (void *) &(to->sin6_addr), addr, -- INET6_ADDRSTRLEN), ntohs(to->sin6_port)); -+/* -+ * NI_WITHSCOPEID will be obsoleted. But some implementations require -+ * this flag to retrieve scoped name. -+ * (2002-07-25: kuriyama@FreeBSD.org) -+ */ -+#ifndef NI_WITHSCOPEID -+#define NI_WITHSCOPEID 0 -+#endif -+ if (getnameinfo((struct sockaddr *)to, sizeof(struct sockaddr_in6), -+ addr, sizeof(addr), NULL, 0, -+ NI_NUMERICHOST | NI_WITHSCOPEID)) { -+ return strdup("UDP/IPv6: unknown"); -+ } -+ snprintf(tmp, sizeof(tmp), "TCP/IPv6: [%s]:%hd", addr, -+ ntohs(to->sin6_port)); - return strdup(tmp); - } - } diff --git a/net-mgmt/net-snmp-devel/files/patch-snmpUCDIPv6Domain.c b/net-mgmt/net-snmp-devel/files/patch-snmpUCDIPv6Domain.c deleted file mode 100644 index 62ceec96c330..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-snmpUCDIPv6Domain.c +++ /dev/null @@ -1,31 +0,0 @@ ---- snmplib/snmpUDPIPv6Domain.c.orig 2007-09-29 22:10:22.000000000 +0900 -+++ snmplib/snmpUDPIPv6Domain.c 2008-11-14 21:36:45.000000000 +0900 -@@ -109,12 +109,22 @@ - if (to == NULL) { - return strdup("UDP/IPv6: unknown"); - } else { -- char addr[INET6_ADDRSTRLEN]; -- char tmp[INET6_ADDRSTRLEN + 18]; -- -- sprintf(tmp, "UDP/IPv6: [%s]:%hu", -- inet_ntop(AF_INET6, (void *) &(to->sin6_addr), addr, -- INET6_ADDRSTRLEN), ntohs(to->sin6_port)); -+ char addr[NI_MAXHOST], tmp[NI_MAXHOST + NI_MAXSERV + 12]; -+/* -+ * NI_WITHSCOPEID will be obsoleted. But some implementations require -+ * this flag to retrieve scoped name. -+ * (2002-07-25: kuriyama@FreeBSD.org) -+ */ -+#ifndef NI_WITHSCOPEID -+#define NI_WITHSCOPEID 0 -+#endif -+ if (getnameinfo((struct sockaddr *)to, sizeof(struct sockaddr_in6), -+ addr, sizeof(addr), NULL, 0, -+ NI_NUMERICHOST | NI_WITHSCOPEID)) { -+ return strdup("UDP/IPv6: unknown"); -+ } -+ snprintf(tmp, sizeof(tmp), "UDP/IPv6: [%s]:%hu", addr, -+ ntohs(to->sin6_port)); - return strdup(tmp); - } - } diff --git a/net-mgmt/net-snmp-devel/files/patch-snmp_agent.c b/net-mgmt/net-snmp-devel/files/patch-snmp_agent.c deleted file mode 100644 index 6428559eb68b..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-snmp_agent.c +++ /dev/null @@ -1,13 +0,0 @@ -Index: agent/snmp_agent.c -diff -u -p agent/snmp_agent.c.orig agent/snmp_agent.c ---- agent/snmp_agent.c.orig Thu Aug 16 22:31:40 2007 -+++ agent/snmp_agent.c Fri Jan 11 13:06:27 2008 -@@ -819,7 +819,7 @@ netsnmp_agent_check_packet(netsnmp_sessi - } - #ifdef USE_LIBWRAP - /* Catch udp,udp6,tcp,tcp6 transports using "[" */ -- tcpudpaddr = strstr(addr_string, "["); -+ tcpudpaddr = strrchr(addr_string, '['); - if ( tcpudpaddr != 0 ) { - char sbuf[64]; - char *xp; diff --git a/net-mgmt/net-snmp-devel/files/patch-snmp_auth.c b/net-mgmt/net-snmp-devel/files/patch-snmp_auth.c deleted file mode 100644 index be52a5e4fd36..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-snmp_auth.c +++ /dev/null @@ -1,12 +0,0 @@ ---- snmplib/snmp_auth.c.orig Tue Jan 25 10:08:14 2005 -+++ snmplib/snmp_auth.c Tue Jan 25 10:08:34 2005 -@@ -63,6 +63,9 @@ - #include <arpa/inet.h> - #endif - -+#if HAVE_UNISTD_H -+#include <unistd.h> -+#endif - #if HAVE_DMALLOC_H - #include <dmalloc.h> - #endif diff --git a/net-mgmt/net-snmp-devel/files/patch-snmp_debug.c b/net-mgmt/net-snmp-devel/files/patch-snmp_debug.c deleted file mode 100644 index 6b24b5354b77..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-snmp_debug.c +++ /dev/null @@ -1,12 +0,0 @@ ---- snmplib/snmp_debug.c.orig Tue Jan 25 10:10:49 2005 -+++ snmplib/snmp_debug.c Tue Jan 25 10:11:06 2005 -@@ -22,6 +22,9 @@ - #include <winsock.h> - #endif - -+#if HAVE_UNISTD_H -+#include <unistd.h> -+#endif - #if HAVE_DMALLOC_H - #include <dmalloc.h> - #endif diff --git a/net-mgmt/net-snmp-devel/files/patch-snmp_logging.c b/net-mgmt/net-snmp-devel/files/patch-snmp_logging.c deleted file mode 100644 index f66b33d0dd6e..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-snmp_logging.c +++ /dev/null @@ -1,12 +0,0 @@ ---- snmplib/snmp_logging.c.orig Tue Jan 25 10:14:41 2005 -+++ snmplib/snmp_logging.c Tue Jan 25 10:15:05 2005 -@@ -65,6 +65,9 @@ - #include <varargs.h> - #endif - -+#if HAVE_UNISTD_H -+#include <unistd.h> -+#endif - #if HAVE_DMALLOC_H - #include <dmalloc.h> - #endif diff --git a/net-mgmt/net-snmp-devel/files/patch-snmp_transport.c b/net-mgmt/net-snmp-devel/files/patch-snmp_transport.c deleted file mode 100644 index e1ae87834fe9..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-snmp_transport.c +++ /dev/null @@ -1,12 +0,0 @@ ---- snmplib/snmp_transport.c.orig Tue Jan 25 10:21:33 2005 -+++ snmplib/snmp_transport.c Tue Jan 25 10:21:52 2005 -@@ -12,6 +12,9 @@ - #include <stdlib.h> - #endif - -+#if HAVE_UNISTD_H -+#include <unistd.h> -+#endif - #if HAVE_DMALLOC_H - #include <dmalloc.h> - #endif diff --git a/net-mgmt/net-snmp-devel/files/patch-snmpd.c b/net-mgmt/net-snmp-devel/files/patch-snmpd.c deleted file mode 100644 index c7d6d4ed06c8..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-snmpd.c +++ /dev/null @@ -1,32 +0,0 @@ ---- agent/snmpd.c.orig 2009-01-25 17:25:26.000000000 +0900 -+++ agent/snmpd.c 2009-01-25 17:36:52.000000000 +0900 -@@ -426,6 +426,9 @@ - char *cptr, **argvptr; - char *pid_file = NULL; - char option_compatability[] = "-Le"; -+#if HAVE_UNISTD_H -+ const char *ccptr; -+#endif - #if HAVE_GETPID - int fd; - FILE *PID; -@@ -960,8 +963,8 @@ - #endif - - #if HAVE_UNISTD_H -- cptr = get_persistent_directory(); -- mkdirhier( cptr, NETSNMP_AGENT_DIRECTORY_MODE, 0 ); -+ ccptr = get_persistent_directory(); -+ mkdirhier( ccptr, NETSNMP_AGENT_DIRECTORY_MODE, 0 ); - - uid = netsnmp_ds_get_int(NETSNMP_DS_APPLICATION_ID, - NETSNMP_DS_AGENT_USERID); -@@ -970,7 +973,7 @@ - - #ifdef HAVE_CHOWN - if ( uid != 0 || gid != 0 ) -- chown( cptr, uid, gid ); -+ chown( ccptr, uid, gid ); - #endif - - #ifdef HAVE_SETGID diff --git a/net-mgmt/net-snmp-devel/files/patch-snmpusm.c b/net-mgmt/net-snmp-devel/files/patch-snmpusm.c deleted file mode 100644 index 4eae56c1a0f0..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-snmpusm.c +++ /dev/null @@ -1,21 +0,0 @@ ---- snmplib/snmpusm.c.orig Thu Sep 16 07:57:47 2004 -+++ snmplib/snmpusm.c Tue Jan 25 10:23:02 2005 -@@ -54,6 +54,9 @@ - #include <netinet/in.h> - #endif - -+#if HAVE_UNISTD_H -+#include <unistd.h> -+#endif - #if HAVE_DMALLOC_H - #include <dmalloc.h> - #endif -@@ -89,6 +92,8 @@ - oid usmAESPrivProtocol[10] = { 1, 3, 6, 1, 6, 3, 10, 1, 2, 4 }; - /* backwards compat */ - oid *usmAES128PrivProtocol = usmAESPrivProtocol; -+oid *usmAES192PrivProtocol = usmAESPrivProtocol; -+oid *usmAES256PrivProtocol = usmAESPrivProtocol; - - static u_int dummy_etime, dummy_eboot; /* For ISENGINEKNOWN(). */ - diff --git a/net-mgmt/net-snmp-devel/files/patch-tcpTable.c b/net-mgmt/net-snmp-devel/files/patch-tcpTable.c deleted file mode 100644 index d96d0976189b..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-tcpTable.c +++ /dev/null @@ -1,12 +0,0 @@ ---- agent/mibgroup/mibII/tcpTable.c.orig Wed Jun 9 05:53:17 2004 -+++ agent/mibgroup/mibII/tcpTable.c Thu Jun 24 23:21:32 2004 -@@ -275,6 +277,9 @@ - - int - TCP_Count_Connections( void ) { -+#if (defined(CAN_USE_SYSCTL) && defined(TCPCTL_PCBLIST)) -+ tcpTable_load(NULL, NULL); -+#endif - return tcp_estab; - } - diff --git a/net-mgmt/net-snmp-devel/files/patch-tools.c b/net-mgmt/net-snmp-devel/files/patch-tools.c deleted file mode 100644 index f24a401ec9e6..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-tools.c +++ /dev/null @@ -1,12 +0,0 @@ ---- snmplib/tools.c.orig Tue Jan 25 10:13:50 2005 -+++ snmplib/tools.c Tue Jan 25 10:14:06 2005 -@@ -44,6 +44,9 @@ - #include <arpa/inet.h> - #endif - -+#if HAVE_UNISTD_H -+#include <unistd.h> -+#endif - #if HAVE_DMALLOC_H - #include <dmalloc.h> - #endif diff --git a/net-mgmt/net-snmp-devel/files/patch-transform_oids.h b/net-mgmt/net-snmp-devel/files/patch-transform_oids.h deleted file mode 100644 index 674d4c1acb22..000000000000 --- a/net-mgmt/net-snmp-devel/files/patch-transform_oids.h +++ /dev/null @@ -1,11 +0,0 @@ ---- include/net-snmp/library/transform_oids.h.orig 2006-10-28 05:19:44.000000000 +0900 -+++ include/net-snmp/library/transform_oids.h 2008-03-26 07:50:45.393507729 +0900 -@@ -23,6 +23,8 @@ - /* XXX: OIDs not defined yet */ - NETSNMP_IMPORT oid usmAESPrivProtocol[10]; /* == { 1,3,6,1,6,3,10,1,2,4 }; */ - NETSNMP_IMPORT oid *usmAES128PrivProtocol; /* backwards compat */ -+NETSNMP_IMPORT oid *usmAES192PrivProtocol; /* backwards compat */ -+NETSNMP_IMPORT oid *usmAES256PrivProtocol; /* backwards compat */ - - #define USM_AUTH_PROTO_NOAUTH_LEN 10 - #define USM_AUTH_PROTO_MD5_LEN 10 diff --git a/net-mgmt/net-snmp-devel/files/snmpd.sh.in b/net-mgmt/net-snmp-devel/files/snmpd.sh.in deleted file mode 100644 index 0af14f41a7b0..000000000000 --- a/net-mgmt/net-snmp-devel/files/snmpd.sh.in +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/sh -# -# $FreeBSD: /tmp/pcvs/ports/net-mgmt/net-snmp-devel/files/Attic/snmpd.sh.in,v 1.7 2007-10-27 07:20:34 kuriyama Exp $ -# -# PROVIDE: snmpd -# REQUIRE: DAEMON -# -# Add the following line to /etc/rc.conf to enable snmpd: -# -# snmpd_enable="YES" -# - -snmpd_enable=${snmpd_enable-"NO"} -snmpd_flags=${snmpd_flags-""} -snmpd_pidfile=${snmpd_pidfile-"/var/run/snmpd.pid"} -snmpd_conffile=${snmpd_conffile-""} -snmpd_flush_cache=${snmpd_flush_cache-"NO"} - -. %%RC_SUBR%% - -load_rc_config net_snmpd - -if [ ! -z "$net_snmpd_enable" ]; then - echo "Warning: \$net_snmpd_enable is obsoleted." - echo " Use \$snmpd_enable instead." - snmpd_enable="$net_snmpd_enable" - [ ! -z "$net_snmpd_flags" ] && snmpd_flags="$net_snmpd_flags" -fi - -name=snmpd -rcvar=`set_rcvar` - -command=%%PREFIX%%/sbin/${name} -pidfile=${snmpd_pidfile} -start_precmd=snmpd_precmd - -load_rc_config ${name} - -snmpd_precmd () { - if checkyesno snmpd_flush_cache; then - rm -vf /var/net-snmp/.snmp-exec-cache - fi -} - -case "${snmpd_flags}" in -*-p\ *) - echo "Warning: \$snmpd_flags includes -p option." \ - "Please use \$snmpd_pidfile instead." - ;; -*) - snmpd_flags="-p ${snmpd_pidfile} ${snmpd_flags}" - ;; -esac - -for conffile in ${snmpd_conffile}; do - if [ ! -z ${conffile} -a -f ${conffile} ]; then - if [ -z ${snmpd_conffile_set} ]; then - snmpd_conffile_set="${conffile}" - else - snmpd_conffile_set="${snmpd_conffile_set},${conffile}" - fi - else - echo "snmpd configuration file $conffile not set or not found." - exit 1 - fi -done - -case "${snmpd_flags}" in -*-c\ *) - echo "Warning: \$snmpd_flags includes -c option." \ - "Please use \$snmpd_conffile instead." - ;; -*) - if [ ! -z "${snmpd_conffile_set}" ]; then - snmpd_flags="-c ${snmpd_conffile_set} ${snmpd_flags}" - fi - ;; -esac - -run_rc_command "$1" diff --git a/net-mgmt/net-snmp-devel/files/snmptrapd.sh.in b/net-mgmt/net-snmp-devel/files/snmptrapd.sh.in deleted file mode 100644 index 33c3b2a44551..000000000000 --- a/net-mgmt/net-snmp-devel/files/snmptrapd.sh.in +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -# -# $FreeBSD: /tmp/pcvs/ports/net-mgmt/net-snmp-devel/files/Attic/snmptrapd.sh.in,v 1.1 2006-05-08 05:00:27 clsung Exp $ -# -# PROVIDE: snmptrapd -# REQUIRE: DAEMON -# -# Add the following line to /etc/rc.conf to enable snmptrapd: -# -# snmptrapd_enable="YES" -# - -snmptrapd_enable=${snmptrapd_enable-"NO"} -snmptrapd_flags=${snmptrapd_flags-"-p /var/run/snmptrapd.pid"} - -. %%RC_SUBR%% - -load_rc_config net_snmptrapd - -if [ ! -z "$net_snmptrapd_enable" ]; then - echo "Warning: \$net_snmptrapd_enable is obsoleted." - echo " Use \$snmptrapd_enable instead." - snmptrapd_enable="$net_snmptrapd_enable" - [ ! -z "$net_snmptrapd_flags" ] && snmptrapd_flags="$net_snmptrapd_flags" -fi - -name=snmptrapd -rcvar=`set_rcvar` - -command=%%PREFIX%%/sbin/${name} -pidfile=/var/run/${name}.pid - -load_rc_config ${name} -run_rc_command "$1" diff --git a/net-mgmt/net-snmp-devel/files/test.t b/net-mgmt/net-snmp-devel/files/test.t deleted file mode 100644 index cca9d9ed4191..000000000000 --- a/net-mgmt/net-snmp-devel/files/test.t +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/perl -w -# -# $FreeBSD$ - -use strict; -use Test::More tests => 1; - -my $cmd = 'snmpwalk -c public -v 1 localhost'; - -# ports/86572 -my $output = `$cmd hrSWRunType`; -like($output, qr/operatingSystem/, 'hrSWRunType'); diff --git a/net-mgmt/net-snmp-devel/pkg-descr b/net-mgmt/net-snmp-devel/pkg-descr deleted file mode 100644 index d1fc04717b8e..000000000000 --- a/net-mgmt/net-snmp-devel/pkg-descr +++ /dev/null @@ -1,12 +0,0 @@ -This is Net-SNMP (previously known as "ucd-snmp"). - -Various tools relating to the Simple Network Management Protocol including: - - An extensible agent - An SNMP library - tools to request or set information from SNMP agents - tools to generate and handle SNMP traps - a version of the unix 'netstat' command using SNMP - a graphical Perl/Tk/SNMP based mib browser - -WWW: http://net-snmp.sourceforge.net/ diff --git a/net-mgmt/net-snmp-devel/pkg-message b/net-mgmt/net-snmp-devel/pkg-message deleted file mode 100644 index 203b8a6b6ed6..000000000000 --- a/net-mgmt/net-snmp-devel/pkg-message +++ /dev/null @@ -1,27 +0,0 @@ -**** This port installs snmp daemon, header files and libraries but don't - invokes snmpd by default. - If you want to invoke snmpd and/or snmptrapd at startup, put these - lines into /etc/rc.conf. - - snmpd_enable="YES" - snmpd_flags="-a" - snmpd_conffile="/usr/local/share/snmpd.conf /etc/snmpd.conf" - snmptrapd_enable="YES" - snmptrapd_flags="-a -p /var/run/snmptrapd.pid" - -**** You may specify the following make variables: - - NET_SNMP_SYS_CONTACT="kuriyama@FreeBSD.org" - NET_SNMP_SYS_LOCATION="Tokyo, Japan" - DEFAULT_SNMP_VERSION=3 - NET_SNMP_MIB_MODULES="host smux mibII/mta_sendmail ucd-snmp/diskio" - NET_SNMP_LOGFILE=/var/log/snmpd.log - NET_SNMP_PERSISTENTDIR=/var/net-snmp - - to define default values (or overwriting defaults). At least - setting first two variables, you will not be prompted during - configuration process. You may also set - - BATCH="yes" - - to avoid interactive configuration. diff --git a/net-mgmt/net-snmp-devel/pkg-plist b/net-mgmt/net-snmp-devel/pkg-plist deleted file mode 100644 index 1b132415b302..000000000000 --- a/net-mgmt/net-snmp-devel/pkg-plist +++ /dev/null @@ -1,448 +0,0 @@ -bin/encode_keychange -bin/fixproc -bin/ipf-mod.pl -bin/mib2c -bin/mib2c-update -bin/net-snmp-config -bin/snmpbulkget -bin/snmpbulkwalk -bin/snmpcheck -bin/snmpconf -bin/snmpdelta -bin/snmpdf -bin/snmpget -bin/snmpgetnext -bin/snmpinform -bin/snmpnetstat -bin/snmpset -bin/snmpstatus -bin/snmptable -bin/snmptest -bin/snmptranslate -bin/snmptrap -bin/snmpusm -bin/snmpvacm -bin/snmpwalk -%%WITH_TKMIB%%bin/tkmib -bin/traptoemail -@exec mkdir %D/etc/snmp 2>/dev/null || true -include/net-snmp/agent/agent_callbacks.h -include/net-snmp/agent/agent_handler.h -include/net-snmp/agent/agent_index.h -include/net-snmp/agent/agent_module_config.h -include/net-snmp/agent/agent_read_config.h -include/net-snmp/agent/agent_registry.h -include/net-snmp/agent/agent_trap.h -include/net-snmp/agent/all_helpers.h -include/net-snmp/agent/auto_nlist.h -include/net-snmp/agent/baby_steps.h -include/net-snmp/agent/bulk_to_next.h -include/net-snmp/agent/cache_handler.h -include/net-snmp/agent/debug_handler.h -include/net-snmp/agent/ds_agent.h -include/net-snmp/agent/instance.h -include/net-snmp/agent/mfd.h -include/net-snmp/agent/mib_module_config.h -include/net-snmp/agent/mib_module_includes.h -include/net-snmp/agent/mib_modules.h -include/net-snmp/agent/mode_end_call.h -include/net-snmp/agent/multiplexer.h -include/net-snmp/agent/net-snmp-agent-includes.h -include/net-snmp/agent/null.h -include/net-snmp/agent/old_api.h -include/net-snmp/agent/read_only.h -include/net-snmp/agent/row_merge.h -include/net-snmp/agent/scalar.h -include/net-snmp/agent/scalar_group.h -include/net-snmp/agent/serialize.h -include/net-snmp/agent/set_helper.h -include/net-snmp/agent/snmp_agent.h -include/net-snmp/agent/snmp_vars.h -include/net-snmp/agent/stash_cache.h -include/net-snmp/agent/stash_to_next.h -include/net-snmp/agent/table.h -include/net-snmp/agent/table_array.h -include/net-snmp/agent/table_container.h -include/net-snmp/agent/table_data.h -include/net-snmp/agent/table_dataset.h -include/net-snmp/agent/table_iterator.h -include/net-snmp/agent/table_tdata.h -include/net-snmp/agent/util_funcs.h -include/net-snmp/agent/var_struct.h -include/net-snmp/agent/watcher.h -include/net-snmp/config_api.h -include/net-snmp/definitions.h -include/net-snmp/library/README -include/net-snmp/library/asn1.h -include/net-snmp/library/callback.h -include/net-snmp/library/check_varbind.h -include/net-snmp/library/cmu_compat.h -include/net-snmp/library/container.h -include/net-snmp/library/container_binary_array.h -include/net-snmp/library/container_iterator.h -include/net-snmp/library/container_list_ssll.h -include/net-snmp/library/container_null.h -include/net-snmp/library/data_list.h -include/net-snmp/library/default_store.h -include/net-snmp/library/factory.h -include/net-snmp/library/fd_event_manager.h -include/net-snmp/library/file_utils.h -include/net-snmp/library/getopt.h -include/net-snmp/library/int64.h -include/net-snmp/library/keytools.h -include/net-snmp/library/lcd_time.h -include/net-snmp/library/md5.h -include/net-snmp/library/mib.h -include/net-snmp/library/mt_support.h -include/net-snmp/library/oid_stash.h -include/net-snmp/library/parse.h -include/net-snmp/library/read_config.h -include/net-snmp/library/scapi.h -include/net-snmp/library/snmp-tc.h -include/net-snmp/library/snmp.h -include/net-snmp/library/snmpCallbackDomain.h -include/net-snmp/library/snmpTCPDomain.h -%%WITH_IPV6%%include/net-snmp/library/snmpTCPIPv6Domain.h -include/net-snmp/library/snmpUDPDomain.h -%%WITH_IPV6%%include/net-snmp/library/snmpUDPIPv6Domain.h -include/net-snmp/library/snmpUnixDomain.h -include/net-snmp/library/snmp_alarm.h -include/net-snmp/library/snmp_api.h -include/net-snmp/library/snmp_assert.h -include/net-snmp/library/snmp_client.h -include/net-snmp/library/snmp_debug.h -include/net-snmp/library/snmp_enum.h -include/net-snmp/library/snmp_impl.h -include/net-snmp/library/snmp_logging.h -include/net-snmp/library/snmp_parse_args.h -include/net-snmp/library/snmp_secmod.h -include/net-snmp/library/snmp_service.h -include/net-snmp/library/snmp_transport.h -include/net-snmp/library/snmpusm.h -include/net-snmp/library/snmpv3-security-includes.h -include/net-snmp/library/snmpv3.h -include/net-snmp/library/system.h -include/net-snmp/library/text_utils.h -include/net-snmp/library/tools.h -include/net-snmp/library/transform_oids.h -include/net-snmp/library/ucd_compat.h -include/net-snmp/library/vacm.h -include/net-snmp/library/winpipe.h -include/net-snmp/library/winservice.h -include/net-snmp/machine/generic.h -include/net-snmp/mib_api.h -include/net-snmp/net-snmp-config.h -include/net-snmp/net-snmp-includes.h -include/net-snmp/output_api.h -include/net-snmp/pdu_api.h -include/net-snmp/session_api.h -include/net-snmp/snmpv3_api.h -include/net-snmp/system/aix.h -include/net-snmp/system/bsd.h -include/net-snmp/system/bsdi.h -include/net-snmp/system/bsdi3.h -include/net-snmp/system/bsdi4.h -include/net-snmp/system/cygwin.h -include/net-snmp/system/darwin.h -include/net-snmp/system/darwin7.h -include/net-snmp/system/darwin8.h -include/net-snmp/system/darwin9.h -include/net-snmp/system/dragonfly.h -include/net-snmp/system/dynix.h -include/net-snmp/system/freebsd.h -include/net-snmp/system/freebsd2.h -include/net-snmp/system/freebsd3.h -include/net-snmp/system/freebsd4.h -include/net-snmp/system/freebsd5.h -include/net-snmp/system/freebsd6.h -include/net-snmp/system/freebsd7.h -include/net-snmp/system/freebsd8.h -include/net-snmp/system/generic.h -include/net-snmp/system/hpux.h -include/net-snmp/system/irix.h -include/net-snmp/system/linux.h -include/net-snmp/system/mingw32.h -include/net-snmp/system/mips.h -include/net-snmp/system/netbsd.h -include/net-snmp/system/openbsd.h -include/net-snmp/system/osf5.h -include/net-snmp/system/solaris.h -include/net-snmp/system/solaris2.3.h -include/net-snmp/system/solaris2.4.h -include/net-snmp/system/solaris2.5.h -include/net-snmp/system/solaris2.6.h -include/net-snmp/system/sunos.h -include/net-snmp/system/svr5.h -include/net-snmp/system/sysv.h -include/net-snmp/system/ultrix4.h -include/net-snmp/types.h -include/net-snmp/utilities.h -include/net-snmp/varbind_api.h -include/net-snmp/version.h -lib/libnetsnmp.a -lib/libnetsnmp.la -lib/libnetsnmp.so.%%SHLIB_VERSION%% -@exec ln -fs libnetsnmp.so.%%SHLIB_VERSION%% %B/libnetsnmp.so -@unexec rm -f %B/libnetsnmp.so 2> /dev/null || true -lib/libnetsnmpagent.a -lib/libnetsnmpagent.la -lib/libnetsnmpagent.so.%%SHLIB_VERSION%% -@exec ln -fs libnetsnmpagent.so.%%SHLIB_VERSION%% %B/libnetsnmpagent.so -@unexec rm -f %B/libnetsnmpagent.so 2> /dev/null || true -lib/libnetsnmphelpers.a -lib/libnetsnmphelpers.la -lib/libnetsnmphelpers.so.%%SHLIB_VERSION%% -@exec ln -fs libnetsnmphelpers.so.%%SHLIB_VERSION%% %B/libnetsnmphelpers.so -@unexec rm -f %B/libnetsnmphelpers.so 2> /dev/null || true -lib/libnetsnmpmibs.a -lib/libnetsnmpmibs.la -lib/libnetsnmpmibs.so.%%SHLIB_VERSION%% -@exec ln -fs libnetsnmpmibs.so.%%SHLIB_VERSION%% %B/libnetsnmpmibs.so -@unexec rm -f %B/libnetsnmpmibs.so 2> /dev/null || true -lib/libnetsnmptrapd.a -lib/libnetsnmptrapd.la -lib/libnetsnmptrapd.so.%%SHLIB_VERSION%% -@exec ln -fs libnetsnmptrapd.so.%%SHLIB_VERSION%% %B/libnetsnmptrapd.so -@unexec rm -f %B/libnetsnmptrapd.so 2> /dev/null || true -%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/Bundle/Makefile.subs.pl -%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/ASN.pm -%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/OID.pm -%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/TrapReceiver.pm -%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent.pm -%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent/Support.pm -%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent/default_store.pm -%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent/netsnmp_request_infoPtr.pm -%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/default_store.pm -%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/SNMP.pm -%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/Bundle/NetSNMP/.packlist -%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/ASN/ASN.bs -%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/ASN/ASN.so -%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/ASN/autosplit.ix -%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/OID/OID.bs -%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/OID/OID.so -%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/OID/autosplit.ix -%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/TrapReceiver/TrapReceiver.bs -%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/TrapReceiver/TrapReceiver.so -%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/TrapReceiver/autosplit.ix -%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/agent.bs -%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/agent.so -%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/autosplit.ix -%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/default_store/autosplit.ix -%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/default_store/default_store.bs -%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/default_store/default_store.so -%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/default_store/autosplit.ix -%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/default_store/default_store.bs -%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/default_store/default_store.so -%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/SNMP/SNMP.bs -%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/SNMP/SNMP.so -%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/SNMP/autosplit.ix -sbin/snmpd -sbin/snmptrapd -%%PORTDOCS%%%%DOCSDIR%%/AGENT.txt -%%PORTDOCS%%%%DOCSDIR%%/COPYING -%%PORTDOCS%%%%DOCSDIR%%/FAQ -%%PORTDOCS%%%%DOCSDIR%%/NEWS -%%PORTDOCS%%%%DOCSDIR%%/README -%%PORTDOCS%%%%DOCSDIR%%/README.agentx -%%PORTDOCS%%%%DOCSDIR%%/README.krb5 -%%PORTDOCS%%%%DOCSDIR%%/README.snmpv3 -%%PORTDOCS%%%%DOCSDIR%%/README.thread -%%PORTDOCS%%%%DOCSDIR%%/README.smux -%%DATADIR%%/snmpd.conf.example -%%DATADIR%%/snmp_perl_trapd.pl -%%DATADIR%%/mib2c.access_functions.conf -%%DATADIR%%/mib2c.array-user.conf -%%DATADIR%%/mib2c.check_values.conf -%%DATADIR%%/mib2c.check_values_local.conf -%%DATADIR%%/mib2c.column_defines.conf -%%DATADIR%%/mib2c.column_enums.conf -%%DATADIR%%/mib2c.column_storage.conf -%%DATADIR%%/mib2c.conf -%%DATADIR%%/mib2c.container.conf -%%DATADIR%%/mib2c.create-dataset.conf -%%DATADIR%%/mib2c.genhtml.conf -%%DATADIR%%/mib2c.int_watch.conf -%%DATADIR%%/mib2c.iterate.conf -%%DATADIR%%/mib2c.iterate_access.conf -%%DATADIR%%/mib2c.mfd.conf -%%DATADIR%%/mib2c.notify.conf -%%DATADIR%%/mib2c.old-api.conf -%%DATADIR%%/mib2c.perl.conf -%%DATADIR%%/mib2c.scalar.conf -%%DATADIR%%/mib2c.table_data.conf -%%DATADIR%%/mib2c-data/default-mfd-top.m2c -%%DATADIR%%/mib2c-data/details-enums.m2i -%%DATADIR%%/mib2c-data/details-node.m2i -%%DATADIR%%/mib2c-data/details-table.m2i -%%DATADIR%%/mib2c-data/generic-ctx-copy.m2i -%%DATADIR%%/mib2c-data/generic-ctx-get.m2i -%%DATADIR%%/mib2c-data/generic-ctx-set.m2i -%%DATADIR%%/mib2c-data/generic-data-allocate.m2i -%%DATADIR%%/mib2c-data/generic-data-context.m2i -%%DATADIR%%/mib2c-data/generic-get-char.m2i -%%DATADIR%%/mib2c-data/generic-get-decl-bot.m2i -%%DATADIR%%/mib2c-data/generic-get-decl.m2i -%%DATADIR%%/mib2c-data/generic-get-long.m2i -%%DATADIR%%/mib2c-data/generic-get-oid.m2i -%%DATADIR%%/mib2c-data/generic-header-bottom.m2i -%%DATADIR%%/mib2c-data/generic-header-top.m2i -%%DATADIR%%/mib2c-data/generic-source-includes.m2i -%%DATADIR%%/mib2c-data/generic-table-constants.m2c -%%DATADIR%%/mib2c-data/generic-table-enums.m2c -%%DATADIR%%/mib2c-data/generic-table-indexes-from-oid.m2i -%%DATADIR%%/mib2c-data/generic-table-indexes-set.m2i -%%DATADIR%%/mib2c-data/generic-table-indexes-to-oid.m2i -%%DATADIR%%/mib2c-data/generic-table-indexes-varbind-setup.m2i -%%DATADIR%%/mib2c-data/generic-table-indexes.m2i -%%DATADIR%%/mib2c-data/generic-table-oids.m2c -%%DATADIR%%/mib2c-data/generic-value-map-func.m2i -%%DATADIR%%/mib2c-data/generic-value-map-reverse.m2i -%%DATADIR%%/mib2c-data/generic-value-map.m2i -%%DATADIR%%/mib2c-data/m2c-internal-warning.m2i -%%DATADIR%%/mib2c-data/m2c_setup_enum.m2i -%%DATADIR%%/mib2c-data/m2c_setup_node.m2i -%%DATADIR%%/mib2c-data/m2c_setup_table.m2i -%%DATADIR%%/mib2c-data/m2c_table_save_defaults.m2i -%%DATADIR%%/mib2c-data/mfd-access-container-cached-defines.m2i -%%DATADIR%%/mib2c-data/mfd-access-unsorted-external-defines.m2i -%%DATADIR%%/mib2c-data/mfd-data-access.m2c -%%DATADIR%%/mib2c-data/mfd-data-get.m2c -%%DATADIR%%/mib2c-data/mfd-data-set.m2c -%%DATADIR%%/mib2c-data/mfd-doxygen.m2c -%%DATADIR%%/mib2c-data/mfd-interactive-setup.m2c -%%DATADIR%%/mib2c-data/mfd-interface.m2c -%%DATADIR%%/mib2c-data/mfd-makefile.m2m -%%DATADIR%%/mib2c-data/mfd-persistence.m2i -%%DATADIR%%/mib2c-data/mfd-readme.m2c -%%DATADIR%%/mib2c-data/mfd-top.m2c -%%DATADIR%%/mib2c-data/node-get.m2i -%%DATADIR%%/mib2c-data/node-set.m2i -%%DATADIR%%/mib2c-data/node-storage.m2i -%%DATADIR%%/mib2c-data/node-validate.m2i -%%DATADIR%%/mib2c-data/node-varbind-validate.m2i -%%DATADIR%%/mib2c-data/parent-dependencies.m2i -%%DATADIR%%/mib2c-data/parent-set.m2i -%%DATADIR%%/mib2c-data/subagent.m2c -%%DATADIR%%/mib2c-data/syntax-COUNTER64-get.m2i -%%DATADIR%%/mib2c-data/syntax-DateAndTime-get.m2d -%%DATADIR%%/mib2c-data/syntax-DateAndTime-get.m2i -%%DATADIR%%/mib2c-data/syntax-DateAndTime-readme.m2i -%%DATADIR%%/mib2c-data/syntax-InetAddress-get.m2i -%%DATADIR%%/mib2c-data/syntax-InetAddress-set.m2i -%%DATADIR%%/mib2c-data/syntax-InetAddressType-get.m2i -%%DATADIR%%/mib2c-data/syntax-InetAddressType-set.m2i -%%DATADIR%%/mib2c-data/syntax-RowStatus-dependencies.m2i -%%DATADIR%%/mib2c-data/syntax-RowStatus-get.m2i -%%DATADIR%%/mib2c-data/syntax-RowStatus-varbind-validate.m2i -%%DATADIR%%/mib2c-data/syntax-StorageType-dependencies.m2i -%%DATADIR%%/mib2c-data/syntax-TestAndIncr-get.m2i -%%DATADIR%%/mibs/AGENTX-MIB.txt -%%WITH_EVENT-MIB%%%%DATADIR%%/mibs/DISMAN-EVENT-MIB.txt -%%DATADIR%%/mibs/DISMAN-SCHEDULE-MIB.txt -%%DATADIR%%/mibs/DISMAN-SCRIPT-MIB.txt -%%DATADIR%%/mibs/EtherLike-MIB.txt -%%DATADIR%%/mibs/HCNUM-TC.txt -%%DATADIR%%/mibs/HOST-RESOURCES-MIB.txt -%%DATADIR%%/mibs/HOST-RESOURCES-TYPES.txt -%%DATADIR%%/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt -%%DATADIR%%/mibs/IANA-LANGUAGE-MIB.txt -%%DATADIR%%/mibs/IANA-RTPROTO-MIB.txt -%%DATADIR%%/mibs/IANAifType-MIB.txt -%%DATADIR%%/mibs/IF-INVERTED-STACK-MIB.txt -%%DATADIR%%/mibs/IF-MIB.txt -%%DATADIR%%/mibs/INET-ADDRESS-MIB.txt -%%DATADIR%%/mibs/IP-FORWARD-MIB.txt -%%DATADIR%%/mibs/IP-MIB.txt -%%DATADIR%%/mibs/IPV6-ICMP-MIB.txt -%%DATADIR%%/mibs/IPV6-MIB.txt -%%DATADIR%%/mibs/IPV6-TC.txt -%%DATADIR%%/mibs/IPV6-TCP-MIB.txt -%%DATADIR%%/mibs/IPV6-UDP-MIB.txt -%%WITH_MTA_SENDMAIL%%%%DATADIR%%/mibs/MTA-MIB.txt -%%DATADIR%%/mibs/NET-SNMP-AGENT-MIB.txt -%%DATADIR%%/mibs/NET-SNMP-EXAMPLES-MIB.txt -%%DATADIR%%/mibs/NET-SNMP-EXTEND-MIB.txt -%%DATADIR%%/mibs/NET-SNMP-MIB.txt -%%DATADIR%%/mibs/NET-SNMP-TC.txt -%%DATADIR%%/mibs/NET-SNMP-VACM-MIB.txt -%%WITH_MTA_SENDMAIL%%%%DATADIR%%/mibs/NETWORK-SERVICES-MIB.txt -%%DATADIR%%/mibs/NOTIFICATION-LOG-MIB.txt -%%DATADIR%%/mibs/RFC-1215.txt -%%DATADIR%%/mibs/RFC1155-SMI.txt -%%DATADIR%%/mibs/RFC1213-MIB.txt -%%DATADIR%%/mibs/RMON-MIB.txt -%%DATADIR%%/mibs/SCTP-MIB.txt -%%DATADIR%%/mibs/SMUX-MIB.txt -%%DATADIR%%/mibs/SNMP-COMMUNITY-MIB.txt -%%DATADIR%%/mibs/SNMP-FRAMEWORK-MIB.txt -%%DATADIR%%/mibs/SNMP-MPD-MIB.txt -%%DATADIR%%/mibs/SNMP-NOTIFICATION-MIB.txt -%%DATADIR%%/mibs/SNMP-PROXY-MIB.txt -%%DATADIR%%/mibs/SNMP-TARGET-MIB.txt -%%DATADIR%%/mibs/SNMP-USER-BASED-SM-MIB.txt -%%DATADIR%%/mibs/SNMP-USM-AES-MIB.txt -%%DATADIR%%/mibs/SNMP-USM-DH-OBJECTS-MIB.txt -%%DATADIR%%/mibs/SNMP-VIEW-BASED-ACM-MIB.txt -%%DATADIR%%/mibs/SNMPv2-CONF.txt -%%DATADIR%%/mibs/SNMPv2-MIB.txt -%%DATADIR%%/mibs/SNMPv2-SMI.txt -%%DATADIR%%/mibs/SNMPv2-TC.txt -%%DATADIR%%/mibs/SNMPv2-TM.txt -%%DATADIR%%/mibs/TCP-MIB.txt -%%DATADIR%%/mibs/TRANSPORT-ADDRESS-MIB.txt -%%DATADIR%%/mibs/UCD-DEMO-MIB.txt -%%DATADIR%%/mibs/UCD-DISKIO-MIB.txt -%%DATADIR%%/mibs/UCD-DLMOD-MIB.txt -%%DATADIR%%/mibs/UCD-IPFWACC-MIB.txt -%%DATADIR%%/mibs/UCD-SNMP-MIB.txt -%%DATADIR%%/mibs/UDP-MIB.txt -@unexec rm -f %D/%%DATADIR%%/mibs/.index 2>/dev/null || true -%%WITH_PERL%%%%DATADIR%%/snmp_perl.pl -%%DATADIR%%/snmpconf-data/snmp-data/authopts -%%DATADIR%%/snmpconf-data/snmp-data/debugging -%%DATADIR%%/snmpconf-data/snmp-data/mibs -%%DATADIR%%/snmpconf-data/snmp-data/output -%%DATADIR%%/snmpconf-data/snmp-data/snmpconf-config -%%DATADIR%%/snmpconf-data/snmpd-data/acl -%%DATADIR%%/snmpconf-data/snmpd-data/basic_setup -%%DATADIR%%/snmpconf-data/snmpd-data/extending -%%DATADIR%%/snmpconf-data/snmpd-data/monitor -%%DATADIR%%/snmpconf-data/snmpd-data/operation -%%DATADIR%%/snmpconf-data/snmpd-data/snmpconf-config -%%DATADIR%%/snmpconf-data/snmpd-data/system -%%DATADIR%%/snmpconf-data/snmpd-data/trapsinks -%%DATADIR%%/snmpconf-data/snmptrapd-data/authentication -%%DATADIR%%/snmpconf-data/snmptrapd-data/formatting -%%DATADIR%%/snmpconf-data/snmptrapd-data/logging -%%DATADIR%%/snmpconf-data/snmptrapd-data/runtime -%%DATADIR%%/snmpconf-data/snmptrapd-data/snmpconf-config -%%DATADIR%%/snmpconf-data/snmptrapd-data/traphandle -@dirrm %%DATADIR%%/mib2c-data/ -@dirrm %%DATADIR%%/snmpconf-data/snmptrapd-data -@dirrm %%DATADIR%%/snmpconf-data/snmpd-data -@dirrm %%DATADIR%%/snmpconf-data/snmp-data -@dirrm %%DATADIR%%/snmpconf-data -@dirrmtry %%DATADIR%%/mibs -@dirrmtry %%DATADIR%% -%%PORTDOCS%%@dirrm %%DOCSDIR%% -%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/SNMP -%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/default_store -%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent/default_store -%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/agent -%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/TrapReceiver -%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/OID -%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP/ASN -%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/NetSNMP -%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Bundle/NetSNMP -%%WITH_PERL%%@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto/Bundle -%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP/agent -%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/NetSNMP -%%WITH_PERL%%@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/Bundle -@exec mkdir /var/agentx -@dirrm include/net-snmp/system -@dirrm include/net-snmp/machine -@dirrm include/net-snmp/library -@dirrm include/net-snmp/agent -@dirrm include/net-snmp -@dirrmtry etc/snmp -@unexec rmdir /var/agentx 2>/dev/null || true diff --git a/net-mgmt/zabbix2-agent/Makefile b/net-mgmt/zabbix2-agent/Makefile deleted file mode 100644 index 2d6e625c42f5..000000000000 --- a/net-mgmt/zabbix2-agent/Makefile +++ /dev/null @@ -1,47 +0,0 @@ -# Ports collection makefile for: zabbix-agent -# Date created: Jun 18 2003 -# Whom: Sergey Akifyev <asa@gascom.ru> -# -# $FreeBSD$ -# - -PORTNAME= zabbix -PORTVERSION= 1.6.2 -PORTREVISION= 1 -PORTEPOCH= 2 -CATEGORIES= net-mgmt -MASTER_SITES= SF -PKGNAMESUFFIX= -agent - -MAINTAINER= d.lohansky@zsupport.ru -COMMENT= Application and network monitoring solution - -USE_GMAKE= yes -USE_RC_SUBR= zabbix_agentd -GNU_CONFIGURE= yes -CONFIGURE_ARGS= --enable-agent --disable-server -MAKE_ARGS= ARCH=freebsd -.ifndef WITHOUT_IPV6 -CONFIGURE_ARGS+=--enable-ipv6 -.endif - -ZABBIX_BIN= agent agentd get sender -ZABBIX_CFG= agent agentd -ZABBIX_BINFILES=${ZABBIX_BIN:S|^|zabbix_|:C|.+|&/&|:S|agentd/|agent/|} -ZABBIX_CFGFILES=${ZABBIX_CFG:S|^|zabbix_|:S|$|.conf|} -PLIST_FILES= ${ZABBIX_BIN:S|^|bin/zabbix_|} \ - ${ZABBIX_CFG:S|^|%%ETCDIR%%/zabbix_|:S|$|.conf.sample|} - -post-patch: - @${FIND} ${WRKSRC}/src/ -type f|${XARGS} \ - ${REINPLACE_CMD} -e 's|/etc/zabbix|${ETCDIR}|;s|/usr/sbin|${LOCALBASE}/sbin|' - -do-install: - @${ECHO_CMD} '@unexec ${RMDIR} %D/${ETCDIR_REL} 2>/dev/null || true' >> ${TMPPLIST} - @${INSTALL_PROGRAM} ${ZABBIX_BINFILES:S,^,${WRKSRC}/src/,} ${PREFIX}/bin/ - @${INSTALL} -d ${ETCDIR}/ - @for i in ${ZABBIX_CFGFILES};do\ - ${INSTALL_DATA} ${WRKSRC}/misc/conf/$$i ${ETCDIR}/$$i.sample;done - @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL - -.include <bsd.port.mk> diff --git a/net-mgmt/zabbix2-agent/distinfo b/net-mgmt/zabbix2-agent/distinfo deleted file mode 100644 index cdd2ca0881bf..000000000000 --- a/net-mgmt/zabbix2-agent/distinfo +++ /dev/null @@ -1,3 +0,0 @@ -MD5 (zabbix-1.6.2.tar.gz) = 33da3661868a04042c596a819896446f -SHA256 (zabbix-1.6.2.tar.gz) = e982419f45b2ac814e804a1a340c7e563fe5230bb5295b17e5767c89fa25550e -SIZE (zabbix-1.6.2.tar.gz) = 8229465 diff --git a/net-mgmt/zabbix2-agent/files/patch-configure b/net-mgmt/zabbix2-agent/files/patch-configure deleted file mode 100644 index 2efc88046c5b..000000000000 --- a/net-mgmt/zabbix2-agent/files/patch-configure +++ /dev/null @@ -1,12 +0,0 @@ ---- configure.orig 2009-01-16 06:20:00.000000000 -0600 -+++ configure 2009-01-22 17:18:00.000000000 -0600 -@@ -275,6 +275,9 @@ - # Factoring default headers for most tests. - ac_includes_default="\ - #include <stdio.h> -+#include <sys/socket.h> -+#include <sys/param.h> -+#include <netinet/in.h> - #if HAVE_SYS_TYPES_H - # include <sys/types.h> - #endif diff --git a/net-mgmt/zabbix2-agent/files/zabbix_agentd.in b/net-mgmt/zabbix2-agent/files/zabbix_agentd.in deleted file mode 100644 index cc3eeb70286b..000000000000 --- a/net-mgmt/zabbix2-agent/files/zabbix_agentd.in +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -# PROVIDE: zabbix_agentd -# REQUIRE: DAEMON -# KEYWORD: shutdown - -. %%RC_SUBR%% - -name="zabbix_agentd" -rcvar=${name}_enable -load_rc_config $name -eval : \${${rcvar}='NO'} - -command="%%PREFIX%%/bin/${name}" -required_files="%%ETCDIR%%/${name}.conf" - -run_rc_command "$1" diff --git a/net-mgmt/zabbix2-agent/pkg-descr b/net-mgmt/zabbix2-agent/pkg-descr deleted file mode 100644 index 52ecef039fcf..000000000000 --- a/net-mgmt/zabbix2-agent/pkg-descr +++ /dev/null @@ -1,8 +0,0 @@ -Zabbix is software for application and network monitoring. -Zabbix supports both polling and trapping techniques to -collect data from monitored hosts. Flexible notification -mechanism allows easy and quckly configure email notifications -for pre-defined events. Zabbix is freely available under the -terms of the GNU General Public License (GPL). - -WWW: http://www.zabbix.com/ diff --git a/net-mgmt/zabbix2-agent/pkg-install b/net-mgmt/zabbix2-agent/pkg-install deleted file mode 100644 index f0b59f76cc4a..000000000000 --- a/net-mgmt/zabbix2-agent/pkg-install +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh -# Script was taken from mysql323-server port, and modified -# to suit zabbix needs - -[ -n "${PACKAGE_BUILDING}" ] && exit 0 - -[ "${2}" = "POST-INSTALL" ] && exit 0 - -PATH=/bin:/usr/sbin - -USER=zabbix -GROUP=${USER} -UID=122 -GID=${UID} - -if pw group show "${GROUP}" 2>/dev/null; then - echo "You already have a group \"${GROUP}\", so I will use it." -else - if pw groupadd ${GROUP} -g ${GID}; then - echo "Added group \"${GROUP}\"." - else - echo "Adding group \"${GROUP}\" failed..." - exit 1 - fi -fi - -if pw user show "${USER}" 2>/dev/null; then - echo "You already have a user \"${USER}\", so I will use it." - if pw usermod ${USER} -d /nonexistent - then - echo "Changed home directory of \"${USER}\" to /nonexistent" - else - echo "Changing home directory of \"${USER}\" to /nonexistent failed..." - exit 1 - fi -else - if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ - -d /nonexistent -s /sbin/nologin -c "Zabbix Sandbox" - then - echo "Added user \"${USER}\"." - else - echo "Adding user \"${USER}\" failed..." - exit 1 - fi -fi diff --git a/net-mgmt/zabbix2/Makefile b/net-mgmt/zabbix2/Makefile deleted file mode 100644 index d003ff56212d..000000000000 --- a/net-mgmt/zabbix2/Makefile +++ /dev/null @@ -1,106 +0,0 @@ -# Ports collection makefile for: zabbix -# Date created: Jun 18 2003 -# Whom: Sergey Akifyev <asa@gascom.ru> -# -# $FreeBSD$ -# - -PORTNAME= zabbix -PORTVERSION= 1.6.2 -PORTREVISION= 1 -PORTEPOCH= 1 -CATEGORIES= net-mgmt -MASTER_SITES= SF - -MAINTAINER= d.lohansky@zsupport.ru -COMMENT= Application and network monitoring solution - -LIB_DEPENDS= netsnmp.16:${PORTSDIR}/net-mgmt/net-snmp \ - iksemel.4:${PORTSDIR}/textproc/iksemel \ - curl.5:${PORTSDIR}/ftp/curl - -OPTIONS= MYSQL "Use MySQL backend" on \ - PGSQL "Use PostgreSQL backend" off \ - SQLITE "Use SQLite backend" off \ - LDAP "Support for checking LDAP servers" on \ - IPV6 "Support for IPv6" on \ - FPING "Use fping for pinging hosts" on \ - JABBER "Use jabber media type" on - -USE_GMAKE= yes -USE_PHP= gd snmp sockets pcre bcmath -USE_RC_SUBR= zabbix_server.sh -GNU_CONFIGURE= yes -CONFIGURE_ARGS= --disable-agent --enable-server \ - --with-net-snmp=${LOCALBASE}/bin/net-snmp-config \ - --with-curl=${LOCALBASE}/bin/curl-config -MAKE_ARGS= ARCH=freebsd -SUB_FILES= pkg-message - -.include <bsd.port.pre.mk> - -.ifndef WITHOUT_JABBER -USE_JABBER= yes -CONFIGURE_ARGS+=--with-jabber=${LOCALBASE} -.endif - -.ifndef WITHOUT_LDAP -USE_OPENLDAP= yes -CONFIGURE_ARGS+=--with-ldap=${LOCALBASE} -LIB_DEPENDS+= gnutls.26:${PORTSDIR}/security/gnutls \ - sasl2.2:${PORTSDIR}/security/cyrus-sasl2 -.endif - -.ifdef WITH_IPV6 -CONFIGURE_ARGS+=--enable-ipv6 -.endif - -.ifndef WITHOUT_FPING -RUN_DEPENDS+= fping:${PORTSDIR}/net/fping -.endif - -.ifndef WITHOUT_MYSQL -USE_MYSQL= yes -USE_PHP+= mysql -CONFIGURE_ARGS+=--with-mysql=${LOCALBASE}/bin/mysql_config -.elifdef WITH_PGSQL -USE_PGSQL= yes -USE_PHP+= pgsql -CONFIGURE_ARGS+=--with-pgsql=${LOCALBASE}/bin/pg_config -.elifdef WITH_SQLITE -USE_SQLITE= yes -USE_PHP+= sqlite -CONFIGURE_ARGS+=--with-sqlite3=${LOCALBASE} -.else -IGNORE= zabbix needs a database backend -.endif - -post-patch: - @${FIND} ${WRKSRC}/src/ -type f|${XARGS} \ - ${REINPLACE_CMD} -e 's|/etc/zabbix|${ETCDIR}|;s|/usr/sbin|${LOCALBASE}/sbin|' - @${REINPLACE_CMD} -e '/test.*rf/s|-rf|-f|;/LDFLAGS/s|-static||;\ - /LIBS="-lnetsnmp/s|="|="-lcrypto |;s|-lsqlite3|-lsqlite3 ${PTHREAD_LIBS}|'\ - ${WRKSRC}/configure - @cd ${WRKSRC} && ${FIND} . -name '*.orig' -exec ${RM} {} \; - -.ifdef WITHOUT_FPING - @${ECHO} 'DisablePinger=yes' >> ${WRKSRC}/misc/conf/zabbix_server.conf -.endif - -.if ${ARCH} == "amd64" -post-configure: - ${ECHO_CMD} "#define HAVE_VA_COPY 1" >> ${WRKSRC}/include/config.h -.endif - -do-install: - @${INSTALL_PROGRAM} ${WRKSRC}/src/zabbix_server/zabbix_server ${PREFIX}/bin/ - @${INSTALL} -d ${ETCDIR}/ - @${INSTALL_DATA} ${WRKSRC}/misc/conf/zabbix_server.conf\ - ${ETCDIR}/zabbix_server.conf.sample - @cd ${WRKSRC}/frontends/&&${COPYTREE_SHARE} . ${DATADIR}/ - @cd ${WRKSRC}/upgrades/&&${COPYTREE_SHARE} dbpatches ${DATADIR}/ - @cd ${WRKSRC}/create/&&${COPYTREE_SHARE} "data schema" ${DATADIR}/create/ - @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL - @${CAT} ${PKGMESSAGE} - -.include <bsd.port.post.mk> diff --git a/net-mgmt/zabbix2/distinfo b/net-mgmt/zabbix2/distinfo deleted file mode 100644 index cdd2ca0881bf..000000000000 --- a/net-mgmt/zabbix2/distinfo +++ /dev/null @@ -1,3 +0,0 @@ -MD5 (zabbix-1.6.2.tar.gz) = 33da3661868a04042c596a819896446f -SHA256 (zabbix-1.6.2.tar.gz) = e982419f45b2ac814e804a1a340c7e563fe5230bb5295b17e5767c89fa25550e -SIZE (zabbix-1.6.2.tar.gz) = 8229465 diff --git a/net-mgmt/zabbix2/files/patch-USH-162.1 b/net-mgmt/zabbix2/files/patch-USH-162.1 deleted file mode 100644 index df11a28e251d..000000000000 --- a/net-mgmt/zabbix2/files/patch-USH-162.1 +++ /dev/null @@ -1,135 +0,0 @@ -Index: include/validate.inc.php -=================================================================== ---- frontends/php/include/validate.inc.php (revision 6592) -+++ frontends/php/include/validate.inc.php (revision 6593) -@@ -198,19 +198,21 @@ - return $ret; - } - -- function calc_exp($fields,$field,$expression){ -+ function calc_exp($fields,$field,$expression){ - //SDI("$field - expression: ".$expression); - -- if(zbx_strstr($expression,"{}") && !isset($_REQUEST[$field])) -+ if(zbx_strstr($expression,'{}') && !isset($_REQUEST[$field])) - return FALSE; - -- if(zbx_strstr($expression,"{}") && !is_array($_REQUEST[$field])) -- $expression = str_replace("{}",'$_REQUEST["'.$field.'"]',$expression); -+ if(zbx_strstr($expression,'{}') && !is_array($_REQUEST[$field])) -+ $expression = str_replace('{}','$_REQUEST["'.$field.'"]',$expression); - -- if(zbx_strstr($expression,"{}") && is_array($_REQUEST[$field])){ -+ if(zbx_strstr($expression,'{}') && is_array($_REQUEST[$field])){ - foreach($_REQUEST[$field] as $key => $val){ -- $expression2 = str_replace("{}",'$_REQUEST["'.$field.'"]["'.$key.'"]',$expression); -- if(calc_exp2($fields,$field,$expression2)==FALSE) -+ if(!ereg('^[a-zA-Z0-9_]+$',$key)) return FALSE; -+ -+ $expression2 = str_replace('{}','$_REQUEST["'.$field.'"]["'.$key.'"]',$expression); -+ if(calc_exp2($fields,$field,$expression2)==FALSE) - return FALSE; - } - return TRUE; -@@ -219,7 +221,7 @@ - return calc_exp2($fields,$field,$expression); - } - -- function unset_not_in_list(&$fields){ -+ function unset_not_in_list(&$fields){ - foreach($_REQUEST as $key => $val){ - if(!isset($fields[$key])){ - unset_request($key,'unset_not_in_list'); -@@ -382,7 +384,7 @@ - } - } - -- function check_field(&$fields, &$field, $checks){ -+ function check_field(&$fields, &$field, $checks){ - list($type,$opt,$flags,$validation,$exception)=$checks; - - if($flags&P_UNSET_EMPTY && isset($_REQUEST[$field]) && $_REQUEST[$field]==''){ -@@ -473,9 +475,7 @@ - include_once "include/page_footer.php"; - } - -- function check_fields(&$fields, $show_messages=true){ -- -- global $_REQUEST; -+ function check_fields(&$fields, $show_messages=true){ - global $system_fields; - - $err = ZBX_VALID_OK; -Index: locales.php -=================================================================== ---- frontends/php/locales.php (revision 6592) -+++ frontends/php/locales.php (revision 6593) -@@ -19,11 +19,11 @@ - **/ - ?> - <?php --include_once "include/config.inc.php"; -+include_once('include/config.inc.php'); - - if(isset($_REQUEST['download'])){ -- $page["type"] = PAGE_TYPE_XML; -- $page["file"] = "new_locale.inc.php"; -+ $page['type'] = PAGE_TYPE_XML; -+ $page['file'] = 'new_locale.inc.php'; - } - else{ - $page['title'] = "S_LOCALES"; -@@ -181,26 +181,25 @@ - $frmLcls->AddOption('id','locales'); - $frmLcls->SetHelp($help); - -- $fileFrom = 'include/locales/'.$_REQUEST['srclang'].".inc.php"; -- if(file_exists($fileFrom)){ -- include($fileFrom); - -+ $fileFrom = 'include/locales/'.$_REQUEST['srclang'].'.inc.php'; -+ if(ereg('^[A-Za-z0-9_]+$', $_REQUEST['srclang']) && file_exists($fileFrom)){ -+ include($fileFrom); - if(!isset($TRANSLATION) || !is_array($TRANSLATION)){ -- error("Passed SOURCE is NOT valid PHP file."); -+ error('Passed SOURCE is NOT valid PHP file.'); - } - $transFrom = $TRANSLATION; - } - unset($TRANSLATION); - -- $frmLcls->AddVar('extlang',$_REQUEST['extlang']); -- -- if($_REQUEST['extlang'] != 'new'){ -- $fileTo = 'include/locales/'.$_REQUEST['extlang'].".inc.php"; -+ $frmLcls->addVar('extlang',$_REQUEST['extlang']); -+ if(ereg('^[A-Za-z0-9_]+$', $_REQUEST['srclang']) && ($_REQUEST['extlang'] != 'new')){ -+ $fileTo = 'include/locales/'.$_REQUEST['extlang'].'.inc.php'; - if(file_exists($fileTo)){ - include($fileTo); - - if(!isset($TRANSLATION) || !is_array($TRANSLATION)){ -- error("Passed DEST is NOT valid PHP file."); -+ error('Passed DEST is NOT valid PHP file.'); - } - $transTo = $TRANSLATION; - // header('Content-Type: text/html; charset='.$TRANSLATION['S_HTML_CHARSET']); - ------ - -This hunk fixes typo in the bugfix for local file inclusion inside -locales.php - -Index: branches/1.6/frontends/php/locales.php -=================================================================== ---- frontends/php/locales.php (revision 6885) -+++ frontends/php/locales.php (revision 6886) -@@ -193,7 +193,7 @@ - unset($TRANSLATION); - - $frmLcls->addVar('extlang',$_REQUEST['extlang']); -- if(ereg('^[A-Za-z0-9_]+$', $_REQUEST['srclang']) && ($_REQUEST['extlang'] != 'new')){ -+ if(ereg('^[A-Za-z0-9_]+$', $_REQUEST['extlang']) && ($_REQUEST['extlang'] != 'new')){ - $fileTo = 'include/locales/'.$_REQUEST['extlang'].'.inc.php'; - if(file_exists($fileTo)){ - include($fileTo); diff --git a/net-mgmt/zabbix2/files/patch-USH-162.2 b/net-mgmt/zabbix2/files/patch-USH-162.2 deleted file mode 100644 index 22d5d1112dca..000000000000 --- a/net-mgmt/zabbix2/files/patch-USH-162.2 +++ /dev/null @@ -1,2622 +0,0 @@ -Index: frontends/php/include/perm.inc.php -=================================================================== ---- frontends/php/include/perm.inc.php (revision 6620) -+++ frontends/php/include/perm.inc.php (revision 6621) -@@ -44,7 +44,7 @@ - $USER_DETAILS = NULL; - $login = FALSE; - -- $sessionid = get_cookie('zbx_sessionid'); -+ $sessionid = get_request('sessionid',get_cookie('zbx_sessionid')); - - if(!is_null($sessionid)){ - $sql = 'SELECT u.*,s.* '. -Index: frontends/php/include/validate.inc.php -=================================================================== ---- frontends/php/include/validate.inc.php (revision 6620) -+++ frontends/php/include/validate.inc.php (revision 6621) -@@ -428,8 +429,12 @@ - } - } - else if($opt == O_OPT){ -- if(!isset($_REQUEST[$field])) -+ if(!isset($_REQUEST[$field])){ - return ZBX_VALID_OK; -+ } -+ else if(($flags&P_ACT) && !isset($_REQUEST['zbx_form'])){ -+ return ZBX_VALID_ERROR; -+ } - } - - check_trim($_REQUEST[$field]); -@@ -458,17 +463,21 @@ - return ZBX_VALID_OK; - } - --// VAR TYPE OPTIONAL FLAGS VALIDATION EXCEPTION -+// VAR TYPE OPTIONAL FLAGS VALIDATION EXCEPTION - $system_fields=array( -- "sessionid"=> array(T_ZBX_STR, O_OPT, P_SYS, HEX(),NULL), -- "switch_node"=> array(T_ZBX_INT, O_OPT, P_SYS, DB_ID,NULL), -- "triggers_hash"=> array(T_ZBX_STR, O_OPT, P_SYS, NOT_EMPTY,NULL), -- 'print'=> array(T_ZBX_INT, O_OPT, P_SYS, IN("1"),NULL), -+ 'sessionid'=> array(T_ZBX_STR, O_OPT, P_SYS, HEX(), 'isset({zbx_form})'), -+ 'zbx_form'=> array(T_ZBX_STR, O_OPT, P_SYS, NOT_EMPTY, NULL), -+// -+ 'switch_node'=> array(T_ZBX_INT, O_OPT, P_SYS, DB_ID,NULL), -+ 'triggers_hash'=> array(T_ZBX_STR, O_OPT, P_SYS, NOT_EMPTY,NULL), -+ 'print'=> array(T_ZBX_INT, O_OPT, P_SYS, IN('1'),NULL), -+ -+// table sorting - 'sort'=> array(T_ZBX_STR, O_OPT, P_SYS, NULL,NULL), - 'sortorder'=> array(T_ZBX_STR, O_OPT, P_SYS, NULL,NULL) - ); - -- function invalid_url(){ -+ function invalid_url(){ - include_once "include/page_header.php"; - unset_all(); - show_error_message(S_INVALID_URL); -Index: frontends/php/include/classes/cform.inc.php -=================================================================== ---- frontends/php/include/classes/cform.inc.php (revision 6620) -+++ frontends/php/include/classes/cform.inc.php (revision 6621) -@@ -22,46 +22,44 @@ - class CForm extends CTag{ - /* public */ - function CForm($action=NULL, $method='post', $enctype=NULL){ -- parent::CTag("form","yes"); -- $this->SetMethod($method); -- $this->SetAction($action); -- $this->SetEnctype($enctype); -+ parent::CTag('form','yes'); -+ $this->setMethod($method); -+ $this->setAction($action); -+ $this->setEnctype($enctype); -+ -+ $this->addVar('zbx_form', 'action'); -+ $this->addVar('sessionid', $_COOKIE['zbx_sessionid']); - } - -- function SetMethod($value='post'){ -+ function setMethod($value='post'){ - return $this->options['method'] = $value; - } - -- function SetAction($value){ -+ function setAction($value){ - global $page; - - if(is_null($value)){ -- if(isset($page['file'])){ -- $value = $page['file']; -- } -- else{ -- $value = "#"; -- } -+ $value = isset($page['file'])?$page['file']:'#'; - } - - return $this->options['action'] = $value; - } - -- function SetEnctype($value=NULL){ -+ function setEnctype($value=NULL){ - if(is_null($value)){ -- return $this->DelOption("enctype"); -+ return $this->DelOption('enctype'); - } - else if(!is_string($value)){ - return $this->error("Incorrect value for SetEnctype [$value]"); - } - -- return $this->AddOption("enctype",$value); -+ return $this->addOption('enctype',$value); - } - -- function AddVar($name, $value){ -+ function addVar($name, $value){ - if(empty($value) && $value != 0) return $value; - -- return $this->AddItem(new CVar($name, $value)); -+ return $this->addItem(new CVar($name, $value)); - } - } - ?> -Index: frontends/php/include/classes/cformtable.inc.php -=================================================================== ---- frontends/php/include/classes/cformtable.inc.php (revision 6620) -+++ frontends/php/include/classes/cformtable.inc.php (revision 6621) -@@ -46,48 +46,48 @@ - } - - parent::CForm($action,$method,$enctype); -- $this->SetTitle($title); -- $this->SetAlign('center'); -- $this->SetHelp(); -+ $this->setTitle($title); -+ $this->setAlign('center'); -+ $this->setHelp(); - - // $frm_link = new CLink(); --// $frm_link->SetName("formtable"); --// $this->AddItemToTopRow($frm_link); -+// $frm_link->setName("formtable"); -+// $this->addItemToTopRow($frm_link); - -- $this->AddVar($form_variable, get_request($form_variable, 1)); -- $this->AddVar('form_refresh',get_request('form_refresh',0)+1); -+ $this->addVar($form_variable, get_request($form_variable, 1)); -+ $this->addVar('form_refresh',get_request('form_refresh',0)+1); - - $this->bottom_items = new CCol(SPACE,'form_row_last'); -- $this->bottom_items->SetColSpan(2); -+ $this->bottom_items->setColSpan(2); - } - -- function SetAction($value){ -+ function setAction($value){ - - if(is_string($value)) -- return parent::SetAction($value); -+ return parent::setAction($value); - elseif(is_null($value)) -- return parent::SetAction($value); -+ return parent::setAction($value); - else - return $this->error("Incorrect value for SetAction [$value]"); - } - -- function SetName($value){ -+ function setName($value){ - if(!is_string($value)){ - return $this->error("Incorrect value for SetAlign [$value]"); - } -- $this->AddOption('name',$value); -- $this->AddOption('id',$value); -+ $this->addOption('name',$value); -+ $this->addOption('id',$value); - return true; - } - -- function SetAlign($value){ -+ function setAlign($value){ - if(!is_string($value)){ - return $this->error("Incorrect value for SetAlign [$value]"); - } - return $this->align = $value; - } - -- function SetTitle($value=NULL){ -+ function setTitle($value=NULL){ - if(is_null($value)){ - unset($this->title); - return 0; -@@ -101,7 +101,7 @@ - $this->title = unpack_object($value); - } - -- function SetHelp($value=NULL){ -+ function setHelp($value=NULL){ - if(is_null($value)) { - $this->help = new CHelp(); - } -@@ -110,8 +110,8 @@ - } - else if(is_string($value)) { - $this->help = new CHelp($value); -- if($this->GetName()==NULL) -- $this->SetName($value); -+ if($this->getName()==NULL) -+ $this->setName($value); - } - else { - return $this->error("Incorrect value for SetHelp [$value]"); -@@ -119,21 +119,21 @@ - return 0; - } - -- function AddVar($name, $value){ -- $this->AddItemToTopRow(new CVar($name, $value)); -+ function addVar($name, $value){ -+ $this->addItemToTopRow(new CVar($name, $value)); - } - -- function AddItemToTopRow($value){ -+ function addItemToTopRow($value){ - array_push($this->top_items, $value); - } - -- function AddRow($item1, $item2=NULL, $class=NULL){ -+ function addRow($item1, $item2=NULL, $class=NULL){ - if(strtolower(get_class($item1)) == 'crow'){ - - } - else if(strtolower(get_class($item1)) == 'ctable'){ - $td = new CCol($item1,'form_row_c'); -- $td->SetColSpan(2); -+ $td->setColSpan(2); - - $item1 = new CRow($td); - } -@@ -157,7 +157,7 @@ - array_push($this->center_items, $item1); - } - -- function AddSpanRow($value, $class=NULL){ -+ function addSpanRow($value, $class=NULL){ - if(is_string($value)) - $item1=nbsp($value); - -@@ -165,16 +165,16 @@ - if(is_null($class)) $class = 'form_row_c'; - - $col = new CCol($value,$class); -- $col->SetColSpan(2); -+ $col->setColSpan(2); - array_push($this->center_items,new CRow($col)); - } - - -- function AddItemToBottomRow($value){ -- $this->bottom_items->AddItem($value); -+ function addItemToBottomRow($value){ -+ $this->bottom_items->addItem($value); - } - -- function SetTableClass($class){ -+ function setTableClass($class){ - if(is_string($class)){ - $this->tableclass = $class; - } -@@ -186,25 +186,25 @@ - - $tbl = new CTable(NULL,$this->tableclass); - -- $tbl->SetOddRowClass('form_odd_row'); -- $tbl->SetEvenRowClass('form_even_row'); -- $tbl->SetCellSpacing(0); -- $tbl->SetCellPadding(1); -- $tbl->SetAlign($this->align); -+ $tbl->setOddRowClass('form_odd_row'); -+ $tbl->setEvenRowClass('form_even_row'); -+ $tbl->setCellSpacing(0); -+ $tbl->setCellPadding(1); -+ $tbl->setAlign($this->align); - # add first row - $col = new CCol(NULL,'form_row_first'); -- $col->SetColSpan(2); -+ $col->setColSpan(2); - -- if(isset($this->help)) $col->AddItem($this->help); -- if(isset($this->title)) $col->AddItem($this->title); -- foreach($this->top_items as $item) $col->AddItem($item); -+ if(isset($this->help)) $col->addItem($this->help); -+ if(isset($this->title)) $col->addItem($this->title); -+ foreach($this->top_items as $item) $col->addItem($item); - -- $tbl->SetHeader($col); -+ $tbl->setHeader($col); - # add last row -- $tbl->SetFooter($this->bottom_items); -+ $tbl->setFooter($this->bottom_items); - # add center rows - foreach($this->center_items as $item){ -- $tbl->AddRow($item); -+ $tbl->addRow($item); - } - return $tbl->ToString(); - } - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Obtained from svn://svn.zabbix.com/branches/1.6/frontends/php/ - -This hunk adds session identifier transmission during Ajax requests. -It also reshuffles some JavaScript functions and adds many whitespace -changes. - -Index: frontends/php/js/cookies.js -=================================================================== ---- frontends/php/js/cookies.js (revision 6622) -+++ frontends/php/js/cookies.js (revision 6623) -@@ -1,78 +0,0 @@ --//Javascript document --/* --** ZABBIX --** Copyright (C) 2000-2005 SIA Zabbix --** --** This program is free software; you can redistribute it and/or modify --** it under the terms of the GNU General Public License as published by --** the Free Software Foundation; either version 2 of the License, or --** (at your option) any later version. --** --** This program is distributed in the hope that it will be useful, --** but WITHOUT ANY WARRANTY; without even the implied warranty of --** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --** GNU General Public License for more details. --** --** You should have received a copy of the GNU General Public License --** along with this program; if not, write to the Free Software --** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. --**/ --// Title: cookies class --// Description: to manipulate cookies on client side --// Author: Aly -- --var cookie ={ --cookies: new Array(), -- --init: function () { -- var allCookies = document.cookie.split('; '); -- for (var i=0;i<allCookies.length;i++) { -- var cookiePair = allCookies[i].split('='); -- this.cookies[cookiePair[0]] = cookiePair[1]; -- } --}, -- --create: function (name,value,days) { -- if(days) { -- var date = new Date(); -- date.setTime(date.getTime()+(days*24*60*60*1000)); -- var expires = "; expires="+date.toGMTString(); -- }else{ -- var expires = ""; -- } -- -- document.cookie = name+"="+value+expires+"; path=/"; -- this.cookies[name] = value; --}, -- --read : function(name){ -- if(typeof(this.cookies[name]) != 'undefined'){ -- return this.cookies[name]; -- } else { -- var nameEQ = name + "="; -- var ca = document.cookie.split(';'); -- for(var i=0;i < ca.length;i++) { -- var c = ca[i]; -- while (c.charAt(0)==' ') c = c.substring(1,c.length); -- if(c.indexOf(nameEQ) == 0) return this.cookies[name] = c.substring(nameEQ.length,c.length); -- } -- } -- return null; --}, -- --printall: function() { -- var allCookies = document.cookie.split('; '); -- for (var i=0;i<allCookies.length;i++) { -- var cookiePair = allCookies[i].split('='); -- -- alert("[" + cookiePair[0] + "] is " + cookiePair[1]); // assumes print is already defined -- } --}, -- --erase: function (name) { -- this.create(name,'',-1); -- this.cookies[name] = undefined; --} --} -- --cookie.init(); -\ No newline at end of file -Index: frontends/php/js/url.js -=================================================================== ---- frontends/php/js/url.js (revision 6622) -+++ frontends/php/js/url.js (revision 6623) -@@ -1,256 +0,0 @@ --// JavaScript Document --/* --** ZABBIX --** Copyright (C) 2000-2007 SIA Zabbix --** --** This program is free software; you can redistribute it and/or modify --** it under the terms of the GNU General Public License as published by --** the Free Software Foundation; either version 2 of the License, or --** (at your option) any later version. --** --** This program is distributed in the hope that it will be useful, --** but WITHOUT ANY WARRANTY; without even the implied warranty of --** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --** GNU General Public License for more details. --** --** You should have received a copy of the GNU General Public License --** along with this program; if not, write to the Free Software --** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. --** --*/ -- --// Title: url manipulation class --// Author: Aly -- -- --var url = Class.create(); -- --url.prototype = { --url: '', // actually, it's depricated/private variable --port: -1, --host: '', --protocol: '', --username: '', --password: '', --filr: '', --reference: '', --path: '', --query: '', --arguments: new Array(), -- --initialize: function(url){ -- this.url=unescape(url); -- -- this.query=(this.url.indexOf('?')>=0)?this.url.substring(this.url.indexOf('?')+1):''; -- if(this.query.indexOf('#')>=0) this.query=this.query.substring(0,this.query.indexOf('#')); -- -- var protocolSepIndex=this.url.indexOf('://'); -- if(protocolSepIndex>=0){ -- this.protocol=this.url.substring(0,protocolSepIndex).toLowerCase(); -- this.host=this.url.substring(protocolSepIndex+3); -- if(this.host.indexOf('/')>=0) this.host=this.host.substring(0,this.host.indexOf('/')); -- var atIndex=this.host.indexOf('@'); -- if(atIndex>=0){ -- var credentials=this.host.substring(0,atIndex); -- var colonIndex=credentials.indexOf(':'); -- if(colonIndex>=0){ -- this.username=credentials.substring(0,colonIndex); -- this.password=credentials.substring(colonIndex); -- }else{ -- this.username=credentials; -- } -- this.host=this.host.substring(atIndex+1); -- } -- -- var host_ipv6 = this.host.indexOf(']'); -- if(host_ipv6>=0){ -- if(host_ipv6 < (this.host.length-1)){ -- host_ipv6++; -- var host_less = this.host.substring(host_ipv6); -- -- var portColonIndex=host_less.indexOf(':'); -- if(portColonIndex>=0){ -- this.port=host_less.substring(portColonIndex+1); -- this.host=this.host.substring(0,host_ipv6); -- } -- } -- } -- else{ -- var portColonIndex=this.host.indexOf(':'); -- if(portColonIndex>=0){ -- this.port=this.host.substring(portColonIndex+1); -- this.host=this.host.substring(0,portColonIndex); -- } -- } -- this.file=this.url.substring(protocolSepIndex+3); -- this.file=this.file.substring(this.file.indexOf('/')); -- }else{ -- this.file=this.url; -- } -- if(this.file.indexOf('?')>=0) this.file=this.file.substring(0, this.file.indexOf('?')); -- -- var refSepIndex=url.indexOf('#'); -- if(refSepIndex>=0){ -- this.file=this.file.substring(0,refSepIndex); -- this.reference=this.url.substring(this.url.indexOf('#')); -- } -- this.path=this.file; -- if(this.query.length>0) this.file+='?'+this.query; -- if(this.reference.length>0) this.file+='#'+this.reference; -- if(this.query.length > 0) this.getArguments(); --}, -- --getArguments: function(){ -- var args=this.query.split('&'); -- var keyval=''; -- -- if(args.length<1) return; -- -- for(i=0;i<args.length;i++){ -- keyval=args[i].split('='); -- this.arguments[i] = new Array(keyval[0],(keyval.length==1)?keyval[0]:keyval[1]); -- } --}, -- --getArgumentValue: function(key){ -- if(key.length<1) return ''; -- for(i=0; i < this.arguments.length; i++){ -- if(this.arguments[i][0] == key) return this.arguments[i][1]; -- } -- --return ''; --}, -- --getArgumentValues: function(){ -- var a=new Array(); -- var b=this.query.split('&'); -- var c=''; -- if(b.length<1) return a; -- for(i=0;i<b.length;i++){ -- c=b[i].split('='); -- a[i]=new Array(c[0],((c.length==1)?c[0]:c[1])); -- } --return a; --}, -- --getUrl: function(){ -- var uri = (this.protocol.length > 0)?(this.protocol+'://'):''; -- uri += encodeURI((this.username.length > 0)?(this.username):''); -- uri += encodeURI((this.password.length > 0)?(':'+this.password):''); -- uri += (this.host.length > 0)?(this.host):''; -- uri += (this.port.length > 0)?(':'+this.port):''; -- uri += encodeURI((this.path.length > 0)?(this.path):''); -- uri += encodeURI((this.query.length > 0)?('?'+this.query):''); -- uri += encodeURI((this.reference.length > 0)?('#'+this.reference):''); --// alert(uri.getProtocol()+' : '+uri.getHost()+' : '+uri.getPort()+' : '+uri.getPath()+' : '+uri.getQuery()); --return uri; --}, -- --setArgument: function(key,value){ -- -- var valueisset = false; -- if(typeof(key) == 'undefined') throw 'Invalid argument past for setArgument'; -- -- value =('undefined' != typeof(value))?value:''; -- -- for(i=0; i < this.arguments.length; i++){ -- if(this.arguments[i][0] == key){ -- valueisset = true; -- this.arguments[i][1] = value; -- } -- } -- if(!valueisset) this.arguments[this.arguments.length] = new Array(key,value); -- this.formatQuery(); --}, -- --formatQuery: function(){ -- if(this.arguments.lenght < 1) return; -- -- var query = ''; -- for(i=0; i < this.arguments.length; i++){ -- query+=this.arguments[i][0]+'='+this.arguments[i][1]+'&'; -- } -- this.query = query.substring(0,query.length-1); --}, -- --getPort: function(){ -- return this.port; --}, -- --setPort: function(port){ -- this.port = port; --}, -- --getQuery: function(){ -- return this.query; --}, -- --setQuery: function(query){ -- this.query = query; -- this.getArgumentValues(); -- this.formatQuery(); --}, -- --/* Returns the protocol of this URL, i.e. 'http' in the url 'http://server/' */ --getProtocol: function(){ -- return this.protocol; --}, -- --setProtocol: function(protocol){ -- this.protocol = protocol; --}, --/* Returns the host name of this URL, i.e. 'server.com' in the url 'http://server.com/' */ --getHost: function(){ -- return this.host; --}, -- --setHost: function(set){ -- this.host = host; --}, -- --/* Returns the user name part of this URL, i.e. 'joe' in the url 'http://joe@server.com/' */ --getUserName: function(){ -- return this.username; --}, -- --setUserName: function(username){ -- this.username = username; --}, -- --/* Returns the password part of this url, i.e. 'secret' in the url 'http://joe:secret@server.com/' */ --getPassword: function(){ -- return this.password; --}, -- --setPassword: function(password){ -- this.password = password; --}, -- --/* Returns the file part of this url, i.e. everything after the host name. */ --getFile: function(){ -- return this.file = file; --}, -- --setFile: function(file){ -- this.file = file; --}, -- --/* Returns the reference of this url, i.e. 'bookmark' in the url 'http://server/file.html#bookmark' */ --getReference: function(){ -- return this.reference; --}, -- --setReference: function(reference){ -- this.reference = reference; --}, -- --/* Returns the file path of this url, i.e. '/dir/file.html' in the url 'http://server/dir/file.html' */ --getPath: function(){ -- return this.path; --}, -- --setPath: function(path){ -- this.path = path; --} -- --} -\ No newline at end of file -Index: frontends/php/js/updater.js -=================================================================== ---- frontends/php/js/updater.js (revision 6622) -+++ frontends/php/js/updater.js (revision 6623) -@@ -27,7 +27,7 @@ - - setObj4Update: function(id,frequency,url,params){ - var obj = document.getElementById(id); -- if((typeof(obj) == 'undefined')) return false; -+ if(typeof(obj) == 'undefined') return false; - - var obj4update = { - 'id': id, -@@ -65,7 +65,9 @@ - obj4update.ready = false; - - var uri = new url(obj4update.url); -- new Ajax.Updater(obj4update.id, obj4update.url, -+ uri.setArgument('sessionid', cookie.read('zbx_sessionid')); -+ -+ new Ajax.Updater(obj4update.id, uri.getUrl(),//obj4update.url, - { - method: 'post', - 'parameters': obj4update.params, -Index: frontends/php/js/gpc.js -=================================================================== ---- frontends/php/js/gpc.js (revision 0) -+++ frontends/php/js/gpc.js (revision 6623) -@@ -0,0 +1,315 @@ -+//Javascript document -+/* -+** ZABBIX -+** Copyright (C) 2000-2009 SIA Zabbix -+** -+** This program is free software; you can redistribute it and/or modify -+** it under the terms of the GNU General Public License as published by -+** the Free Software Foundation; either version 2 of the License, or -+** (at your option) any later version. -+** -+** This program is distributed in the hope that it will be useful, -+** but WITHOUT ANY WARRANTY; without even the implied warranty of -+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+** GNU General Public License for more details. -+** -+** You should have received a copy of the GNU General Public License -+** along with this program; if not, write to the Free Software -+** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+**/ -+ -+// Title: cookies class -+// Description: to manipulate cookies on client side -+// Author: Aly -+var cookie ={ -+cookies: new Array(), -+ -+init: function () { -+ var allCookies = document.cookie.split('; '); -+ for (var i=0;i<allCookies.length;i++) { -+ var cookiePair = allCookies[i].split('='); -+ this.cookies[cookiePair[0]] = cookiePair[1]; -+ } -+}, -+ -+create: function (name,value,days) { -+ if(days) { -+ var date = new Date(); -+ date.setTime(date.getTime()+(days*24*60*60*1000)); -+ var expires = "; expires="+date.toGMTString(); -+ } -+ else{ -+ var expires = ""; -+ } -+ -+ document.cookie = name+"="+value+expires+"; path=/"; -+ this.cookies[name] = value; -+}, -+ -+read : function(name){ -+ if(typeof(this.cookies[name]) != 'undefined'){ -+ return this.cookies[name]; -+ } -+ else { -+ var nameEQ = name + "="; -+ var ca = document.cookie.split(';'); -+ for(var i=0;i < ca.length;i++) { -+ var c = ca[i]; -+ while (c.charAt(0)==' ') c = c.substring(1,c.length); -+ if(c.indexOf(nameEQ) == 0) return this.cookies[name] = c.substring(nameEQ.length,c.length); -+ } -+ } -+ return null; -+}, -+ -+printall: function() { -+ var allCookies = document.cookie.split('; '); -+ for(var i=0;i<allCookies.length;i++){ -+ var cookiePair = allCookies[i].split('='); -+ -+ alert("[" + cookiePair[0] + "] is " + cookiePair[1]); // assumes print is already defined -+ } -+}, -+ -+erase: function (name) { -+ this.create(name,'',-1); -+ this.cookies[name] = undefined; -+} -+} -+ -+cookie.init(); -+ -+ -+ -+// Title: url manipulation class -+// Author: Aly -+var url = Class.create(); -+ -+url.prototype = { -+url: '', // actually, it's depricated/private variable -+port: -1, -+host: '', -+protocol: '', -+username: '', -+password: '', -+filr: '', -+reference: '', -+path: '', -+query: '', -+arguments: new Array(), -+ -+initialize: function(url){ -+ this.url=unescape(url); -+ -+ this.query=(this.url.indexOf('?')>=0)?this.url.substring(this.url.indexOf('?')+1):''; -+ if(this.query.indexOf('#')>=0) this.query=this.query.substring(0,this.query.indexOf('#')); -+ -+ var protocolSepIndex=this.url.indexOf('://'); -+ if(protocolSepIndex>=0){ -+ this.protocol=this.url.substring(0,protocolSepIndex).toLowerCase(); -+ this.host=this.url.substring(protocolSepIndex+3); -+ if(this.host.indexOf('/')>=0) this.host=this.host.substring(0,this.host.indexOf('/')); -+ var atIndex=this.host.indexOf('@'); -+ if(atIndex>=0){ -+ var credentials=this.host.substring(0,atIndex); -+ var colonIndex=credentials.indexOf(':'); -+ if(colonIndex>=0){ -+ this.username=credentials.substring(0,colonIndex); -+ this.password=credentials.substring(colonIndex); -+ }else{ -+ this.username=credentials; -+ } -+ this.host=this.host.substring(atIndex+1); -+ } -+ -+ var host_ipv6 = this.host.indexOf(']'); -+ if(host_ipv6>=0){ -+ if(host_ipv6 < (this.host.length-1)){ -+ host_ipv6++; -+ var host_less = this.host.substring(host_ipv6); -+ -+ var portColonIndex=host_less.indexOf(':'); -+ if(portColonIndex>=0){ -+ this.port=host_less.substring(portColonIndex+1); -+ this.host=this.host.substring(0,host_ipv6); -+ } -+ } -+ } -+ else{ -+ var portColonIndex=this.host.indexOf(':'); -+ if(portColonIndex>=0){ -+ this.port=this.host.substring(portColonIndex+1); -+ this.host=this.host.substring(0,portColonIndex); -+ } -+ } -+ this.file=this.url.substring(protocolSepIndex+3); -+ this.file=this.file.substring(this.file.indexOf('/')); -+ }else{ -+ this.file=this.url; -+ } -+ if(this.file.indexOf('?')>=0) this.file=this.file.substring(0, this.file.indexOf('?')); -+ -+ var refSepIndex=url.indexOf('#'); -+ if(refSepIndex>=0){ -+ this.file=this.file.substring(0,refSepIndex); -+ this.reference=this.url.substring(this.url.indexOf('#')); -+ } -+ this.path=this.file; -+ if(this.query.length>0) this.file+='?'+this.query; -+ if(this.reference.length>0) this.file+='#'+this.reference; -+ if(this.query.length > 0) this.getArguments(); -+}, -+ -+getArguments: function(){ -+ var args=this.query.split('&'); -+ var keyval=''; -+ -+ if(args.length<1) return; -+ -+ for(i=0;i<args.length;i++){ -+ keyval=args[i].split('='); -+ this.arguments[i] = new Array(keyval[0],(keyval.length==1)?keyval[0]:keyval[1]); -+ } -+}, -+ -+getArgumentValue: function(key){ -+ if(key.length<1) return ''; -+ for(i=0; i < this.arguments.length; i++){ -+ if(this.arguments[i][0] == key) return this.arguments[i][1]; -+ } -+ -+return ''; -+}, -+ -+getArgumentValues: function(){ -+ var a=new Array(); -+ var b=this.query.split('&'); -+ var c=''; -+ if(b.length<1) return a; -+ for(i=0;i<b.length;i++){ -+ c=b[i].split('='); -+ a[i]=new Array(c[0],((c.length==1)?c[0]:c[1])); -+ } -+return a; -+}, -+ -+getUrl: function(){ -+ var uri = (this.protocol.length > 0)?(this.protocol+'://'):''; -+ uri += encodeURI((this.username.length > 0)?(this.username):''); -+ uri += encodeURI((this.password.length > 0)?(':'+this.password):''); -+ uri += (this.host.length > 0)?(this.host):''; -+ uri += (this.port.length > 0)?(':'+this.port):''; -+ uri += encodeURI((this.path.length > 0)?(this.path):''); -+ uri += encodeURI((this.query.length > 0)?('?'+this.query):''); -+ uri += encodeURI((this.reference.length > 0)?('#'+this.reference):''); -+// alert(uri.getProtocol()+' : '+uri.getHost()+' : '+uri.getPort()+' : '+uri.getPath()+' : '+uri.getQuery()); -+return uri; -+}, -+ -+setArgument: function(key,value){ -+ -+ var valueisset = false; -+ if(typeof(key) == 'undefined') throw 'Invalid argument past for setArgument'; -+ -+ value =('undefined' != typeof(value))?value:''; -+ -+ for(i=0; i < this.arguments.length; i++){ -+ if(this.arguments[i][0] == key){ -+ valueisset = true; -+ this.arguments[i][1] = value; -+ } -+ } -+ if(!valueisset) this.arguments[this.arguments.length] = new Array(key,value); -+ this.formatQuery(); -+}, -+ -+formatQuery: function(){ -+ if(this.arguments.lenght < 1) return; -+ -+ var query = ''; -+ for(i=0; i < this.arguments.length; i++){ -+ query+=this.arguments[i][0]+'='+this.arguments[i][1]+'&'; -+ } -+ this.query = query.substring(0,query.length-1); -+}, -+ -+getPort: function(){ -+ return this.port; -+}, -+ -+setPort: function(port){ -+ this.port = port; -+}, -+ -+getQuery: function(){ -+ return this.query; -+}, -+ -+setQuery: function(query){ -+ this.query = query; -+ this.getArgumentValues(); -+ this.formatQuery(); -+}, -+ -+/* Returns the protocol of this URL, i.e. 'http' in the url 'http://server/' */ -+getProtocol: function(){ -+ return this.protocol; -+}, -+ -+setProtocol: function(protocol){ -+ this.protocol = protocol; -+}, -+/* Returns the host name of this URL, i.e. 'server.com' in the url 'http://server.com/' */ -+getHost: function(){ -+ return this.host; -+}, -+ -+setHost: function(set){ -+ this.host = host; -+}, -+ -+/* Returns the user name part of this URL, i.e. 'joe' in the url 'http://joe@server.com/' */ -+getUserName: function(){ -+ return this.username; -+}, -+ -+setUserName: function(username){ -+ this.username = username; -+}, -+ -+/* Returns the password part of this url, i.e. 'secret' in the url 'http://joe:secret@server.com/' */ -+getPassword: function(){ -+ return this.password; -+}, -+ -+setPassword: function(password){ -+ this.password = password; -+}, -+ -+/* Returns the file part of this url, i.e. everything after the host name. */ -+getFile: function(){ -+ return this.file = file; -+}, -+ -+setFile: function(file){ -+ this.file = file; -+}, -+ -+/* Returns the reference of this url, i.e. 'bookmark' in the url 'http://server/file.html#bookmark' */ -+getReference: function(){ -+ return this.reference; -+}, -+ -+setReference: function(reference){ -+ this.reference = reference; -+}, -+ -+/* Returns the file path of this url, i.e. '/dir/file.html' in the url 'http://server/dir/file.html' */ -+getPath: function(){ -+ return this.path; -+}, -+ -+setPath: function(path){ -+ this.path = path; -+} -+} -\ No newline at end of file -Index: frontends/php/js/ajax_req.js -=================================================================== ---- frontends/php/js/ajax_req.js (revision 6622) -+++ frontends/php/js/ajax_req.js (revision 6623) -@@ -19,6 +19,8 @@ - **/ - - function send_params(params){ -+ if(typeof(params) == 'undefined') var params = new Array(); -+ params['sessionid'] = cookie.read('zbx_sessionid'); - - var uri = new url(location.href); - new Ajax.Request(uri.getPath()+"?output=ajax", -Index: frontends/php/dashboard.php -=================================================================== ---- frontends/php/dashboard.php (revision 6622) -+++ frontends/php/dashboard.php (revision 6623) -@@ -42,8 +42,8 @@ - 'view_style'=> array(T_ZBX_INT, O_OPT, P_SYS, IN('0,1'), NULL), - 'type'=> array(T_ZBX_INT, O_OPT, P_SYS, IN('0,1'), NULL), - -- 'output'=> array(T_ZBX_STR, O_OPT, P_ACT, NULL, NULL), -- 'jsscriptid'=> array(T_ZBX_STR, O_OPT, P_ACT, NULL, NULL), -+ 'output'=> array(T_ZBX_STR, O_OPT, P_SYS, NULL, NULL), -+ 'jsscriptid'=> array(T_ZBX_STR, O_OPT, P_SYS, NULL, NULL), - 'fullscreen'=> array(T_ZBX_INT, O_OPT, P_SYS, IN('0,1'), NULL), - - //ajax -@@ -56,7 +56,7 @@ - ); - - check_fields($fields); -- -+ - $available_hosts = get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_ONLY, PERM_RES_IDS_ARRAY); - // ACTION ///////////////////////////////////////////////////////////////////////////// - if(isset($_REQUEST['favobj'])){ -Index: frontends/php/include/page_header.php -=================================================================== ---- frontends/php/include/page_header.php (revision 6622) -+++ frontends/php/include/page_header.php (revision 6623) -@@ -428,8 +428,8 @@ - - <script type="text/javascript" src="js/prototype.js"></script> - <script type="text/javascript" src="js/common.js"></script> -+<script type="text/javascript" src="js/gpc.js"></script> - <script type="text/javascript" src="js/ajax_req.js"></script> --<script type="text/javascript" src="js/url.js"></script> - <script type="text/javascript" src="js/chkbxrange.js"></script> - <?php - if(isset($page['scripts']) && is_array($page['scripts'])){ -Index: frontends/php/include/validate.inc.php -=================================================================== ---- frontends/php/include/validate.inc.php (revision 6622) -+++ frontends/php/include/validate.inc.php (revision 6623) -@@ -432,7 +432,7 @@ - if(!isset($_REQUEST[$field])){ - return ZBX_VALID_OK; - } -- else if(($flags&P_ACT) && !isset($_REQUEST['zbx_form'])){ -+ else if(($flags&P_ACT) && !isset($_REQUEST['sessionid'])){ - return ZBX_VALID_ERROR; - } - } -@@ -465,8 +465,7 @@ - - // VAR TYPE OPTIONAL FLAGS VALIDATION EXCEPTION - $system_fields=array( -- 'sessionid'=> array(T_ZBX_STR, O_OPT, P_SYS, HEX(), 'isset({zbx_form})'), -- 'zbx_form'=> array(T_ZBX_STR, O_OPT, P_SYS, NOT_EMPTY, NULL), -+ 'sessionid'=> array(T_ZBX_STR, O_OPT, P_SYS, HEX(), NULL), - // - 'switch_node'=> array(T_ZBX_INT, O_OPT, P_SYS, DB_ID,NULL), - 'triggers_hash'=> array(T_ZBX_STR, O_OPT, P_SYS, NOT_EMPTY,NULL), -Index: frontends/php/include/classes/ctree.inc.php -=================================================================== ---- frontends/php/include/classes/ctree.inc.php (revision 6622) -+++ frontends/php/include/classes/ctree.inc.php (revision 6623) -@@ -214,7 +214,6 @@ - global $page; - $js = ' - <script src="js/tree.js" type="text/javascript"></script> -- <script src="js/cookies.js" type="text/javascript"></script> - <script type="text/javascript"> - var treenode = new Array(0); - var tree_name = "tree_'.$this->getUserAlias().'_'.$page["file"].'"; -Index: frontends/php/include/classes/cform.inc.php -=================================================================== ---- frontends/php/include/classes/cform.inc.php (revision 6622) -+++ frontends/php/include/classes/cform.inc.php (revision 6623) -@@ -27,7 +27,6 @@ - $this->setAction($action); - $this->setEnctype($enctype); - -- $this->addVar('zbx_form', 'action'); - $this->addVar('sessionid', $_COOKIE['zbx_sessionid']); - } - -Index: frontends/php/index.php -=================================================================== ---- frontends/php/index.php (revision 6622) -+++ frontends/php/index.php (revision 6623) -@@ -33,8 +33,8 @@ - "password"=> array(T_ZBX_STR, O_OPT, NULL, NULL, 'isset({enter})'), - "sessionid"=> array(T_ZBX_STR, O_OPT, NULL, NULL, NULL), - "message"=> array(T_ZBX_STR, O_OPT, NULL, NULL, NULL), -- "reconnect"=> array(T_ZBX_INT, O_OPT, P_ACT, BETWEEN(0,65535),NULL), -- "enter"=> array(T_ZBX_STR, O_OPT, P_SYS|P_ACT, NULL, NULL), -+ "reconnect"=> array(T_ZBX_INT, O_OPT, NULL, BETWEEN(0,65535),NULL), -+ "enter"=> array(T_ZBX_STR, O_OPT, P_SYS, NULL, NULL), - "form"=> array(T_ZBX_STR, O_OPT, P_SYS, NULL, NULL), - "form_refresh"=> array(T_ZBX_INT, O_OPT, NULL, NULL, NULL) - ); - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Obtained from svn://svn.zabbix.com/branches/1.6/frontends/php/ - -Checks if 'zbx_sessionid' cookie is really here before setting -'sessionid' variable. - -Index: frontends/php/include/classes/cform.inc.php -=================================================================== ---- frontends/php/include/classes/cform.inc.php (revision 6624) -+++ frontends/php/include/classes/cform.inc.php (revision 6625) -@@ -27,7 +27,8 @@ - $this->setAction($action); - $this->setEnctype($enctype); - -- $this->addVar('sessionid', $_COOKIE['zbx_sessionid']); -+ if(isset($_COOKIE['zbx_sessionid'])) -+ $this->addVar('sessionid', $_COOKIE['zbx_sessionid']); - } - - function setMethod($value='post'){ - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Obtained from svn://svn.zabbix.com/branches/1.6/frontends/php/ - -This hunk basically trades the name 'sessionid' for 'sid'. It also -reshuffles many functions, adds many whitespace changes and implants -URL manipulation tools for JavaScript. - -Index: frontends/php/users.php -=================================================================== ---- frontends/php/users.php (revision 6643) -+++ frontends/php/users.php (revision 6644) -@@ -1,7 +1,7 @@ - <?php - /* - ** ZABBIX --** Copyright (C) 2000-2005 SIA Zabbix -+** Copyright (C) 2000-2009 SIA Zabbix - ** - ** This program is free software; you can redistribute it and/or modify - ** it under the terms of the GNU General Public License as published by -@@ -24,6 +24,7 @@ - require_once('include/media.inc.php'); - require_once('include/users.inc.php'); - require_once('include/forms.inc.php'); -+ require_once('include/classes/curl.inc.php'); - require_once('include/js.inc.php'); - - $page['title'] = 'S_USERS'; -@@ -32,7 +33,6 @@ - $page['scripts'] = array('menu_scripts.js'); - - include_once('include/page_header.php'); -- - ?> - <?php - $_REQUEST['config']=get_request('config',get_profile('web.users.config',0)); -Index: frontends/php/js/menu.js -=================================================================== ---- frontends/php/js/menu.js (revision 6643) -+++ frontends/php/js/menu.js (revision 6644) -@@ -386,8 +386,13 @@ - this.n_y -= this.getprop('height') * (o_parent.a_config.length - item_offset); - } - -+ if(!is_null(this.a_config[1]) && (this.a_config[1].indexOf('javascript') == -1)){ -+ var uri = new url(this.a_config[1]); -+ this.a_config[1] = uri.getUrl(); -+ } -+ - // generate item's HMTL -- var el = document.createElement("a"); -+ var el = document.createElement('a'); - el.setAttribute('id', 'e' + o_root.n_id + '_' + this.n_id + 'o'); - el.setAttribute('href', this.a_config[1]); - -Index: frontends/php/js/updater.js -=================================================================== ---- frontends/php/js/updater.js (revision 6643) -+++ frontends/php/js/updater.js (revision 6644) -@@ -65,8 +65,6 @@ - obj4update.ready = false; - - var uri = new url(obj4update.url); -- uri.setArgument('sessionid', cookie.read('zbx_sessionid')); -- - new Ajax.Updater(obj4update.id, uri.getUrl(),//obj4update.url, - { - method: 'post', -Index: frontends/php/js/gpc.js -=================================================================== ---- frontends/php/js/gpc.js (revision 6643) -+++ frontends/php/js/gpc.js (revision 6644) -@@ -96,7 +96,7 @@ - reference: '', - path: '', - query: '', --arguments: new Array(), -+arguments: {}, - - initialize: function(url){ - this.url=unescape(url); -@@ -116,7 +116,8 @@ - if(colonIndex>=0){ - this.username=credentials.substring(0,colonIndex); - this.password=credentials.substring(colonIndex); -- }else{ -+ } -+ else{ - this.username=credentials; - } - this.host=this.host.substring(atIndex+1); -@@ -144,9 +145,11 @@ - } - this.file=this.url.substring(protocolSepIndex+3); - this.file=this.file.substring(this.file.indexOf('/')); -- }else{ -+ } -+ else{ - this.file=this.url; - } -+ - if(this.file.indexOf('?')>=0) this.file=this.file.substring(0, this.file.indexOf('?')); - - var refSepIndex=url.indexOf('#'); -@@ -157,42 +160,51 @@ - this.path=this.file; - if(this.query.length>0) this.file+='?'+this.query; - if(this.reference.length>0) this.file+='#'+this.reference; -- if(this.query.length > 0) this.getArguments(); -+ if(this.query.length > 0) this.formatArguments(); -+ -+ var sid = cookie.read('zbx_sessionid'); -+ this.setArgument('sid', sid.substring(16)); - }, - --getArguments: function(){ -+ -+formatQuery: function(){ -+ if(this.arguments.lenght < 1) return; -+ -+ var query = ''; -+ for(var key in this.arguments){ -+ if(typeof(this.arguments[key]) != 'undefined'){ -+ query+=key+'='+this.arguments[key]+'&'; -+ } -+ } -+ this.query = query.substring(0,query.length-1); -+}, -+ -+formatArguments: function(){ - var args=this.query.split('&'); - var keyval=''; -- -+ - if(args.length<1) return; - -- for(i=0;i<args.length;i++){ -- keyval=args[i].split('='); -- this.arguments[i] = new Array(keyval[0],(keyval.length==1)?keyval[0]:keyval[1]); -+ for(i=0; i<args.length; i++){ -+ keyval = args[i].split('='); -+ this.arguments[keyval[0]] = (keyval.length>1)?keyval[1]:''; - } - }, - --getArgumentValue: function(key){ -- if(key.length<1) return ''; -- for(i=0; i < this.arguments.length; i++){ -- if(this.arguments[i][0] == key) return this.arguments[i][1]; -- } -- --return ''; -+setArgument: function(key,value){ -+ this.arguments[key] = value; -+ this.formatQuery(); - }, - --getArgumentValues: function(){ -- var a=new Array(); -- var b=this.query.split('&'); -- var c=''; -- if(b.length<1) return a; -- for(i=0;i<b.length;i++){ -- c=b[i].split('='); -- a[i]=new Array(c[0],((c.length==1)?c[0]:c[1])); -- } --return a; -+getArgument: function(key){ -+ if(typeof(this.arguments[key]) != 'undefined') return this.arguments[key]; -+ else return null; - }, - -+getArguments: function(){ -+ return this.arguments; -+}, -+ - getUrl: function(){ - var uri = (this.protocol.length > 0)?(this.protocol+'://'):''; - uri += encodeURI((this.username.length > 0)?(this.username):''); -@@ -206,51 +218,30 @@ - return uri; - }, - --setArgument: function(key,value){ -- -- var valueisset = false; -- if(typeof(key) == 'undefined') throw 'Invalid argument past for setArgument'; -- -- value =('undefined' != typeof(value))?value:''; -- -- for(i=0; i < this.arguments.length; i++){ -- if(this.arguments[i][0] == key){ -- valueisset = true; -- this.arguments[i][1] = value; -- } -- } -- if(!valueisset) this.arguments[this.arguments.length] = new Array(key,value); -- this.formatQuery(); -+setPort: function(port){ -+ this.port = port; - }, - --formatQuery: function(){ -- if(this.arguments.lenght < 1) return; -- -- var query = ''; -- for(i=0; i < this.arguments.length; i++){ -- query+=this.arguments[i][0]+'='+this.arguments[i][1]+'&'; -- } -- this.query = query.substring(0,query.length-1); --}, -- - getPort: function(){ - return this.port; - }, - --setPort: function(port){ -- this.port = port; -+setQuery: function(query){ -+ this.query = query; -+ if(this.query.indexOf('?')>=0){ -+ this.query= this.query.substring(this.query.indexOf('?')+1); -+ } -+ -+ this.formatArguments(); -+ -+ var sid = cookie.read('zbx_sessionid'); -+ this.setArgument('sid', sid.substring(16)); - }, - - getQuery: function(){ - return this.query; - }, - --setQuery: function(query){ -- this.query = query; -- this.getArgumentValues(); -- this.formatQuery(); --}, -- - /* Returns the protocol of this URL, i.e. 'http' in the url 'http://server/' */ - getProtocol: function(){ - return this.protocol; -@@ -264,7 +255,7 @@ - return this.host; - }, - --setHost: function(set){ -+setHost: function(host){ - this.host = host; - }, - -@@ -288,7 +279,7 @@ - - /* Returns the file part of this url, i.e. everything after the host name. */ - getFile: function(){ -- return this.file = file; -+ return this.file; - }, - - setFile: function(file){ -Index: frontends/php/js/menu_scripts.js -=================================================================== ---- frontends/php/js/menu_scripts.js (revision 6643) -+++ frontends/php/js/menu_scripts.js (revision 6644) -@@ -64,7 +64,7 @@ - for(var i=0; i < menu_usrgrp_gui.length; i++){ - if((typeof(menu_usrgrp_gui[i]) != 'undefined') && !empty(menu_usrgrp_gui[i])){ - var row = menu_usrgrp_gui[i]; -- var menu_row = new Array(row.name,"users.php?config=0&form=update&grpaction=1&userid="+userid+"&usrgrpid="+row.usrgrpid); -+ var menu_row = new Array(row.name,'users.php?config=0&form=update&grpaction=1&userid='+userid+'&usrgrpid='+row.usrgrpid); - grp_gui_add_to.push(menu_row); - } - } -@@ -73,7 +73,7 @@ - for(var i=0; i < usr_grp_gui_in.length; i++){ - if((typeof(usr_grp_all_in[i]) != 'undefined') && !empty(usr_grp_gui_in[i])){ - var row = usr_grp_gui_in[i]; -- var menu_row = new Array(row.name,"users.php?config=0&form=update&grpaction=0&userid="+userid+"&usrgrpid="+row.usrgrpid); -+ var menu_row = new Array(row.name,'users.php?config=0&form=update&grpaction=0&userid='+userid+'&usrgrpid='+row.usrgrpid); - grp_gui_rmv_frm.push(menu_row); - } - } -@@ -89,7 +89,7 @@ - for(var i=0; i < menu_usrgrp_status.length; i++){ - if((typeof(menu_usrgrp_status[i]) != 'undefined') && !empty(menu_usrgrp_status[i])){ - var row = menu_usrgrp_status[i]; -- var menu_row = new Array(row.name,"users.php?config=0&form=update&grpaction=1&userid="+userid+"&usrgrpid="+row.usrgrpid); -+ var menu_row = new Array(row.name,'users.php?config=0&form=update&grpaction=1&userid='+userid+'&usrgrpid='+row.usrgrpid); - grp_status_add_to.push(menu_row); - } - } -@@ -98,7 +98,7 @@ - for(var i=0; i < usr_grp_status_in.length; i++){ - if((typeof(usr_grp_status_in[i]) != 'undefined') && !empty(usr_grp_status_in[i])){ - var row = usr_grp_status_in[i]; -- var menu_row = new Array(row.name,"users.php?config=0&form=update&grpaction=0&userid="+userid+"&usrgrpid="+row.usrgrpid); -+ var menu_row = new Array(row.name,'users.php?config=0&form=update&grpaction=0&userid='+userid+'&usrgrpid='+row.usrgrpid); - grp_status_rmv_frm.push(menu_row); - } - } -Index: frontends/php/js/common.js -=================================================================== ---- frontends/php/js/common.js (revision 6643) -+++ frontends/php/js/common.js (revision 6644) -@@ -82,6 +82,16 @@ - div_help.appendChild(document.createElement("br")); - } - -+function SDJ(obj){ -+ var debug = ''; -+ for(var key in obj) { -+ var value = obj[key]; -+ debug+=key+': '+value+'\n'; -+ } -+ SDI('\n'+debug); -+} -+ -+ - /// Alpha-Betic sorting - - function addListener(element, eventname, expression, bubbling){ -Index: frontends/php/js/ajax_req.js -=================================================================== ---- frontends/php/js/ajax_req.js (revision 6643) -+++ frontends/php/js/ajax_req.js (revision 6644) -@@ -20,14 +20,16 @@ - - function send_params(params){ - if(typeof(params) == 'undefined') var params = new Array(); -- params['sessionid'] = cookie.read('zbx_sessionid'); - - var uri = new url(location.href); -- new Ajax.Request(uri.getPath()+"?output=ajax", -+ uri.setQuery('?output=ajax'); -+ -+ new Ajax.Request(uri.getUrl(), - { - 'method': 'post', - 'parameters':params, -- 'onSuccess': function(resp){ },//alert(resp.responseText); -+ 'onSuccess': function(resp){ }, -+// 'onSuccess': function(resp){ alert(resp.responseText); }, - 'onFailure': function(){ document.location = uri.getPath()+'?'+Object.toQueryString(params); } - } - ); -Index: frontends/php/dashboard.php -=================================================================== ---- frontends/php/dashboard.php (revision 6643) -+++ frontends/php/dashboard.php (revision 6644) -@@ -54,7 +54,7 @@ - 'action'=> array(T_ZBX_STR, O_OPT, P_ACT, IN("'add','remove'"),NULL), - 'state'=> array(T_ZBX_INT, O_OPT, P_ACT, NOT_EMPTY, 'isset({favobj}) && ("hat"=={favobj})'), - ); -- -+ - check_fields($fields); - - $available_hosts = get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_ONLY, PERM_RES_IDS_ARRAY); -@@ -179,11 +179,11 @@ - $p_elements = array(); - // Header - -- $url = '?fullscreen='.($_REQUEST['fullscreen']?'0':'1'); -+ $url = new Curl('?fullscreen='.($_REQUEST['fullscreen']?'0':'1')); - - $fs_icon = new CDiv(SPACE,'fullscreen'); - $fs_icon->AddOption('title',$_REQUEST['fullscreen']?S_NORMAL.' '.S_VIEW:S_FULLSCREEN); -- $fs_icon->AddAction('onclick',new CScript("javascript: document.location = '".$url."';")); -+ $fs_icon->AddAction('onclick',new CScript("javascript: document.location = '".$url->getUrl()."';")); - //------------- - - $left_tab = new CTable(); -Index: frontends/php/include/func.inc.php -=================================================================== ---- frontends/php/include/func.inc.php (revision 6643) -+++ frontends/php/include/func.inc.php (revision 6644) -@@ -344,6 +344,18 @@ - return $pos; - } - -+function zbx_substring($haystack, $start, $end=null){ -+ if($end < $start) return ''; -+ -+ $len = zbx_strlen($haystack); -+ if(is_null($end)) -+ $result = substr($haystack, $start); -+ else -+ $result = substr($haystack, $start, ($end - $start)); -+ -+return $result; -+} -+ - function uint_in_array($needle,$haystack){ - foreach($haystack as $id => $value) - if(bccomp($needle,$value) == 0) return true; -Index: frontends/php/include/screens.inc.php -=================================================================== ---- frontends/php/include/screens.inc.php (revision 6643) -+++ frontends/php/include/screens.inc.php (revision 6644) -@@ -886,7 +886,7 @@ - $action = 'screenedit.php?form=update'.url_param('screenid').'&x='.$c.'&y='.$r.'#form'; - else - $action = NULL; -- -+ - if($editmode == 1 && isset($_REQUEST["form"]) && - isset($_REQUEST["x"]) && $_REQUEST["x"]==$c && - isset($_REQUEST["y"]) && $_REQUEST["y"]==$r) -Index: frontends/php/include/perm.inc.php -=================================================================== ---- frontends/php/include/perm.inc.php (revision 6643) -+++ frontends/php/include/perm.inc.php (revision 6644) -@@ -44,7 +44,7 @@ - $USER_DETAILS = NULL; - $login = FALSE; - -- $sessionid = get_request('sessionid',get_cookie('zbx_sessionid')); -+ $sessionid = get_cookie('zbx_sessionid'); - - if(!is_null($sessionid)){ - $sql = 'SELECT u.*,s.* '. -Index: frontends/php/include/config.inc.php -=================================================================== ---- frontends/php/include/config.inc.php (revision 6643) -+++ frontends/php/include/config.inc.php (revision 6644) -@@ -65,6 +65,7 @@ - require_once('include/classes/cpumenu.inc.php'); - require_once('include/classes/graph.inc.php'); - require_once('include/classes/cscript.inc.php'); -+ require_once('include/classes/curl.inc.php'); - - // Include Tactical Overview modules - -Index: frontends/php/include/validate.inc.php -=================================================================== ---- frontends/php/include/validate.inc.php (revision 6643) -+++ frontends/php/include/validate.inc.php (revision 6644) -@@ -432,8 +432,13 @@ - if(!isset($_REQUEST[$field])){ - return ZBX_VALID_OK; - } -- else if(($flags&P_ACT) && !isset($_REQUEST['sessionid'])){ -- return ZBX_VALID_ERROR; -+ else if($flags&P_ACT){ -+ if(!isset($_REQUEST['sid'])){ -+ return ZBX_VALID_ERROR; -+ } -+ else if(isset($_COOKIE['zbx_sessionid']) && ($_REQUEST['sid'] != substr($_COOKIE['zbx_sessionid'],16,16))){ -+ return ZBX_VALID_ERROR; -+ } - } - } - -@@ -465,7 +470,7 @@ - - // VAR TYPE OPTIONAL FLAGS VALIDATION EXCEPTION - $system_fields=array( -- 'sessionid'=> array(T_ZBX_STR, O_OPT, P_SYS, HEX(), NULL), -+ 'sid'=> array(T_ZBX_STR, O_OPT, P_SYS, HEX(), NULL), - // - 'switch_node'=> array(T_ZBX_INT, O_OPT, P_SYS, DB_ID,NULL), - 'triggers_hash'=> array(T_ZBX_STR, O_OPT, P_SYS, NOT_EMPTY,NULL), -Index: frontends/php/include/classes/clink.inc.php -=================================================================== ---- frontends/php/include/classes/clink.inc.php (revision 6643) -+++ frontends/php/include/classes/clink.inc.php (revision 6644) -@@ -19,12 +19,14 @@ - **/ - ?> - <?php -- class CLink extends CTag -- { -+ class CLink extends CTag{ - /* public */ - function CLink($item=NULL,$url=NULL,$class=NULL,$action=NULL){ - parent::CTag('a','yes'); -- -+ -+ $uri = new Curl($url); -+ $url = $uri->getUrl(); -+ - $this->tag_start= ''; - $this->tag_end = ''; - $this->tag_body_start = ''; -@@ -36,14 +38,14 @@ - if(!is_null($action)) $this->SetAction($action); - } - -- function SetAction($value=NULL){ -+ function setAction($value=NULL){ - if(is_null($value)) - return $this->options['action'] = $page['file']; - - return parent::AddAction('onclick', $value); - } - -- function SetUrl($value){ -+ function setUrl($value){ - $this->AddOption('href', $value); - } - -@@ -54,7 +56,7 @@ - return null; - } - -- function SetTarget($value=NULL){ -+ function setTarget($value=NULL){ - if(is_null($value)){ - unset($this->options['target']); - } -Index: frontends/php/include/classes/curl.inc.php -=================================================================== ---- frontends/php/include/classes/curl.inc.php (revision 0) -+++ frontends/php/include/classes/curl.inc.php (revision 6644) -@@ -0,0 +1,273 @@ -+<?php -+/* -+** ZABBIX -+** Copyright (C) 2000-2005 SIA Zabbix -+** -+** $this program is free software; you can redistribute it and/or modify -+** it under the terms of the GNU General Public License as published by -+** the Free Software Foundation; either version 2 of the License, or -+** (at your option) any later version. -+** -+** $this program is distributed in the hope that it will be useful, -+** but WITHOUT ANY WARRANTY; without even the implied warranty of -+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+** GNU General Public License for more details. -+** -+** You should have received a copy of the GNU General Public License -+** along with $this program; if not, write to the Free Software -+** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+**/ -+?> -+<?php -+// Title: url manipulation class -+// Author: Aly -+ -+class Curl{ -+/* -+private $url = ''; // actually, it's depricated/private variable -+private $port = false; -+private $host = ''; -+private $protocol = ''; -+private $username = ''; -+private $password = ''; -+private $filr = ''; -+private $reference = ''; -+private $path = ''; -+private $query = ''; -+private $arguments = array(); -+//*/ -+ -+function curl($url=null){ -+ global $USER_DETAILS; -+ -+ $this->url = ''; // actually, it's depricated/private variable -+ $this->port = false; -+ $this->host = ''; -+ $this->protocol = ''; -+ $this->username = ''; -+ $this->password = ''; -+ $this->filr = ''; -+ $this->reference = ''; -+ $this->path = ''; -+ $this->query = ''; -+ $this->arguments = array(); -+ -+ if(empty($url)){ -+ $this->formatArguments(); -+ $this->url = $url = 'http://'.$_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME'].'?'.$this->getQuery(); -+ } -+ else{ -+ $this->url=urldecode($url); -+ -+ $tmp_pos = strpos($this->url,'?'); -+ $this->query=($tmp_pos!==false)?(substr($this->url,$tmp_pos+1)):''; -+ -+ $tmp_pos = strpos($this->query,'#'); -+ if($tmp_pos!==false) $this->query=zbx_substring($this->query,0,$tmp_pos); -+ -+ $this->formatArguments($this->query); -+ } -+ -+ $protocolSepIndex=strpos($this->url,'://'); -+ if($protocolSepIndex!==false){ -+ $this->protocol= strtolower(zbx_substring($this->url,0,$protocolSepIndex)); -+ -+ $this->host=substr($this->url, $protocolSepIndex+3); -+ -+ $tmp_pos = strpos($this->host,'/'); -+ if($tmp_pos!==false) $this->host=zbx_substring($this->host,0,$tmp_pos); -+ -+ $atIndex=strpos($this->host,'@'); -+ if($atIndex!==false){ -+ $credentials=zbx_substring($this->host,0,$atIndex); -+ -+ $colonIndex=strpos(credentials,':'); -+ if($colonIndex!==false){ -+ $this->username=zbx_substring($credentials,0,$colonIndex); -+ $this->password=substr($credentials,$colonIndex); -+ } -+ else{ -+ $this->username=$credentials; -+ } -+ $this->host=substr($this->host,$atIndex+1); -+ } -+ -+ $host_ipv6 = strpos($this->host,']'); -+ if($host_ipv6!==false){ -+ if($host_ipv6 < (zbx_strlen($this->host)-1)){ -+ $host_ipv6++; -+ $host_less = substr($this->host,$host_ipv6); -+ -+ $portColonIndex=strpos($host_less,':'); -+ if($portColonIndex!==false){ -+ $this->host=zbx_substring($this->host,0,$host_ipv6); -+ $this->port=substr($host_less,$portColonIndex+1); -+ } -+ } -+ } -+ else{ -+ $portColonIndex=strpos($this->host,':'); -+ if($portColonIndex!==false){ -+ $this->host=zbx_substring($this->host,0,$portColonIndex); -+ $this->port=substr($this->host,$portColonIndex+1); -+ } -+ } -+ -+ $this->file = substr($this->url,$protocolSepIndex+3); -+ $this->file = substr($this->file, strpos($this->file,'/')); -+ } -+ else{ -+ $this->file = $this->url; -+ } -+ -+ $tmp_pos = strpos($this->file,'?'); -+ if($tmp_pos!==false) $this->file=zbx_substring($this->file, 0, $tmp_pos); -+ -+ $refSepIndex=strpos($url,'#'); -+ if($refSepIndex!==false){ -+ $this->file = zbx_substring($this->file,0,$refSepIndex); -+ $this->reference = substr($url,strpos($url,'#')+1); -+ } -+ -+ $this->path=$this->file; -+ if(zbx_strlen($this->query)>0) $this->file.='?'.$this->query; -+ if(zbx_strlen($this->reference)>0) $this->file.='#'.$this->reference; -+ -+ if(isset($_COOKIE['zbx_sessionid'])) -+ $this->setArgument('sid', substr($_COOKIE['zbx_sessionid'],16,16)); -+} -+ -+function formatQuery(){ -+ $query = ''; -+ foreach($this->arguments as $key => $value){ -+ $query.= $key.'='.$value.'&'; -+ } -+ $this->query = rtrim($query,'&'); -+} -+ -+function formatArguments($query=null){ -+ if(is_null($query)){ -+ $this->arguments = $_REQUEST; -+ } -+ else{ -+ $query=ltrim($query,'?'); -+ $args = explode('&',$query); -+ foreach($args as $id => $arg){ -+ if(empty($arg)) continue; -+ -+ $tmp = explode('=',$arg); -+ $this->arguments[$tmp[0]] = isset($tmp[1])?$tmp[1]:''; -+ } -+ } -+ $this->formatQuery(); -+} -+ -+function getUrl(){ -+ $url = (zbx_strlen($this->protocol) > 0)?($this->protocol.'://'):''; -+ $url .= (zbx_strlen($this->username) > 0)?$this->username:''; -+ $url .= (zbx_strlen($this->password) > 0)?':'.$this->password:''; -+ $url .= (zbx_strlen($this->host) > 0)?$this->host:''; -+ $url .= $this->port?(':'.$this->port):''; -+ $url .= (zbx_strlen($this->path) > 0)?$this->path:''; -+ $url .= (zbx_strlen($this->query) > 0)?('?'.$this->query):''; -+ $url .= (zbx_strlen($this->reference) > 0)?('#'.urlencode($this->reference)):''; -+ -+//SDI($this->getProtocol().' : '.$this->getHost().' : '.$this->getPort().' : '.$this->getPath().' : '.$this->getQuery()); -+return $url; -+} -+ -+function setPort($port){ -+ $this->port = $port; -+} -+ -+function getPort(){ -+ return $this->port; -+} -+ -+function setArgument($key,$value=''){ -+ $this->arguments[$key] = $value; -+ $this->formatQuery(); -+} -+ -+function getArgument($key){ -+ if(isset($this->arguments[$key])) return $this->arguments[$key]; -+ else return NULL; -+} -+ -+function setQuery($query){ -+ $this->query = $query; -+ $this->formatArguments(); -+ $this->formatQuery(); -+} -+ -+function getQuery(){ -+ return $this->query; -+} -+ -+function setProtocol($protocol){ -+ $this->protocol = $protocol; -+} -+ -+/* Returns the protocol of $this URL, i.e. 'http' in the url 'http://server/' */ -+function getProtocol(){ -+ return $this->protocol; -+} -+ -+function setHost($host){ -+ $this->host = $host; -+} -+ -+/* Returns the host name of $this URL, i.e. 'server.com' in the url 'http://server.com/' */ -+function getHost(){ -+ return $this->host; -+} -+ -+function setUserName($username){ -+ $this->username = $username; -+} -+ -+/* Returns the user name part of $this URL, i.e. 'joe' in the url 'http://joe@server.com/' */ -+function getUserName(){ -+ return $this->username; -+} -+ -+function setPassword($password){ -+ $this->password = $password; -+} -+ -+/* Returns the password part of $this url, i.e. 'secret' in the url 'http://joe:secret@server.com/' */ -+function getPassword(){ -+ return $this->password; -+} -+ -+function setFile($file){ -+ $this->file = $file; -+} -+ -+/* Returns the file part of $this url, i.e. everything after the host name. */ -+function getFile(){ -+ return $this->file; -+} -+ -+function setReference($reference){ -+ $this->reference = $reference; -+} -+ -+/* Returns the reference of $this url, i.e. 'bookmark' in the url 'http://server/file.html#bookmark' */ -+function getReference(){ -+ return $this->reference; -+} -+ -+function setPath($path){ -+ $this->path = $path; -+} -+ -+/* Returns the file path of $this url, i.e. '/dir/file.html' in the url 'http://server/dir/file.html' */ -+function getPath(){ -+ return $this->path; -+} -+ -+function toString(){ -+ return $this->getUrl(); -+} -+} -\ No newline at end of file -Index: frontends/php/include/classes/cform.inc.php -=================================================================== ---- frontends/php/include/classes/cform.inc.php (revision 6643) -+++ frontends/php/include/classes/cform.inc.php (revision 6644) -@@ -28,7 +28,7 @@ - $this->setEnctype($enctype); - - if(isset($_COOKIE['zbx_sessionid'])) -- $this->addVar('sessionid', $_COOKIE['zbx_sessionid']); -+ $this->addVar('sid', substr($_COOKIE['zbx_sessionid'],16,16)); - } - - function setMethod($value='post'){ -Index: frontends/php/include/classes/ctag.inc.php -=================================================================== ---- frontends/php/include/classes/ctag.inc.php (revision 6643) -+++ frontends/php/include/classes/ctag.inc.php (revision 6644) -@@ -1,7 +1,7 @@ - <?php - /* - ** ZABBIX --** Copyright (C) 2000-2005 SIA Zabbix -+** Copyright (C) 2000-2009 SIA Zabbix - ** - ** This program is free software; you can redistribute it and/or modify - ** it under the terms of the GNU General Public License as published by -@@ -19,272 +19,258 @@ - **/ - ?> - <?php -- function destroy_objects() -- { -- global $GLOBALS; -- -- if(isset($GLOBALS)) foreach($GLOBALS as $name => $value) -- { -- if(!is_object($GLOBALS[$name])) continue; -- unset($GLOBALS[$name]); -- } -+function destroy_objects(){ -+ if(isset($GLOBALS)) foreach($GLOBALS as $name => $value){ -+ if(!is_object($GLOBALS[$name])) continue; -+ unset($GLOBALS[$name]); - } -- -- function unpack_object(&$item) -- { -- $res = ""; -+} - -- if(is_object($item)) -- { -- $res = $item->ToString(false); -- } -- elseif(is_array($item)) -- { -- foreach($item as $id => $dat) -- $res .= unpack_object($item[$id]); // Attention, recursion !!! -- } -- elseif(!is_null($item)) -- { -- $res = strval($item); -- unset($item); -- } -- return $res; -+function unpack_object(&$item){ -+ $res = ''; -+ -+ if(is_object($item)){ -+ $res = $item->toString(false); - } -+ else if(is_array($item)){ -+ foreach($item as $id => $dat) -+ $res .= unpack_object($item[$id]); // Attention, recursion !!! -+ } -+ else if(!is_null($item)){ -+ $res = strval($item); -+ unset($item); -+ } -+return $res; -+} - -- function implode_objects($glue, &$pieces) -- { -- if( !is_array($pieces) ) return unpack_object($pieces); -+function implode_objects($glue, &$pieces){ -+ if( !is_array($pieces) ) return unpack_object($pieces); - -- foreach($pieces as $id => $piece) -- $pieces[$id] = unpack_object($piece); -+ foreach($pieces as $id => $piece) -+ $pieces[$id] = unpack_object($piece); - -- return implode($glue, $pieces); -- } -+return implode($glue, $pieces); -+} - -- class CObject -- { -- function CObject($items=null) -- { -- $this->items = array(); -- if(isset($items)) -- { -- $this->AddItem($items); -- } -+class CObject{ -+ function CObject($items=null){ -+ $this->items = array(); -+ if(isset($items)){ -+ $this->addItem($items); - } -- -- function ToString($destroy=true) -- { -- $res = implode('',$this->items); -- if($destroy) $this->Destroy(); -- return $res; -- } -+ } -+ -+ function toString($destroy=true){ -+ $res = implode('',$this->items); -+ if($destroy) $this->destroy(); -+ return $res; -+ } - -- function Show($destroy=true){ -- echo $this->ToString($destroy); -- } -+ function show($destroy=true){ -+ echo $this->toString($destroy); -+ } - -- function Destroy() -- { -+ function destroy(){ - // TODO Problem under PHP 5.0 "Fatal error: Cannot re-assign $this in ..." - // $this = null; -- $this->CleanItems(); -- } -+ $this->cleanItems(); -+ } - -- function CleanItems(){ -- $this->items = array(); -+ function cleanItems(){ -+ $this->items = array(); -+ } -+ -+ function itemsCount(){ -+ return count($this->items); -+ } -+ -+ function addItem($value){ -+ -+ if(is_object($value)){ -+ array_push($this->items,unpack_object($value)); - } -- -- function ItemsCount(){ -- return count($this->items); -+ else if(is_string($value)){ -+ array_push($this->items,str_replace(array('<','>','"'),array('<','>','"'),$value)); -+// array_push($this->items,htmlspecialchars($value)); - } -- -- function AddItem($value){ -- -- if(is_object($value)){ -- array_push($this->items,unpack_object($value)); -+ else if(is_array($value)){ -+ foreach($value as $item){ -+ $this->addItem($item); // Attention, recursion !!! - } -- else if(is_string($value)){ -- array_push($this->items,str_replace(array('<','>','"'),array('<','>','"'),$value)); --// array_push($this->items,htmlspecialchars($value)); -- } -- else if(is_array($value)){ -- foreach($value as $item){ -- $this->AddItem($item); // Attention, recursion !!! -- } -- } -- else if(!is_null($value)){ -- array_push($this->items,unpack_object($value)); -- } - } -+ else if(!is_null($value)){ -+ array_push($this->items,unpack_object($value)); -+ } - } -+} - -- class CTag extends CObject{ -+class CTag extends CObject{ - /* private *//* -- var $tagname; -- var $options = array(); -- var $paired;*/ -+ var $tagname; -+ var $options = array(); -+ var $paired;*/ - /* protected *//* -- var $items = array(); -+ var $items = array(); - -- var $tag_body_start; -- var $tag_body_end; -- var $tag_start; -- var $tag_end;*/ -+ var $tag_body_start; -+ var $tag_body_end; -+ var $tag_start; -+ var $tag_end;*/ - - /* public */ -- function CTag($tagname=NULL, $paired='no', $body=NULL, $class=null){ -- parent::CObject(); -+ function CTag($tagname=NULL, $paired='no', $body=NULL, $class=null){ -+ parent::CObject(); - -- $this->options = array(); -+ $this->options = array(); - -- if(!is_string($tagname)){ -- return $this->error('Incorrect tagname for CTag ['.$tagname.']'); -- } -- -- $this->tagname = $tagname; -- $this->paired = $paired; -- -- $this->tag_start = $this->tag_end = $this->tag_body_start = $this->tag_body_end = ''; -- -- if(is_null($body)){ -- $this->tag_end = $this->tag_body_start = "\n"; -- } -- else{ -- CTag::AddItem($body); -- } -- -- $this->SetClass($class); -+ if(!is_string($tagname)){ -+ return $this->error('Incorrect tagname for CTag ['.$tagname.']'); - } - -- function ShowStart() { echo $this->StartToString(); } -- function ShowBody() { echo $this->BodyToString(); } -- function ShowEnd() { echo $this->EndToString(); } -+ $this->tagname = $tagname; -+ $this->paired = $paired; - -- function StartToString(){ -- $res = $this->tag_start.'<'.$this->tagname; -- foreach($this->options as $key => $value){ -- $res .= ' '.$key.'="'.$value.'"'; -- } -- $res .= ($this->paired=='yes')?'>':' />'; -- return $res; -- } -+ $this->tag_start = $this->tag_end = $this->tag_body_start = $this->tag_body_end = ''; - -- function BodyToString(){ -- $res = $this->tag_body_start; -- return $res.parent::ToString(false); -- -- /*foreach($this->items as $item) -- $res .= $item; -- return $res;*/ -+ if(is_null($body)){ -+ $this->tag_end = $this->tag_body_start = "\n"; - } -- -- function EndToString(){ -- $res = ($this->paired=='yes') ? $this->tag_body_end.'</'.$this->tagname.'>' : ''; -- $res .= $this->tag_end; -- return $res; -+ else{ -+ CTag::addItem($body); - } -- -- function ToString($destroy=true){ -- $res = $this->StartToString(); -- $res .= $this->BodyToString(); -- $res .= $this->EndToString(); - -- if($destroy) $this->Destroy(); -+ $this->setClass($class); -+ } -+ -+ function showStart() { echo $this->startToString(); } -+ function showBody() { echo $this->bodyToString(); } -+ function showEnd() { echo $this->endToString(); } - -- return $res; -+ function startToString(){ -+ $res = $this->tag_start.'<'.$this->tagname; -+ foreach($this->options as $key => $value){ -+ $res .= ' '.$key.'="'.$value.'"'; - } -- -- function SetName($value){ -- if(is_null($value)) return $value; -+ $res .= ($this->paired=='yes')?'>':' />'; -+ return $res; -+ } - -- if(!is_string($value)){ -- return $this->error("Incorrect value for SetName [$value]"); -- } -- return $this->AddOption("name",$value); -- } -+ function bodyToString(){ -+ $res = $this->tag_body_start; -+ return $res.parent::ToString(false); - -- function GetName(){ -- if(isset($this->options['name'])) -- return $this->options['name']; -- return NULL; -- } -- -- function SetClass($value){ -- if(isset($value)) -- $this->options['class'] = $value; -- else -- unset($this->options['class']); -+ /*foreach($this->items as $item) -+ $res .= $item; -+ return $res;*/ -+ } -+ -+ function endToString(){ -+ $res = ($this->paired=='yes') ? $this->tag_body_end.'</'.$this->tagname.'>' : ''; -+ $res .= $this->tag_end; -+ return $res; -+ } -+ -+ function toString($destroy=true){ -+ $res = $this->startToString(); -+ $res .= $this->bodyToString(); -+ $res .= $this->endToString(); - -- return $value; -+ if($destroy) $this->Destroy(); -+ -+ return $res; -+ } -+ -+ function setName($value){ -+ if(is_null($value)) return $value; -+ -+ if(!is_string($value)){ -+ return $this->error("Incorrect value for setName [$value]"); - } -- -- function DelOption($name){ -- unset($this->options[$name]); -- } -- -- function GetOption($name){ -- $ret = NULL; -- if(isset($this->options[$name])) -- $ret =& $this->options[$name]; -- return $ret; -- } -+ return $this->addOption("name",$value); -+ } -+ -+ function getName(){ -+ if(isset($this->options['name'])) -+ return $this->options['name']; -+ return NULL; -+ } -+ -+ function setClass($value){ -+ if(isset($value)) -+ $this->options['class'] = $value; -+ else -+ unset($this->options['class']); - -- function SetHint($text, $width='', $class=''){ -- if(empty($text)) return false; -+ return $value; -+ } -+ -+ function DelOption($name){ -+ unset($this->options[$name]); -+ } -+ -+ function getOption($name){ -+ $ret = NULL; -+ if(isset($this->options[$name])) -+ $ret =& $this->options[$name]; -+ return $ret; -+ } - -- insert_showhint_javascript(); -+ function setHint($text, $width='', $class=''){ -+ if(empty($text)) return false; - -- $text = unpack_object($text); -- if($width != '' || $class != ''){ -- $code = "show_hint_ext(this,event,'".$text."','".$width."','".$class."');"; -- } -- else{ -- $code = "show_hint(this,event,'".$text."');"; -- } -+ insert_showhint_javascript(); - -- $this->AddAction('onMouseOver', $code); -- $this->AddAction('onMouseMove', 'update_hint(this,event);'); -+ $text = unpack_object($text); -+ if($width != '' || $class != ''){ -+ $code = "show_hint_ext(this,event,'".$text."','".$width."','".$class."');"; - } -- -- function OnClick($handle_code){ -- $this->AddAction('onclick', $handle_code); -+ else{ -+ $code = "show_hint(this,event,'".$text."');"; - } - -- function AddAction($name, $value){ -- if(is_object($value)){ -- $this->options[$name] = unpack_object($value); -- } -- else if(!empty($value)){ -- $this->options[$name] = htmlentities(str_replace(array("\r", "\n"), '', strval($value)),ENT_COMPAT,S_HTML_CHARSET); -- } -+ $this->addAction('onMouseOver', $code); -+ $this->addAction('onMouseMove', 'update_hint(this,event);'); -+ } -+ -+ function onClick($handle_code){ -+ $this->addAction('onclick', $handle_code); -+ } -+ -+ function addAction($name, $value){ -+ if(is_object($value)){ -+ $this->options[$name] = unpack_object($value); - } -+ else if(!empty($value)){ -+ $this->options[$name] = htmlentities(str_replace(array("\r", "\n"), '', strval($value)),ENT_COMPAT,S_HTML_CHARSET); -+ } -+ } - -- function AddOption($name, $value){ -- if(is_object($value)){ -- $this->options[$name] = unpack_object($value); -- } -- else if(isset($value)) -- $this->options[$name] = htmlspecialchars(strval($value)); -- else -- unset($this->options[$name]); -+ function addOption($name, $value){ -+ if(is_object($value)){ -+ $this->options[$name] = unpack_object($value); - } -+ else if(isset($value)) -+ $this->options[$name] = htmlspecialchars(strval($value)); -+ else -+ unset($this->options[$name]); -+ } - -- function SetEnabled($value='yes'){ -- if((is_string($value) && ($value == 'yes' || $value == 'enabled' || $value=='on') || $value=='1') -- || (is_int($value) && $value<>0)) -- { -- unset($this->options['disabled']); -- } -- else if((is_string($value) && ($value == 'no' || $value == 'disabled' || $value=='off') || $value=='0') -- || (is_int($value) && $value==0)) -- { -- $this->options['disabled'] = 'disabled'; -- } -+ function setEnabled($value='yes'){ -+ if((is_string($value) && ($value == 'yes' || $value == 'enabled' || $value=='on') || $value=='1') -+ || (is_int($value) && $value<>0)) -+ { -+ unset($this->options['disabled']); - } -- -- function error($value){ -- error('class('.get_class($this).') - '.$value); -- return 1; -+ else if((is_string($value) && ($value == 'no' || $value == 'disabled' || $value=='off') || $value=='0') -+ || (is_int($value) && $value==0)) -+ { -+ $this->options['disabled'] = 'disabled'; - } - } --?> -+ -+ function error($value){ -+ error('class('.get_class($this).') - '.$value); -+ return 1; -+ } -+} -+?> -\ No newline at end of file -Index: frontends/php/include/classes/cmap.inc.php -=================================================================== ---- frontends/php/include/classes/cmap.inc.php (revision 6643) -+++ frontends/php/include/classes/cmap.inc.php (revision 6644) -@@ -19,78 +19,75 @@ - **/ - ?> - <?php -- class CMap extends CTag -- { -+class CMap extends CTag{ - /* public */ -- function CMap($name="") -- { -- parent::CTag("map","yes"); -- $this->SetName($name); -- } -- function AddRectArea($x1,$y1,$x2,$y2,$href,$alt) -- { -- return $this->AddArea(array($x1,$y1,$x2,$y2),$href,$alt,'rect'); -- } -- function AddArea($coords,$href,$alt,$shape) -- { -- return $this->AddItem(new CArea($coords,$href,$alt,$shape)); -- } -- function AddItem($value) -- { -- if(strtolower(get_class($value)) != 'carea') -- return $this->error("Incorrect value for AddItem [$value]"); -+ function CMap($name=''){ -+ parent::CTag('map','yes'); -+ $this->setName($name); -+ } -+ -+ function addRectArea($x1,$y1,$x2,$y2,$href,$alt){ -+ return $this->addArea(array($x1,$y1,$x2,$y2),$href,$alt,'rect'); -+ } -+ -+ function addArea($coords,$href,$alt,$shape){ -+ return $this->addItem(new CArea($coords,$href,$alt,$shape)); -+ } -+ -+ function addItem($value){ -+ if(strtolower(get_class($value)) != 'carea') -+ return $this->error('Incorrect value for addItem ['.$value.']'); - -- return parent::AddItem($value); -- } -+ return parent::addItem($value); - } -+} - -- class CArea extends CTag -- { -- function CArea($coords,$href,$alt,$shape) -- { -- parent::CTag("area","no"); -- $this->SetCoords($coords); -- $this->SetShape($shape); -- $this->SetHref($href); -- $this->SetAlt($alt); -- } -- function SetCoords($value) -- { -- if(!is_array($value)) -- return $this->error("Incorrect value for SetCoords [$value]"); -- if(count($value)<3) -- return $this->error("Incorrect values count for SetCoords [".count($value)."]"); -+class CArea extends CTag{ -+ function CArea($coords,$href,$alt,$shape){ -+ parent::CTag('area','no'); -+ $this->setCoords($coords); -+ $this->setShape($shape); -+ $this->setHref($href); -+ $this->setAlt($alt); -+ } -+ -+ function setCoords($value){ -+ if(!is_array($value)) -+ return $this->error('Incorrect value for setCoords ['.$value.']'); -+ if(count($value)<3) -+ return $this->error('Incorrect values count for setCoords ['.count($value).']'); - -- $str_val = ""; -- foreach($value as $val) -- { -- if(!is_numeric($val)) -- return $this->error("Incorrect value for SetCoords [$val]"); -+ $str_val = ''; -+ foreach($value as $val){ -+ if(!is_numeric($val)) -+ return $this->error('Incorrect value for setCoords ['.$val.']'); - -- $str_val .= $val.","; -- } -- $this->AddOption("coords",trim($str_val,',')); -+ $str_val .= $val.','; - } -- function SetShape($value) -- { -- if(!is_string($value)) -- return $this->error("Incorrect value for SetShape [$value]"); -+ $this->addOption('coords',trim($str_val,',')); -+ } - -- $this->AddOption("shape",$value); -- } -- function SetHref($value) -- { -- if(!is_string($value)) -- return $this->error("Incorrect value for SetHref [$value]"); -+ function setShape($value){ -+ if(!is_string($value)) -+ return $this->error('Incorrect value for setShape ['.$value.']'); - -- $this->AddOption("href",$value); -- } -- function SetAlt($value) -- { -- if(!is_string($value)) -- return $this->error("Incorrect value for SetAlt [$value]"); -+ $this->addOption('shape',$value); -+ } - -- $this->AddOption("alt",$value); -- } -+ function setHref($value){ -+ if(!is_string($value)) -+ return $this->error('Incorrect value for setHref ['.$value.']'); -+ $url = new Curl($value); -+ $value = $url->getUrl(); -+ -+ $this->addOption('href',$value); - } --?> -+ -+ function setAlt($value){ -+ if(!is_string($value)) -+ return $this->error('Incorrect value for setAlt ['.$value.']'); -+ -+ $this->addOption('alt',$value); -+ } -+} -+?> -\ No newline at end of file -Index: frontends/php/include/html.inc.php -=================================================================== ---- frontends/php/include/html.inc.php (revision 6643) -+++ frontends/php/include/html.inc.php (revision 6644) -@@ -58,7 +58,7 @@ - } - - function prepare_url(&$var, $varname=null){ -- $result = ""; -+ $result = ''; - - if(is_array($var)){ - foreach($var as $id => $par) -Index: frontends/php/items.php -=================================================================== ---- frontends/php/items.php (revision 6643) -+++ frontends/php/items.php (revision 6644) -@@ -944,16 +944,17 @@ - // url_param('groupid'), - 'action')); - -- $status=new CCol(new CLink(item_status2str($db_item["status"]), -- "?group_itemid%5B%5D=".$db_item["itemid"]. -- "&group_task=".($db_item["status"] ? "Activate+selected" : "Disable+selected"), -- item_status2style($db_item["status"]))); -+ $status=new CCol(new CLink(item_status2str($db_item['status']), -+// '?sessionid='.$USER_DETAILS['sessionid']. -+ '?group_itemid%5B%5D='.$db_item['itemid']. -+ '&group_task='.($db_item['status']?'Activate+selected':'Disable+selected'), -+ item_status2style($db_item['status']))); - -- if($db_item["error"] == ''){ -- $error=new CCol('-',"off"); -+ if($db_item['error'] == ''){ -+ $error=new CCol('-','off'); - } - else{ -- $error=new CCol($db_item["error"],"on"); -+ $error=new CCol($db_item['error'],'on'); - } - - $applications = $show_applications ? implode(', ', get_applications_by_itemid($db_item["itemid"], 'name')) : null; diff --git a/net-mgmt/zabbix2/files/patch-configure b/net-mgmt/zabbix2/files/patch-configure deleted file mode 100644 index c5ec8b97c390..000000000000 --- a/net-mgmt/zabbix2/files/patch-configure +++ /dev/null @@ -1,12 +0,0 @@ ---- configure.orig 2009-01-16 06:20:00.000000000 -0600 -+++ configure 2009-01-22 17:23:46.000000000 -0600 -@@ -275,6 +275,9 @@ - # Factoring default headers for most tests. - ac_includes_default="\ - #include <stdio.h> -+#include <sys/socket.h> -+#include <sys/param.h> -+#include <netinet/in.h> - #if HAVE_SYS_TYPES_H - # include <sys/types.h> - #endif diff --git a/net-mgmt/zabbix2/files/pkg-message.in b/net-mgmt/zabbix2/files/pkg-message.in deleted file mode 100644 index 5ba8c2fd4809..000000000000 --- a/net-mgmt/zabbix2/files/pkg-message.in +++ /dev/null @@ -1,7 +0,0 @@ -=============================================================== -You can prepare a database for zabbix this way: -% cd %%DATADIR%%/create -% cat schema/<db>.sql data/data.sql data/images_<db>.sql\ -% | <db_client> -where <db> is your preferred database engine. -=============================================================== diff --git a/net-mgmt/zabbix2/files/zabbix_server.sh.in b/net-mgmt/zabbix2/files/zabbix_server.sh.in deleted file mode 100644 index 4543669f7000..000000000000 --- a/net-mgmt/zabbix2/files/zabbix_server.sh.in +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -# PROVIDE: zabbix_server -# REQUIRE: DAEMON -# KEYWORD: shutdown - -. %%RC_SUBR%% - -name="zabbix_server" -rcvar=${name}_enable -load_rc_config $name -eval : \${${rcvar}='NO'} - -command="%%PREFIX%%/bin/${name}" -required_files="%%ETCDIR%%/${name}.conf" - -run_rc_command "$1" diff --git a/net-mgmt/zabbix2/pkg-descr b/net-mgmt/zabbix2/pkg-descr deleted file mode 100644 index 52ecef039fcf..000000000000 --- a/net-mgmt/zabbix2/pkg-descr +++ /dev/null @@ -1,8 +0,0 @@ -Zabbix is software for application and network monitoring. -Zabbix supports both polling and trapping techniques to -collect data from monitored hosts. Flexible notification -mechanism allows easy and quckly configure email notifications -for pre-defined events. Zabbix is freely available under the -terms of the GNU General Public License (GPL). - -WWW: http://www.zabbix.com/ diff --git a/net-mgmt/zabbix2/pkg-install b/net-mgmt/zabbix2/pkg-install deleted file mode 100644 index f0b59f76cc4a..000000000000 --- a/net-mgmt/zabbix2/pkg-install +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh -# Script was taken from mysql323-server port, and modified -# to suit zabbix needs - -[ -n "${PACKAGE_BUILDING}" ] && exit 0 - -[ "${2}" = "POST-INSTALL" ] && exit 0 - -PATH=/bin:/usr/sbin - -USER=zabbix -GROUP=${USER} -UID=122 -GID=${UID} - -if pw group show "${GROUP}" 2>/dev/null; then - echo "You already have a group \"${GROUP}\", so I will use it." -else - if pw groupadd ${GROUP} -g ${GID}; then - echo "Added group \"${GROUP}\"." - else - echo "Adding group \"${GROUP}\" failed..." - exit 1 - fi -fi - -if pw user show "${USER}" 2>/dev/null; then - echo "You already have a user \"${USER}\", so I will use it." - if pw usermod ${USER} -d /nonexistent - then - echo "Changed home directory of \"${USER}\" to /nonexistent" - else - echo "Changing home directory of \"${USER}\" to /nonexistent failed..." - exit 1 - fi -else - if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ - -d /nonexistent -s /sbin/nologin -c "Zabbix Sandbox" - then - echo "Added user \"${USER}\"." - else - echo "Adding user \"${USER}\" failed..." - exit 1 - fi -fi diff --git a/net-mgmt/zabbix2/pkg-plist b/net-mgmt/zabbix2/pkg-plist deleted file mode 100644 index 94f901a725f7..000000000000 --- a/net-mgmt/zabbix2/pkg-plist +++ /dev/null @@ -1,370 +0,0 @@ -bin/zabbix_server -%%ETCDIR%%/zabbix_server.conf.sample -%%DATADIR%%/php/styles/popupmenu.css -%%DATADIR%%/php/styles/css_ob.css -%%DATADIR%%/php/styles/calendar.css -%%DATADIR%%/php/styles/css_bb.css -%%DATADIR%%/php/styles/gmenu.css -%%DATADIR%%/php/styles/sbox.css -%%DATADIR%%/php/styles/link.css -%%DATADIR%%/php/styles/p.css -%%DATADIR%%/php/styles/ul.css -%%DATADIR%%/php/styles/div.css -%%DATADIR%%/php/styles/form.css -%%DATADIR%%/php/styles/bar.css -%%DATADIR%%/php/styles/default.css -%%DATADIR%%/php/styles/table.css -%%DATADIR%%/php/audio/trigger_on_warning.wav -%%DATADIR%%/php/audio/trigger_on_average.wav -%%DATADIR%%/php/audio/trigger_off.wav -%%DATADIR%%/php/audio/trigger_on_disaster.wav -%%DATADIR%%/php/audio/trigger_on_high.wav -%%DATADIR%%/php/audio/trigger_on.wav -%%DATADIR%%/php/js/updater.js -%%DATADIR%%/php/js/menu.js -%%DATADIR%%/php/js/menu_scripts.js -%%DATADIR%%/php/js/prototype.js -%%DATADIR%%/php/js/calendar.js -%%DATADIR%%/php/js/sbox.js -%%DATADIR%%/php/js/services.js -%%DATADIR%%/php/js/gmenu.js -%%DATADIR%%/php/js/gpc.js -%%DATADIR%%/php/js/chkbxrange.js -%%DATADIR%%/php/js/scrollbar.js -%%DATADIR%%/php/js/graphs.js -%%DATADIR%%/php/js/sbinit.js -%%DATADIR%%/php/js/common.js -%%DATADIR%%/php/js/ajax_req.js -%%DATADIR%%/php/js/blink.js -%%DATADIR%%/php/js/tree.js -%%DATADIR%%/php/js/showhint.js -%%DATADIR%%/php/include/locales/cn_zh.inc.php -%%DATADIR%%/php/include/locales/lv_lv.inc.php -%%DATADIR%%/php/include/locales/nl_nl.inc.php -%%DATADIR%%/php/include/locales/ja_jp.inc.php -%%DATADIR%%/php/include/locales/sp_sp.inc.php -%%DATADIR%%/php/include/locales/ko_kr.inc.php -%%DATADIR%%/php/include/locales/pt_br.inc.php -%%DATADIR%%/php/include/locales/hu_hu.inc.php -%%DATADIR%%/php/include/locales/it_it.inc.php -%%DATADIR%%/php/include/locales/en_gb.inc.php -%%DATADIR%%/php/include/locales/ru_ru.inc.php -%%DATADIR%%/php/include/locales/fr_fr.inc.php -%%DATADIR%%/php/include/locales/sv_se.inc.php -%%DATADIR%%/php/include/locales/de_de.inc.php -%%DATADIR%%/php/include/classes/cflashclock.mod.php -%%DATADIR%%/php/include/classes/ccolor.inc.php -%%DATADIR%%/php/include/classes/ctriggerinfo.mod.php -%%DATADIR%%/php/include/classes/cldap.inc.php -%%DATADIR%%/php/include/classes/ccheckbox.inc.php -%%DATADIR%%/php/include/classes/ctable.inc.php -%%DATADIR%%/php/include/classes/cvar.inc.php -%%DATADIR%%/php/include/classes/cserverinfo.mod.php -%%DATADIR%%/php/include/classes/cflash.inc.php -%%DATADIR%%/php/include/classes/ctree.inc.php -%%DATADIR%%/php/include/classes/ctableinfo.inc.php -%%DATADIR%%/php/include/classes/ccombobox.inc.php -%%DATADIR%%/php/include/classes/.htaccess -%%DATADIR%%/php/include/classes/clist.inc.php -%%DATADIR%%/php/include/classes/ctextarea.inc.php -%%DATADIR%%/php/include/classes/cfile.inc.php -%%DATADIR%%/php/include/classes/chostsinfo.mod.php -%%DATADIR%%/php/include/classes/chelp.inc.php -%%DATADIR%%/php/include/classes/clink.inc.php -%%DATADIR%%/php/include/classes/ctextbox.inc.php -%%DATADIR%%/php/include/classes/graph.inc.php -%%DATADIR%%/php/include/classes/chart.inc.php -%%DATADIR%%/php/include/classes/cspan.inc.php -%%DATADIR%%/php/include/classes/cform.inc.php -%%DATADIR%%/php/include/classes/ciframe.inc.php -%%DATADIR%%/php/include/classes/cscript.inc.php -%%DATADIR%%/php/include/classes/cpumenu.inc.php -%%DATADIR%%/php/include/classes/curl.inc.php -%%DATADIR%%/php/include/classes/pie.inc.php -%%DATADIR%%/php/include/classes/ctag.inc.php -%%DATADIR%%/php/include/classes/cbutton.inc.php -%%DATADIR%%/php/include/classes/cformtable.inc.php -%%DATADIR%%/php/include/classes/cimg.inc.php -%%DATADIR%%/php/include/classes/cmap.inc.php -%%DATADIR%%/php/include/discovery.inc.php -%%DATADIR%%/php/include/page_footer.php -%%DATADIR%%/php/include/acknow.inc.php -%%DATADIR%%/php/include/forms.inc.php -%%DATADIR%%/php/include/triggers.inc.php -%%DATADIR%%/php/include/func.inc.php -%%DATADIR%%/php/include/actions.inc.php -%%DATADIR%%/php/include/setup.inc.php -%%DATADIR%%/php/include/copt.lib.php -%%DATADIR%%/php/include/screens.inc.php -%%DATADIR%%/php/include/perm.inc.php -%%DATADIR%%/php/include/config.inc.php -%%DATADIR%%/php/include/import.inc.php -%%DATADIR%%/php/include/page_header.php -%%DATADIR%%/php/include/blocks.inc.php -%%DATADIR%%/php/include/defines.inc.php -%%DATADIR%%/php/include/.htaccess -%%DATADIR%%/php/include/media.inc.php -%%DATADIR%%/php/include/db.inc.php -%%DATADIR%%/php/include/items.inc.php -%%DATADIR%%/php/include/export.inc.php -%%DATADIR%%/php/include/locales.inc.php -%%DATADIR%%/php/include/profiles.inc.php -%%DATADIR%%/php/include/services.inc.php -%%DATADIR%%/php/include/graphs.inc.php -%%DATADIR%%/php/include/scripts.inc.php -%%DATADIR%%/php/include/validate.inc.php -%%DATADIR%%/php/include/reports.inc.php -%%DATADIR%%/php/include/maps.inc.php -%%DATADIR%%/php/include/hosts.inc.php -%%DATADIR%%/php/include/users.inc.php -%%DATADIR%%/php/include/html.inc.php -%%DATADIR%%/php/include/events.inc.php -%%DATADIR%%/php/include/images.inc.php -%%DATADIR%%/php/include/audit.inc.php -%%DATADIR%%/php/include/nodes.inc.php -%%DATADIR%%/php/include/js.inc.php -%%DATADIR%%/php/include/httptest.inc.php -%%DATADIR%%/php/conf/maintenance.inc.php -%%DATADIR%%/php/conf/COPYING -%%DATADIR%%/php/images/sysmaps/old/Notebook.png -%%DATADIR%%/php/images/sysmaps/old/Hub.png -%%DATADIR%%/php/images/sysmaps/old/Workstation.png -%%DATADIR%%/php/images/sysmaps/old/Router.png -%%DATADIR%%/php/images/sysmaps/old/Printer.png -%%DATADIR%%/php/images/sysmaps/old/Server.png -%%DATADIR%%/php/images/sysmaps/Notebook_small.png -%%DATADIR%%/php/images/sysmaps/Server_small.png -%%DATADIR%%/php/images/sysmaps/UPS_small.png -%%DATADIR%%/php/images/sysmaps/Phone_small.png -%%DATADIR%%/php/images/sysmaps/Server.png -%%DATADIR%%/php/images/sysmaps/Hub_small.png -%%DATADIR%%/php/images/sysmaps/UPS.png -%%DATADIR%%/php/images/sysmaps/Router_small.png -%%DATADIR%%/php/images/sysmaps/Workstation.png -%%DATADIR%%/php/images/sysmaps/Phone.png -%%DATADIR%%/php/images/sysmaps/README -%%DATADIR%%/php/images/sysmaps/Workstation_small.png -%%DATADIR%%/php/images/sysmaps/Printer_small.png -%%DATADIR%%/php/images/sysmaps/Hub.png -%%DATADIR%%/php/images/sysmaps/Satellite_small.png -%%DATADIR%%/php/images/sysmaps/Router.png -%%DATADIR%%/php/images/sysmaps/Notebook.png -%%DATADIR%%/php/images/sysmaps/Printer.png -%%DATADIR%%/php/images/sysmaps/Network_small.png -%%DATADIR%%/php/images/sysmaps/Satellite.png -%%DATADIR%%/php/images/sysmaps/Network.png -%%DATADIR%%/php/images/gradients/table_head.gif -%%DATADIR%%/php/images/gradients/button.gif -%%DATADIR%%/php/images/gradients/gradient.png -%%DATADIR%%/php/images/gradients/table_head_bb.gif -%%DATADIR%%/php/images/gradients/blink1.gif -%%DATADIR%%/php/images/gradients/table_head2_bb.gif -%%DATADIR%%/php/images/gradients/menu_not_active.gif -%%DATADIR%%/php/images/gradients/blink2.gif -%%DATADIR%%/php/images/gradients/menu_not_active_bb.gif -%%DATADIR%%/php/images/gradients/table_head2.gif -%%DATADIR%%/php/images/flash/zbxclock.swf -%%DATADIR%%/php/images/general/tree/minus.gif -%%DATADIR%%/php/images/general/tree/pointc.gif -%%DATADIR%%/php/images/general/tree/zero.gif -%%DATADIR%%/php/images/general/tree/plus.gif -%%DATADIR%%/php/images/general/tree/pointl.gif -%%DATADIR%%/php/images/general/tree/point.gif -%%DATADIR%%/php/images/general/bar/arrow_down.gif -%%DATADIR%%/php/images/general/bar/arrow_r.gif -%%DATADIR%%/php/images/general/bar/bar_bg.gif -%%DATADIR%%/php/images/general/bar/right.gif -%%DATADIR%%/php/images/general/bar/arrow_up.gif -%%DATADIR%%/php/images/general/bar/bar_left.gif -%%DATADIR%%/php/images/general/bar/cal.gif -%%DATADIR%%/php/images/general/bar/bar_right.gif -%%DATADIR%%/php/images/general/bar/bar_middle.gif -%%DATADIR%%/php/images/general/bar/arrow_l.gif -%%DATADIR%%/php/images/general/bar/bg.gif -%%DATADIR%%/php/images/general/bar/arrow_sm.gif -%%DATADIR%%/php/images/general/bar/left.gif -%%DATADIR%%/php/images/general/bttn/fullscreen.png -%%DATADIR%%/php/images/general/bttn/minus_bb.png -%%DATADIR%%/php/images/general/bttn/arrowup.png -%%DATADIR%%/php/images/general/bttn/fullscreen_bb.png -%%DATADIR%%/php/images/general/bttn/arrowup_bb.png -%%DATADIR%%/php/images/general/bttn/menu.png -%%DATADIR%%/php/images/general/bttn/arrowdown.png -%%DATADIR%%/php/images/general/bttn/menu_bb.png -%%DATADIR%%/php/images/general/bttn/mute.png -%%DATADIR%%/php/images/general/bttn/mute_bb.png -%%DATADIR%%/php/images/general/bttn/arrowdown_bb.png -%%DATADIR%%/php/images/general/bttn/reset.png -%%DATADIR%%/php/images/general/bttn/plus.png -%%DATADIR%%/php/images/general/bttn/reset_bb.png -%%DATADIR%%/php/images/general/bttn/plus_bb.png -%%DATADIR%%/php/images/general/bttn/help.png -%%DATADIR%%/php/images/general/bttn/sound.png -%%DATADIR%%/php/images/general/bttn/minus.png -%%DATADIR%%/php/images/general/bttn/help_bb.png -%%DATADIR%%/php/images/general/bttn/sound_bb.png -%%DATADIR%%/php/images/general/bttn/down.png -%%DATADIR%%/php/images/general/bttn/down_bb.png -%%DATADIR%%/php/images/general/bttn/up.png -%%DATADIR%%/php/images/general/bttn/up_bb.png -%%DATADIR%%/php/images/general/inst_current.gif -%%DATADIR%%/php/images/general/sortdown.gif -%%DATADIR%%/php/images/general/error_small.gif -%%DATADIR%%/php/images/general/chart.png -%%DATADIR%%/php/images/general/trigg_dep.png -%%DATADIR%%/php/images/general/sort_upw.gif -%%DATADIR%%/php/images/general/sortup_off.gif -%%DATADIR%%/php/images/general/zabbix.ico -%%DATADIR%%/php/images/general/warning_small.gif -%%DATADIR%%/php/images/general/zabbix_bb.ico -%%DATADIR%%/php/images/general/help.gif -%%DATADIR%%/php/images/general/sortup.gif -%%DATADIR%%/php/images/general/inst_completed.gif -%%DATADIR%%/php/images/general/warning16r.gif -%%DATADIR%%/php/images/general/zabbix.png -%%DATADIR%%/php/images/general/zabbix_bb.png -%%DATADIR%%/php/images/general/trigg_dep.gif -%%DATADIR%%/php/images/general/zabbix_ob.ico -%%DATADIR%%/php/images/general/closed.gif -%%DATADIR%%/php/images/general/sort_downw.gif -%%DATADIR%%/php/images/general/inst_step.gif -%%DATADIR%%/php/images/general/sortdown_off.gif -%%DATADIR%%/php/images/general/tick.png -%%DATADIR%%/php/images/general/opened.gif -%%DATADIR%%/php/images/general/up_icon.png -%%DATADIR%%/php/images/general/down_icon.png -%%DATADIR%%/php/create/mysql.sql -%%DATADIR%%/php/create/data.sql -%%DATADIR%%/php/discoveryconf.php -%%DATADIR%%/php/tr_comments.php -%%DATADIR%%/php/maps.php -%%DATADIR%%/php/users.php -%%DATADIR%%/php/overview.php -%%DATADIR%%/php/nodes.php -%%DATADIR%%/php/tr_events.php -%%DATADIR%%/php/authentication.php -%%DATADIR%%/php/queue.php -%%DATADIR%%/php/popup_link_tr.php -%%DATADIR%%/php/httpdetails.php -%%DATADIR%%/php/dashboard.php -%%DATADIR%%/php/instal.php -%%DATADIR%%/php/popup_right.php -%%DATADIR%%/php/screens.php -%%DATADIR%%/php/popup.php -%%DATADIR%%/php/media_types.php -%%DATADIR%%/php/index.php -%%DATADIR%%/php/vtext.php -%%DATADIR%%/php/sysmap.php -%%DATADIR%%/php/items.php -%%DATADIR%%/php/image.php -%%DATADIR%%/php/chart2.php -%%DATADIR%%/php/actionconf.php -%%DATADIR%%/php/popup_users.php -%%DATADIR%%/php/chart3.php -%%DATADIR%%/php/chart4.php -%%DATADIR%%/php/httpconf.php -%%DATADIR%%/php/chart5.php -%%DATADIR%%/php/scripts.php -%%DATADIR%%/php/chart6.php -%%DATADIR%%/php/chart7.php -%%DATADIR%%/php/css.css -%%DATADIR%%/php/scripts_exec.php -%%DATADIR%%/php/report1.php -%%DATADIR%%/php/report2.php -%%DATADIR%%/php/report3.php -%%DATADIR%%/php/popup_httpstep.php -%%DATADIR%%/php/report4.php -%%DATADIR%%/php/sysmaps.php -%%DATADIR%%/php/report5.php -%%DATADIR%%/php/chart_sla.php -%%DATADIR%%/php/hosts.php -%%DATADIR%%/php/chart.php -%%DATADIR%%/php/events.php -%%DATADIR%%/php/popup_usrgrp.php -%%DATADIR%%/php/warning.php -%%DATADIR%%/php/audit.php -%%DATADIR%%/php/services_form.php -%%DATADIR%%/php/popup_trexpr.php -%%DATADIR%%/php/discovery.php -%%DATADIR%%/php/map.php -%%DATADIR%%/php/srv_status.php -%%DATADIR%%/php/hostprofiles.php -%%DATADIR%%/php/acknow.php -%%DATADIR%%/php/screenedit.php -%%DATADIR%%/php/triggers.php -%%DATADIR%%/php/httpmon.php -%%DATADIR%%/php/latest.php -%%DATADIR%%/php/profile.php -%%DATADIR%%/php/setup.php -%%DATADIR%%/php/exp_imp.php -%%DATADIR%%/php/history.php -%%DATADIR%%/php/popup_media.php -%%DATADIR%%/php/config.php -%%DATADIR%%/php/locales.php -%%DATADIR%%/php/services.php -%%DATADIR%%/php/charts.php -%%DATADIR%%/php/graphs.php -%%DATADIR%%/php/screenconf.php -%%DATADIR%%/php/popup_gitem.php -%%DATADIR%%/php/tr_status.php -%%DATADIR%%/dbpatches/1.6/mysql/patch.sql -%%DATADIR%%/dbpatches/1.6/oracle/patch.sql -%%DATADIR%%/dbpatches/1.6/postgresql/patch.sql -%%DATADIR%%/create/data/images/Hub.png -%%DATADIR%%/create/data/images/Hub_small.png -%%DATADIR%%/create/data/images/Network.png -%%DATADIR%%/create/data/images/Network_small.png -%%DATADIR%%/create/data/images/Notebook.png -%%DATADIR%%/create/data/images/Notebook_small.png -%%DATADIR%%/create/data/images/Phone.png -%%DATADIR%%/create/data/images/Phone_small.png -%%DATADIR%%/create/data/images/Printer.png -%%DATADIR%%/create/data/images/Printer_small.png -%%DATADIR%%/create/data/images/Router.png -%%DATADIR%%/create/data/images/Router_small.png -%%DATADIR%%/create/data/images/Satellite.png -%%DATADIR%%/create/data/images/Satellite_small.png -%%DATADIR%%/create/data/images/Server.png -%%DATADIR%%/create/data/images/Server_small.png -%%DATADIR%%/create/data/images/UPS.png -%%DATADIR%%/create/data/images/UPS_small.png -%%DATADIR%%/create/data/images/Workstation.png -%%DATADIR%%/create/data/images/Workstation_small.png -%%DATADIR%%/create/data/data.sql -%%DATADIR%%/create/data/images_oracle.sql -%%DATADIR%%/create/data/images_pgsql.sql -%%DATADIR%%/create/data/images_mysql.sql -%%DATADIR%%/create/data/images_sqlite3.sql -%%DATADIR%%/create/schema/mysql.sql -%%DATADIR%%/create/schema/oracle.sql -%%DATADIR%%/create/schema/postgresql.sql -%%DATADIR%%/create/schema/sqlite.sql -@dirrm %%DATADIR%%/php/styles -@dirrm %%DATADIR%%/php/js -@dirrm %%DATADIR%%/php/include/locales -@dirrm %%DATADIR%%/php/include/classes -@dirrm %%DATADIR%%/php/include -@dirrm %%DATADIR%%/php/images/sysmaps/old -@dirrm %%DATADIR%%/php/images/sysmaps -@dirrm %%DATADIR%%/php/images/gradients -@dirrm %%DATADIR%%/php/images/general/tree -@dirrm %%DATADIR%%/php/images/general/bttn -@dirrm %%DATADIR%%/php/images/general/bar -@dirrm %%DATADIR%%/php/images/general -@dirrm %%DATADIR%%/php/images/flash -@dirrm %%DATADIR%%/php/images -@dirrm %%DATADIR%%/php/create -@dirrm %%DATADIR%%/php/conf -@dirrm %%DATADIR%%/php/audio -@dirrm %%DATADIR%%/php -@dirrm %%DATADIR%%/dbpatches/1.6/postgresql -@dirrm %%DATADIR%%/dbpatches/1.6/oracle -@dirrm %%DATADIR%%/dbpatches/1.6/mysql -@dirrm %%DATADIR%%/dbpatches/1.6 -@dirrm %%DATADIR%%/dbpatches -@dirrm %%DATADIR%%/create/schema -@dirrm %%DATADIR%%/create/data/images -@dirrm %%DATADIR%%/create/data -@dirrm %%DATADIR%%/create -@dirrm %%DATADIR%%/ -@dirrmtry %%ETCDIR%% |