Great Circle Associates Majordomo-Workers
(November 1996)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Re: another bug fix to 1.94 majordomo.pl
From: Dave Wolfe <dwolfe @ risc . sps . mot . com>
Date: Mon, 18 Nov 1996 11:46:47 -0600 (CST)
To: haas @ xmission . com (Walt Haas)
Cc: majordomo-workers @ greatcircle . com, tibbs @ hpc . uh . edu
In-reply-to: <199611140305.UAA03211@xmission.com> from "Walt Haas" at Nov 13, 96 08:05:13 pm
Reply-to: Dave Wolfe <david_wolfe @ risc . sps . mot . com>

[ Walt Haas writes: ]
> 
> The problem was that any address beginning with a "/" was treated as HOSTILE,
> so an address like "/G=Lena/S=Paulsen@mhs-opic.attmail.com" could never 
> subscribe.  The reason turned out to be the line that said 
> 
> 	local(@components) = split( /\//, $_);
> 
> The split function caused $components[0] to always be the null string if
> the first character of the address was "/".  Thus when the string
> /$components[0] was tested, it evaluated to "/", the filesystem root, and
> I guess writing to that would be pretty hostile :-)
> 
> The fix was to break up $addr properly.  Here's the patch:
> 
> 	511c511
> 	<         local(@components) = split( /\//, $_);
> 	---
> 	>         local(@components) = ($_ =~ /([\/\@]?[^\/\@]+)/g);

Will an X.400 address ever *not* start with a '/'? If so, then this
wouldn't work right. Looking at 1.93, a line was dropped in 1.94 between
the split and the test:

          # strip null element for / at beginning of address
          # since the "/" directory always exists.
          shift(@components) if ( $components[0] eq "" );

Does anyone know why? I think the fix is to restore these lost lines,
perhaps with some better comments.

-- 
 Dave Wolfe



Follow-Ups:
References:
Indexed By Date Previous: Re: Bug & patch: writeconfig chops lines at 80 chars (revisited)
From: Dave Wolfe <dwolfe@risc.sps.mot.com>
Next: Majordomo 1.94.1 -- the first patch
From: Chan Wilson <cwilson@slurp.neu.sgi.com>
Indexed By Thread Previous: another bug fix to 1.94 majordomo.pl
From: Walt Haas <haas@xmission.com>
Next: Re: another bug fix to 1.94 majordomo.pl
From: Walt Haas <haas@xmission.com>

Google
 
Search Internet Search www.greatcircle.com