Hi! 

On Tue, 05 Dec 2006, Tobias Klausmann wrote:
> Thus, I'll probably patch NG to just ignore the perms. 
> 
> I'll post the patch here (if it's not too ugly ;))

See the attached file. Have fun.

Regards,
Tobias

-- 
Never touch a burning system.
--- NagiosGrapher.pm.orig       2006-12-07 15:15:40.000000000 +0100
+++ NagiosGrapher.pm    2006-12-07 15:15:54.000000000 +0100
@@ -181,12 +181,15 @@
 sub AuthCheck {
        my $rw=0;
        my ($cfg,$host,$user)[EMAIL PROTECTED];
+       my $cgroups="";
 
     read_nagios_cfg($cfg) if(!$nagios_loaded_cfg);
     
     if($nagiosversion==2) {
        # Nagios Version 2.? Perform test
-       $rw=1 
if(parse_nagios_cfg('contactgroup',parse_nagios_cfg('host',$host,'contact_groups'),'members')
 =~ m/$user(,|$)/);
+       $cgroups = parse_nagios_cfg('host',$host,'contact_groups');
+       $cgroups =~ s/:[^,]*//g;
+       $rw=1 if(parse_nagios_cfg('contactgroup',$cgroups,'members') =~ 
m/$user(,|$)/);
     } else {
        # Nagios Version 1.X isn't supported yet so everything is allowd 
        $rw=1;
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null

Reply via email to