-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kris Deugau wrote:
> Mike Loiterman wrote:
>> I followed the instuructions below to patch Razor2's taint
>> problem. The Config.pm patch worked perfectly, but the Core.pm
>> patch failed at hunk 1.  Is this an SA issue, or a Razor
>> issue..(i.e. patch created by Razor folks or SA folks)?
> 
> The patch was created by someone else.  I didn't apply it directly,
> as I wanted a patch to apply during a .rpm build, so I rebuilt it
> as a "whole-source-tree" patch.  I've just pushed it out to
> ftp://ftp.deepnet.cx/pub/devel/razor/razor-untaint.patch.
> 
> Note that the original patch was for v2.34 IIRC.  While I don't
> *think* the code fragments to be patched have changed much, I've
> had my own problems applying such patches for other programs in the
> past. :/ 

I applied the patch:

[15:14:54 [EMAIL PROTECTED]:
/home/mike/razor-agents-2.34a/lib/Razor2/Client]# patch -p0 <
Core.patchfile
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
- --------------------------
|- --- Client/Core.pm~  2002-11-25 19:07:38.000000000 +0100
|+++ Client/Core.pm     2002-11-25 18:55:35.000000000 +0100
- --------------------------
File to patch: Core.pm
Patching file Core.pm using Plan A...
Hunk #1 failed at 216.
1 out of 1 hunks failed--saving rejects to Core.pm.rej
done

This is the patch:

- - --- Client/Core.pm~ 2002-11-25 19:07:38.000000000 +0100
+++ Client/Core.pm      2002-11-25 18:55:35.000000000 +0100
@@ -216,8 +216,10 @@
         foreach $rr ($query->answer) { 
             my $pushed = 0;
             if ($rr->type eq "A") { 
- - -                push @list, $rr->address; 
- - -                $pushed = 1;
+                if ($rr->address =~ m/^(\d+\.\d+\.\d+\.\d+)$/) {
+                    push @list, $1; 
+                    $pushed = 1;
+                }
             } elsif ($rr->type eq "CNAME") { 
                 if ($rr->cname eq 'list.terminator') { 
                     pop @list if $pushed;

This is the error:

***************
*** 216,223 ****
          foreach $rr ($query->answer) { 
              my $pushed = 0;
              if ($rr->type eq "A") { 
- -  -                push @list, $rr->address; 
- -  -                $pushed = 1;
              } elsif ($rr->type eq "CNAME") { 
                  if ($rr->cname eq 'list.terminator') { 
                      pop @list if $pushed;
- --- 216,225 ----
          foreach $rr ($query->answer) { 
              my $pushed = 0;
              if ($rr->type eq "A") { 
+                 if ($rr->address =~ m/^(\d+\.\d+\.\d+\.\d+)$/) {
+                     push @list, $1; 
+                     $pushed = 1;
+                 }
              } elsif ($rr->type eq "CNAME") { 
                  if ($rr->cname eq 'list.terminator') { 
                      pop @list if $pushed;

Sadly, I don't know enough perl to be able to address this problem. 
Is there something I'm doing wrong?
- ------------------------------
Mike Loiterman
grantADLER
Tel: 630-302-4944
Fax: 773-868-0071
Email: [EMAIL PROTECTED]
PGP Key 0xD1B9D18E

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0.2
Comment: This message has been digitally signed by Mike Loiterman

iQA/AwUBP2dw/2jZbUnRudGOEQI/pACffJ2CVo2dEg5nEdPnFYb9+feWbtgAnAhy
slWA/c/yuc8v923pKbEp92qw
=cAxc
-----END PGP SIGNATURE-----



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to