(RADIATOR) Possible bug in Radiator 3.5+patches Util.pm on Win2k

Hugh Irvine hugh at open.com.au
Tue Mar 11 23:52:49 CST 2003


Hello Valentin -

I believe Mike fixed this yesterday and the patch is available on the 
web site.

regards

Hugh


On Tuesday, Mar 11, 2003, at 23:57 Australia/Melbourne, Valentin 
Tumarkin wrote:

>
>  Hi,
>
> There seems to be a bug in Radiator 3.5 + latest patches on
> Win2k OS in Util.pm. I haven't checked if the problem also
> exists on Unix.
>
> The problem is in the Util.pm 'append' sub. The 'mkdir' fails on
> dir/filename starting with '>>' (the real problem could be that
> 'dirname' doesn't understand filenames that start with '>>').
>
> The simple solution is to move the line that prepends the append
> redirection sign '>>' to filename after the 'mkpath'.
>
> Original:
>
> sub append
> {
>     my ($filename, $line) = @_;
>
>     # Permit pipes
>     $filename = ">>$filename" unless $filename =~ /^\|/;
>     # Make sure the files directory exists.
>     mkpath(dirname($filename), 0, 0755)
> 	unless -d dirname($filename);
>
>     open(FILE, $filename) || return;
>     print FILE $line;
>     close(FILE) || return;
>     return 1;
> }
>
> Fixed:
>
> sub append
> {
>     my ($filename, $line) = @_;
>
>     # Make sure the files directory exists.
>     mkpath(dirname($filename), 0, 0755)
> 	unless -d dirname($filename);
>
>     # Permit pipes
>     $filename = ">>$filename" unless $filename =~ /^\|/;
>
>     open(FILE, $filename) || return;
>     print FILE $line;
>     close(FILE) || return;
>     return 1;
> }
>
>
>
> 	Best Regards,
>
> 	Valentin
>
> ===
> Archive at http://www.open.com.au/archives/radiator/
> Announcements on radiator-announce at open.com.au
> To unsubscribe, email 'majordomo at open.com.au' with
> 'unsubscribe radiator' in the body of the message.
>
>

NB: have you included a copy of your configuration file (no secrets),
together with a trace 4 debug showing what is happening?

-- 
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. Available on *NIX, *BSD, Windows 95/98/2000, NT, MacOS X.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.

===
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list