Print

Print


 Hi Andy,

 The implemented fix misses a protection: something like this

if lxb6041.cern.ch
  <do something>
fi

 triggers a segv, because after matching correctly the host it tries

 strcmp(val,"exec") with val = 0x0.

 Shouldn't the host matching conditional read something like this

// Check if we are one of the listed hosts
//
   if (!is1of(val, brk))
      {do {hostok = XrdNetDNS::isMatch(hname, val);
           val = Config.GetWord();
          } while(!hostok && val && !is1of(val, brk));
       if (hostok)
          { while(val && !is1of(val, brk)) val = Config.GetWord();
            // No more directives
            if (!val) return 1;
          } else return 0;
      }

 ?

 Gerri


Andrew Hanushevsky wrote:

>Hi Jan,
>
>Quite correct. Thanks for pointing it out. I just committed the fix. The
>bypass depends on which directive you are using. Some directives allow
>you to qualify the directive on the same line:
>
>if <host>
>directive if named <foo>
>fi
>
>Perhaps you can use this ugly bypass. Unfortunately, since nested
>if's are not allowed there is no other solution.
>
>Andy
>
>On Sat, 29 Apr 2006, Jan Fiete Grosse-Oetringhaus wrote:
>
>  
>
>>Hi,
>>
>>I am using version 20060414-1334_dbg (the one we have in the ROOT HEAD).
>>  If it is solved in a newer release, sorry for reporting it. However,
>>if the release I am using should have the bug fixed already, let me
>>know, then I send log files and the configuration I am using.
>>
>>Another problem I had lately is that the conditional statement
>>
>>if host.domain named instancename
>>
>>validates to true always when instancename is correct, the hostname does
>>not matter. From the documentation I understand that hostname and
>>instancename have to match (to validate the if-statement to true).
>>
>>Cheers,
>>Jan
>>
>>
>>Andrew Hanushevsky wrote:
>>
>>    
>>
>>>Hi Jan,
>>>
>>>We had that problem in a previous release but that should have been
>>>solved. Which release are you using?
>>>
>>>Andy
>>>
>>>      
>>>
>>--
>>
>>*****************************************************************
>>
>>  Jan Fiete Grosse-Oetringhaus
>>
>>  CERN                                    Office 12-1-008
>>  1211 Geneva 23                          Phone  +41 22 767 49 96
>>  Switzerland                             Mobile +41 76 487 54 59
>>
>>*****************************************************************
>>
>>    
>>


-- 
+--------------------------------------------------------------------------+
  Gerardo GANIS    PH Department, CERN
        address    CERN, CH 1211 Geneve 23  
                   room: 32-RC-017, tel / fax: +412276 76439 / 69133
         e-mail    [log in to unmask]
+--------------------------------------------------------------------------+