URGENT: Bug fixes in the RIPE database distribution
- Date: Wed, 31 May 1995 18:48:57 +0200
Dear all,
Recently Tony Bates found an authorisation problem in 'updatecheck.pl'.
Today my fix is ready. Please apply this fix to your software!
Furthermore, I included the recent fixes made by Tony for :
net2net.pl
misc.pl
in the distribution and a small one from Curtis Villamizar for :
dbupdate.pl
I plan to add also some other fixes from Curtis in the next release.
Kind regards,
David Kessens
RIPE NCC Database software maintainer
======================================================================
How to apply the fix(es) :
Fix src/filename.pl with 'patch' or just put in the corresponding
file(s) of the new distribution (ftp:/ftp.ripe.net/ripe/dbase/software,
file with latest version number). Always make a backup copy of the old
file(s) to be able to restore the original software in case you might
experience problems. After the fix(es) are applied, do a 'make install'
from the database root directory to install the patched file(s).
The following files have been changed from the previous release:
updatecheck.pl
dbupdate.pl
net2net.pl
misc.pl
======================================================================
*** /ncc/dbase/src/old/updatecheck.pl Tue Jan 17 17:37:36 1995
--- /ncc/dbase/src/updatecheck.pl Tue May 30 18:47:24 1995
***************
*** 1,7 ****
# $RCSfile: updatecheck.pl,v $
! # $Revision: 1.19 $
# $Author: ripe-dbm $
! # $Date: 1995/01/17 16:37:36 $
require "defines.pl";
require "adderror.pl";
--- 1,7 ----
# $RCSfile: updatecheck.pl,v $
! # $Revision: 1.20 $
# $Author: ripe-dbm $
! # $Date: 1995/05/30 13:34:47 $
require "defines.pl";
require "adderror.pl";
***************
*** 70,79 ****
}
! # Check authorisation by maintainer unless override is specified.
if (!$new{"uo"} && !&Maintainer(*cur, *new)) {
! return $E_AUTHFAIL unless !&entype(*new);
}
# Catch if called from dbdel, then skip all checks,
--- 70,80 ----
}
! # Check authorisation by maintainer unless override is specified
! # and handles special (dirty trick) delete case with $new in $cur
if (!$new{"uo"} && !&Maintainer(*cur, *new)) {
! return $E_AUTHFAIL if !$cur{"uo"};
}
# Catch if called from dbdel, then skip all checks,
*** /ncc/dbase/src/old/dbupdate.pl Tue May 30 18:38:57 1995
--- /ncc/dbase/src/dbupdate.pl Tue May 30 18:48:17 1995
***************
*** 1,9 ****
#!PERL
# $RCSfile: dbupdate.pl,v $
! # $Revision: 0.33 $
! # $Author: david $
! # $Date: 1995/02/24 11:13:22 $
# This is a client that will update objects read from a file directly
# in the database, without interference of updated.
--- 1,9 ----
#!PERL
# $RCSfile: dbupdate.pl,v $
! # $Revision: 0.34 $
! # $Author: ripe-dbm $
! # $Date: 1995/05/30 14:44:09 $
# This is a client that will update objects read from a file directly
# in the database, without interference of updated.
***************
*** 46,52 ****
# -F - Do fast update without mail and other stuff
# -S - Do only syntax check - Not implemented
! &Getopts('ln:vMAHVFS');
# Need this below for running perl in tainted mode.
--- 46,52 ----
# -F - Do fast update without mail and other stuff
# -S - Do only syntax check - Not implemented
! &Getopts('l:n:vMAHVFS');
# Need this below for running perl in tainted mode.
*** /ncc/dbase/src/old/net2net.pl Tue May 30 18:43:22 1995
--- /ncc/dbase/src/net2net.pl Tue May 30 18:49:30 1995
***************
*** 1,8 ****
#
# $RCSfile: net2net.pl,v $
! # $Revision: 0.13 $
! # $Author: tony $
! # $Date: 1994/09/20 12:27:36 $
#
# net2net.pl
#
--- 1,8 ----
#
# $RCSfile: net2net.pl,v $
! # $Revision: 0.14 $
! # $Author: ripe-dbm $
! # $Date: 1995/05/30 16:45:19 $
#
# net2net.pl
#
***************
*** 140,147 ****
$len = 16;
} elsif ($2 == 0 && $3 == 0 && $4 == 0) {
$len = 8;
}
! @return_rep = (@return_rep, $net_rep."/".$len);
return $OK, "", @return_rep;
} else {
return $NOK,
--- 140,152 ----
$len = 16;
} elsif ($2 == 0 && $3 == 0 && $4 == 0) {
$len = 8;
+ } else {
+ return $NOK,
+ "$net_rep is not a classful net representation I understand",
+ @return_rep;
}
! local($val) = &trimnet($net_rep);
! @return_rep = (@return_rep, $val."/".$len);
return $OK, "", @return_rep;
} else {
return $NOK,
***************
*** 161,167 ****
local($begin) = &quad2int($oldnet);
local($end) = &quad2int($2);
if($end < $begin) {
! return $NOK, "range is invalid", @returndtring;
}
if ($oldnet =~ /(\d+)\.\d+\.\d+\.\d+/) {
--- 166,172 ----
local($begin) = &quad2int($oldnet);
local($end) = &quad2int($2);
if($end < $begin) {
! return $NOK, "range is invalid", @returnstring;
}
if ($oldnet =~ /(\d+)\.\d+\.\d+\.\d+/) {
***************
*** 236,242 ****
"based on prefix $usepre",
@returnstring;
}
! return $OK, "", $net_rep;
} else {
return $NOK,
"$net_rep is not an representation I understand",
--- 241,249 ----
"based on prefix $usepre",
@returnstring;
}
! local($val) = &trimnet($net);
! @returnstring = "$val"."/".$len;
! return $OK, "", @returnstring;
} else {
return $NOK,
"$net_rep is not an representation I understand",
***************
*** 370,373 ****
--- 377,386 ----
}
return( $s );
}
+
+ sub trimnet {
+ local($quad) = @_;
+ return(&int2quad(&quad2int($quad)));
+ }
1;
+
*** /ncc/dbase/src/old/misc.pl Wed May 31 14:06:18 1995
--- /ncc/dbase/src/misc.pl Wed May 31 14:08:13 1995
***************
*** 1,9 ****
# misc - miscellaneaous functions
#
# $RCSfile: misc.pl,v $
! # $Revision: 0.44 $
! # $Author: marten $
! # $Date: 1994/12/16 11:06:55 $
#
require "defines.pl";
--- 1,9 ----
# misc - miscellaneaous functions
#
# $RCSfile: misc.pl,v $
! # $Revision: 0.45 $
! # $Author: ripe-dbm $
! # $Date: 1995/05/31 12:04:40 $
#
require "defines.pl";
***************
*** 197,203 ****
#
sub iscommunity {
local($str) = @_;
! return 0 if $str =~ /[a-z]/;
foreach $_ ((keys %KEYWORD, "AS")) {
if (($_ eq "(") || ($_ eq ")")) {
$_ = "\\".$_;
--- 197,203 ----
#
sub iscommunity {
local($str) = @_;
! return 0 if $str !~ /[A-Z]+/;
foreach $_ ((keys %KEYWORD, "AS")) {
if (($_ eq "(") || ($_ eq ")")) {
$_ = "\\".$_;
*** /ncc/dbase/src/old/updatecheck.pl Tue Jan 17 17:37:36 1995
--- /ncc/dbase/src/updatecheck.pl Tue May 30 18:47:24 1995
***************
*** 1,7 ****
# $RCSfile: updatecheck.pl,v $
! # $Revision: 1.19 $
# $Author: ripe-dbm $
! # $Date: 1995/01/17 16:37:36 $
require "defines.pl";
require "adderror.pl";
--- 1,7 ----
# $RCSfile: updatecheck.pl,v $
! # $Revision: 1.20 $
# $Author: ripe-dbm $
! # $Date: 1995/05/30 13:34:47 $
require "defines.pl";
require "adderror.pl";
***************
*** 70,79 ****
}
! # Check authorisation by maintainer unless override is specified.
if (!$new{"uo"} && !&Maintainer(*cur, *new)) {
! return $E_AUTHFAIL unless !&entype(*new);
}
# Catch if called from dbdel, then skip all checks,
--- 70,80 ----
}
! # Check authorisation by maintainer unless override is specified
! # and handles special (dirty trick) delete case with $new in $cur
if (!$new{"uo"} && !&Maintainer(*cur, *new)) {
! return $E_AUTHFAIL if !$cur{"uo"};
}
# Catch if called from dbdel, then skip all checks,
*** /ncc/dbase/src/old/dbupdate.pl Tue May 30 18:38:57 1995
--- /ncc/dbase/src/dbupdate.pl Tue May 30 18:48:17 1995
***************
*** 1,9 ****
#!PERL
# $RCSfile: dbupdate.pl,v $
! # $Revision: 0.33 $
! # $Author: david $
! # $Date: 1995/02/24 11:13:22 $
# This is a client that will update objects read from a file directly
# in the database, without interference of updated.
--- 1,9 ----
#!PERL
# $RCSfile: dbupdate.pl,v $
! # $Revision: 0.34 $
! # $Author: ripe-dbm $
! # $Date: 1995/05/30 14:44:09 $
# This is a client that will update objects read from a file directly
# in the database, without interference of updated.
***************
*** 46,52 ****
# -F - Do fast update without mail and other stuff
# -S - Do only syntax check - Not implemented
! &Getopts('ln:vMAHVFS');
# Need this below for running perl in tainted mode.
--- 46,52 ----
# -F - Do fast update without mail and other stuff
# -S - Do only syntax check - Not implemented
! &Getopts('l:n:vMAHVFS');
# Need this below for running perl in tainted mode.
*** /ncc/dbase/src/old/net2net.pl Tue May 30 18:43:22 1995
--- /ncc/dbase/src/net2net.pl Tue May 30 18:49:30 1995
***************
*** 1,8 ****
#
# $RCSfile: net2net.pl,v $
! # $Revision: 0.13 $
! # $Author: tony $
! # $Date: 1994/09/20 12:27:36 $
#
# net2net.pl
#
--- 1,8 ----
#
# $RCSfile: net2net.pl,v $
! # $Revision: 0.14 $
! # $Author: ripe-dbm $
! # $Date: 1995/05/30 16:45:19 $
#
# net2net.pl
#
***************
*** 140,147 ****
$len = 16;
} elsif ($2 == 0 && $3 == 0 && $4 == 0) {
$len = 8;
}
! @return_rep = (@return_rep, $net_rep."/".$len);
return $OK, "", @return_rep;
} else {
return $NOK,
--- 140,152 ----
$len = 16;
} elsif ($2 == 0 && $3 == 0 && $4 == 0) {
$len = 8;
+ } else {
+ return $NOK,
+ "$net_rep is not a classful net representation I understand",
+ @return_rep;
}
! local($val) = &trimnet($net_rep);
! @return_rep = (@return_rep, $val."/".$len);
return $OK, "", @return_rep;
} else {
return $NOK,
***************
*** 161,167 ****
local($begin) = &quad2int($oldnet);
local($end) = &quad2int($2);
if($end < $begin) {
! return $NOK, "range is invalid", @returndtring;
}
if ($oldnet =~ /(\d+)\.\d+\.\d+\.\d+/) {
--- 166,172 ----
local($begin) = &quad2int($oldnet);
local($end) = &quad2int($2);
if($end < $begin) {
! return $NOK, "range is invalid", @returnstring;
}
if ($oldnet =~ /(\d+)\.\d+\.\d+\.\d+/) {
***************
*** 236,242 ****
"based on prefix $usepre",
@returnstring;
}
! return $OK, "", $net_rep;
} else {
return $NOK,
"$net_rep is not an representation I understand",
--- 241,249 ----
"based on prefix $usepre",
@returnstring;
}
! local($val) = &trimnet($net);
! @returnstring = "$val"."/".$len;
! return $OK, "", @returnstring;
} else {
return $NOK,
"$net_rep is not an representation I understand",
***************
*** 370,373 ****
--- 377,386 ----
}
return( $s );
}
+
+ sub trimnet {
+ local($quad) = @_;
+ return(&int2quad(&quad2int($quad)));
+ }
1;
+
*** /ncc/dbase/src/old/misc.pl Wed May 31 14:06:18 1995
--- /ncc/dbase/src/misc.pl Wed May 31 14:08:13 1995
***************
*** 1,9 ****
# misc - miscellaneaous functions
#
# $RCSfile: misc.pl,v $
! # $Revision: 0.44 $
! # $Author: marten $
! # $Date: 1994/12/16 11:06:55 $
#
require "defines.pl";
--- 1,9 ----
# misc - miscellaneaous functions
#
# $RCSfile: misc.pl,v $
! # $Revision: 0.45 $
! # $Author: ripe-dbm $
! # $Date: 1995/05/31 12:04:40 $
#
require "defines.pl";
***************
*** 197,203 ****
#
sub iscommunity {
local($str) = @_;
! return 0 if $str =~ /[a-z]/;
foreach $_ ((keys %KEYWORD, "AS")) {
if (($_ eq "(") || ($_ eq ")")) {
$_ = "\\".$_;
--- 197,203 ----
#
sub iscommunity {
local($str) = @_;
! return 0 if $str !~ /[A-Z]+/;
foreach $_ ((keys %KEYWORD, "AS")) {
if (($_ eq "(") || ($_ eq ")")) {
$_ = "\\".$_;
--- End of fix(es) ---