bugfix update to icinga 1.4.2

This commit is contained in:
sthen 2011-07-01 16:57:41 +00:00
parent fb6bdd86de
commit beefc056f1
9 changed files with 13 additions and 134 deletions

View File

@ -1,6 +1,6 @@
# $OpenBSD: Makefile.inc,v 1.5 2011/06/08 14:24:50 sthen Exp $
# $OpenBSD: Makefile.inc,v 1.6 2011/07/01 16:57:41 sthen Exp $
V = 1.4.1
V = 1.4.2
CATEGORIES+= net net/icinga

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.10 2011/06/28 06:34:33 sthen Exp $
# $OpenBSD: Makefile,v 1.11 2011/07/01 16:57:41 sthen Exp $
COMMENT-main = network monitoring system (improved fork of Nagios)
COMMENT-cgi = cgi scripts for Icinga (classic Nagios-style UI)
@ -7,8 +7,6 @@ COMMENT-api = database-backed API for icinga
DISTNAME = icinga-$V
PKGNAME-main = icinga-$V
REVISION-main = 0
REVISION-cgi = 0
PKGNAME-cgi = icinga-cgi-$V
PKGNAME-ido = icinga-idoutils-$V
PKGNAME-api = icinga-api-$V

View File

@ -1,5 +1,5 @@
MD5 (icinga-1.4.1.tar.gz) = BkNMwGlIR62S5bHBH36ngQ==
RMD160 (icinga-1.4.1.tar.gz) = JJ6wt4LNbdWGWth/QtNRmiuom3Q=
SHA1 (icinga-1.4.1.tar.gz) = /FpoMS0DEvDwWv1K2COLWvEUSug=
SHA256 (icinga-1.4.1.tar.gz) = 2NURCsAGNuVxlNWTGTWqP9WMN6WbF/Rvv2sI2mAkyWM=
SIZE (icinga-1.4.1.tar.gz) = 16257974
MD5 (icinga-1.4.2.tar.gz) = RJf7k+j9eE6mizZ0jKeShQ==
RMD160 (icinga-1.4.2.tar.gz) = uyFW0o+SAOdtM7nv6GncmX+K6Ck=
SHA1 (icinga-1.4.2.tar.gz) = DMdxWEFKvanRlSGdP4Hd/45Anic=
SHA256 (icinga-1.4.2.tar.gz) = UGAiSTKVvalaolFL/cMZYGPtk2ZVvGAGj2FUNQS0KqY=
SIZE (icinga-1.4.2.tar.gz) = 15379151

View File

