1
--- Net-Radius-1.56.orig/Radius/Dictionary.pm 2008-06-20 14:08:57.000000000 +0100
2
+++ Net-Radius-1.56.1/Radius/Dictionary.pm 2008-06-20 15:54:33.000000000 +0100
6
my ($self, $filename) = @_;
9
- open DICT, "<$filename";
10
+ open $dict, "<$filename";
12
- while (defined(my $l = <DICT>)) {
15
+ while (defined(my $l = <$dict>)) {
17
next unless my @l = split /\s+/, $l;
19
- if ($l[0] =~ m/^vendor$/i)
20
+ if ($l[0] =~ m/^\$include$/i)
22
+ my @fn = split /\//, $filename;
24
+ $self->readfile(join '/', @fn);
26
+ elsif ($l[0] =~ m/^vendor$/i)
28
if (defined $l[1] and defined $l[2] and $l[2] =~ /^[xo0-9]+$/)
31
warn "Garbled VENDOR line $l\n";
34
+ elsif ($l[0] =~ m/^begin-vendor$/i)
36
+ if ( defined $l[1] )
38
+ push @in_vendor, $l[1];
42
+ warn "Garbled BEGIN-VENDOR line $l\n";
45
+ elsif ($l[0] =~ m/^end-vendor$/i)
47
+ if ( defined $l[1] )
49
+ if ( $in_vendor[$#in_vendor] eq $l[1] ) {
52
+ warn "mismatched END-VENDOR line $l\n";
57
+ warn "Garbled END-VENDOR line $l\n";
60
elsif ($l[0] =~ m/^attribute$/i)
63
+ my @tags = grep { not ( m/^encrypt=\d$/ or m/^has_tag$/ ) } split /,/, pop @l;
64
+ push @l, join ',', @tags if scalar @tags;
66
+ if (@l == 4 and scalar @in_vendor) {
67
+ push @l, $in_vendor[$#in_vendor];
72
$self->{attr}->{$l[1]} = [@l[2,3]];
74
warn "Warning: Weird dictionary line: $l\n";
81
# Accessors for standard attributes