@ -1,46 +0,0 @@
$OpenBSD: patch-cgi_cgiauth_c,v 1.1 2011/06/28 06:34:33 sthen Exp $
Fix from upstream ed01c63
--- cgi/cgiauth.c.orig Wed Jun 8 08:58:48 2011
+++ cgi/cgiauth.c Mon Jun 27 23:47:45 2011
@@ -858,3 +858,39 @@ int is_authorized_for_host_commands(host *hst, authdat
}
+/* check is the current user is authorized to issue commands relating to a particular servicegroup */
+int is_authorized_for_servicegroup_commands(servicegroup *sg, authdata *authinfo){
+ servicesmember *temp_servicesmember;
+ service *temp_service;
+
+ if(sg==NULL)
+ return FALSE;
+
+ /* see if user is authorized for all services commands in the servicegroup */
+ for(temp_servicesmember=sg->members;temp_servicesmember!=NULL;temp_servicesmember=temp_servicesmember->next){
+ temp_service=find_service(temp_servicesmember->host_name,temp_servicesmember->service_description);
+ if(is_authorized_for_service_commands(temp_service,authinfo)==FALSE)
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+
+/* check is the current user is authorized to issue commands relating to a particular hostgroup */
+int is_authorized_for_hostgroup_commands(hostgroup *hg, authdata *authinfo){
+ hostsmember *temp_hostsmember;
+ host *temp_host;
+
+ if(hg==NULL)
+ return FALSE;
+
+ /* see if user is authorized for all hosts in the hostgroup */
+ for(temp_hostsmember=hg->members;temp_hostsmember!=NULL;temp_hostsmember=temp_hostsmember->next){
+ temp_host=find_host(temp_hostsmember->host_name);
+ if(is_authorized_for_host_commands(temp_host,authinfo)==FALSE)
+ return FALSE;
+ }
+
+ return TRUE;
+}

View File

@ -1,20 +0,0 @@
$OpenBSD: patch-cgi_cmd_c,v 1.1 2011/06/28 06:34:33 sthen Exp $
Fix from upstream ed01c63
--- cgi/cmd.c.orig Wed Jun 8 08:58:48 2011
+++ cgi/cmd.c Mon Jun 27 23:47:45 2011
@@ -2175,11 +2175,11 @@ void commit_command_data(int cmd){
cmd==CMD_ENABLE_HOSTGROUP_SVC_CHECKS || cmd==CMD_DISABLE_HOSTGROUP_SVC_CHECKS || \
cmd==CMD_SCHEDULE_HOSTGROUP_HOST_DOWNTIME || cmd==CMD_SCHEDULE_HOSTGROUP_SVC_DOWNTIME ){
temp_hostgroup=find_hostgroup(hostgroup_name);
- if(is_authorized_for_hostgroup(temp_hostgroup,&current_authdata)==TRUE)
+ if(is_authorized_for_hostgroup_commands(temp_hostgroup,&current_authdata)==TRUE)
is_authorized[x]=TRUE;
} else {
temp_servicegroup=find_servicegroup(servicegroup_name);
- if(is_authorized_for_servicegroup(temp_servicegroup,&current_authdata)==TRUE)
+ if(is_authorized_for_servicegroup_commands(temp_servicegroup,&current_authdata)==TRUE)
is_authorized[x]=TRUE;
}

View File

@ -1,16 +0,0 @@
$OpenBSD: patch-include_cgiauth_h,v 1.1 2011/06/28 06:34:33 sthen Exp $
Fix from upstream ed01c63
--- include/cgiauth.h.orig Wed Jun 8 08:58:48 2011
+++ include/cgiauth.h Mon Jun 27 23:47:45 2011
@@ -69,6 +69,9 @@ int is_authorized_for_service_commands(service *,authd
int is_authorized_for_hostgroup(hostgroup *,authdata *);
int is_authorized_for_servicegroup(servicegroup *,authdata *);
+int is_authorized_for_hostgroup_commands(hostgroup *,authdata *);
+int is_authorized_for_servicegroup_commands(servicegroup *,authdata *);
+
int is_authorized_for_configuration_information(authdata *);
int is_authorized_for_read_only(authdata *);

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST-cgi,v 1.4 2011/06/08 14:24:50 sthen Exp $
@comment $OpenBSD: PLIST-cgi,v 1.5 2011/07/01 16:57:41 sthen Exp $
cgi-bin/icinga/
@bin cgi-bin/icinga/avail.cgi
@bin cgi-bin/icinga/cmd.cgi
@ -522,44 +522,6 @@ icinga-cgi/images/hostevent.gif
icinga-cgi/images/hourglass-arrow.png
icinga-cgi/images/hourglass-exclamation.png
icinga-cgi/images/icinga-logo.png
icinga-cgi/images/icinga-web-admin_groups1.png
icinga-cgi/images/icinga-web-admin_groups2.png
icinga-cgi/images/icinga-web-admin_logs1.png
icinga-cgi/images/icinga-web-admin_principals.png
icinga-cgi/images/icinga-web-admin_tasks.png
icinga-cgi/images/icinga-web-admin_users1.png
icinga-cgi/images/icinga-web-admin_users2.png
icinga-cgi/images/icinga-web-commands_hst.png
icinga-cgi/images/icinga-web-commands_hst_1.3.png
icinga-cgi/images/icinga-web-commands_svc.png
icinga-cgi/images/icinga-web-commands_svc_1.3.png
icinga-cgi/images/icinga-web-cronks1.png
icinga-cgi/images/icinga-web-cronks1_1.3.png
icinga-cgi/images/icinga-web-cronks2.png
icinga-cgi/images/icinga-web-cronks2_1.3.png
icinga-cgi/images/icinga-web-cronks3.png
icinga-cgi/images/icinga-web-cronks3_1.3.png
icinga-cgi/images/icinga-web-filter1.png
icinga-cgi/images/icinga-web-filter1_1.3.png
icinga-cgi/images/icinga-web-filter2.png
icinga-cgi/images/icinga-web-filter2_1.3.png
icinga-cgi/images/icinga-web-filter3.png
icinga-cgi/images/icinga-web-log.png
icinga-cgi/images/icinga-web-log_1.3.png
icinga-cgi/images/icinga-web-login.png
icinga-cgi/images/icinga-web-main_bar.png
icinga-cgi/images/icinga-web-mainscreen1.png
icinga-cgi/images/icinga-web-mainscreen1_1.3.png
icinga-cgi/images/icinga-web-open_problems.png
icinga-cgi/images/icinga-web-overview.png
icinga-cgi/images/icinga-web-overview_1.3.png
icinga-cgi/images/icinga-web-search1.png
icinga-cgi/images/icinga-web-search1_1.3.png
icinga-cgi/images/icinga-web-settings.png
icinga-cgi/images/icinga-web-statuscronk.png
icinga-cgi/images/icinga-web-topmenu1.png
icinga-cgi/images/icinga-web-topmenu2.png
icinga-cgi/images/icinga-web-topmenu2_1.3.png
icinga-cgi/images/icon_collapse.gif
icinga-cgi/images/icon_expand.gif
icinga-cgi/images/info.png

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST-ido,v 1.4 2011/05/11 13:57:41 sthen Exp $
@comment $OpenBSD: PLIST-ido,v 1.5 2011/07/01 16:57:41 sthen Exp $
@bin bin/ido2db
@bin bin/idomod.o
@bin bin/log2ido
@ -89,6 +89,6 @@ share/examples/icinga/ido2db.cfg-sample
@sample ${SYSCONFDIR}/icinga/ido2db.cfg
share/examples/icinga/idomod.cfg-sample
@sample ${SYSCONFDIR}/icinga/idomod.cfg
share/examples/icinga/modules/idoutils.cfg
share/examples/icinga/modules/idoutils.cfg-sample
@sample ${SYSCONFDIR}/icinga/modules/idoutils.cfg
@rcscript ${RCDIR}/ido2db

View File

@ -1,8 +1,9 @@
# $OpenBSD: Makefile,v 1.5 2011/06/08 14:24:50 sthen Exp $
# $OpenBSD: Makefile,v 1.6 2011/07/01 16:57:41 sthen Exp $
# Work in progress. Not yet linked to the build.
COMMENT = web UI for icinga
V = 1.4.1
DISTNAME = icinga-web-$V
BUILD_DEPENDS = icinga-api-$V:net/icinga/core,-api