Menu

#6 fix call-time pass-by-reference PHP warnings

open
nobody
None
5
2014-08-26
2005-02-06
Anonymous
No

diff -u -r acid/acid_action.inc acid_new/acid_action.inc
--- acid/acid_action.inc 2003-01-09 03:04:08.000000000
+0200
+++ acid_new/acid_action.inc 2005-02-06
17:50:22.000000000 +0200
@@ -440,7 +440,7 @@
/* **** SOME ACTION on (sid, cid)
********** */
$function_op = "Action_".$action."_op";
$tmp = $function_op($sid, $cid, $db,
$action_arg,
- &$action_ctx);
+ $action_ctx);

if ( $tmp == 0 )
{
@@ -739,7 +739,7 @@

function Action_email_alert2_post($action_arg,
&$action_ctx, $db, &$num_alert, $action_cnt)
{
- Action_email_alert_post($action_arg, &$action_ctx,
$db, &$num_alert, $action_cnt);
+ Action_email_alert_post($action_arg, $action_ctx,
$db, $num_alert, $action_cnt);
}

/* CSV
***************************************************/
@@ -761,7 +761,7 @@

function Action_csv_alert_post($action_arg,
&$action_ctx, $db, &$num_alert, $action_cnt)
{
- Action_email_alert_post($action_arg, &$action_ctx,
$db, &$num_alert, $action_cnt);
+ Action_email_alert_post($action_arg, $action_ctx,
$db, $num_alert, $action_cnt);
}

/* Clear
***************************************************/
diff -u -r acid/acid_state_citems.inc
acid_new/acid_state_citems.inc
--- acid/acid_state_citems.inc 2003-01-09
03:04:08.000000000 +0200
+++ acid_new/acid_state_citems.inc 2005-02-06
17:46:50.000000000 +0200
@@ -143,9 +143,9 @@
var $criteria_cnt;
var $valid_field_list;

- function MultipleElementCriteria($db, $cs,
$export_name, $element_cnt, $field_list = NULL)
+ function MultipleElementCriteria(&$db, &$cs,
$export_name, $element_cnt, $field_list = NULL)
{
- $this->BaseCriteria(&$db, &$cs, $export_name);
+ $this->BaseCriteria($db, $cs, $export_name);

$this->element_cnt = $element_cnt;
$this->criteria_cnt = 0;
@@ -202,7 +202,7 @@

function AddFormItem(&$submit, $submit_value)
{
- AddCriteriaFormRow($submit, $submit_value,
&$this->criteria_cnt, $this->criteria, $this->element_cnt);
+ AddCriteriaFormRow($submit, $submit_value,
$this->criteria_cnt, $this->criteria, $this->element_cnt);
}

function Set($value)
@@ -320,9 +320,9 @@

var $sig_type;

- function SignatureCriteria($db, $cs, $export_name)
+ function SignatureCriteria(&$db, &$cs, $export_name)
{
- $this->BaseCriteria(&$db, &$cs, $export_name);
+ $this->BaseCriteria($db, $cs, $export_name);

$this->sig_type = "";
}
@@ -809,9 +809,9 @@
* $ip_addr_cnt: number of rows in the $ip_addr[][]
structure
*/

- function IPAddressCriteria($db, $cs, $export_name,
$element_cnt)
+ function IPAddressCriteria(&$db, &$cs,
$export_name, $element_cnt)
{
- parent::MultipleElementCriteria(&$db, &$cs,
$export_name, $element_cnt,
+ parent::MultipleElementCriteria($db, $cs,
$export_name, $element_cnt,
array ("ip_src"
=> "Source",
"ip_dst"
=> "Dest",
"ip_both"
=> "Src or Dest"));
@@ -974,9 +974,9 @@
* $ip_field_cnt: number of rows in the $ip_field[][]
structure
*/

- function IPFieldCriteria($db, $cs, $export_name,
$element_cnt)
+ function IPFieldCriteria(&$db, &$cs, $export_name,
$element_cnt)
{
- parent::ProtocolFieldCriteria(&$db, &$cs,
$export_name, $element_cnt,
+ parent::ProtocolFieldCriteria($db, $cs,
$export_name, $element_cnt,
array("ip_tos" =>
"TOS",
"ip_ttl" =>
"TTL",
"ip_id" =>
"ID",
@@ -1014,9 +1014,9 @@
* $tcp_port_cnt: number of rows in the $tcp_port[][]
structure
*/

- function TCPPortCriteria($db, $cs, $export_name,
$element_cnt)
+ function TCPPortCriteria(&$db, &$cs, $export_name,
$element_cnt)
{
- parent::ProtocolFieldCriteria(&$db, &$cs,
$export_name, $element_cnt,
+ parent::ProtocolFieldCriteria($db, $cs,
$export_name, $element_cnt,
array
("layer4_sport" => "source port",

"layer4_dport" => "dest port"));
}
@@ -1051,9 +1051,9 @@
* $tcp_field_cnt: number of rows in the
$tcp_field[][] structure
*/

- function TCPFieldCriteria($db, $cs, $export_name,
$element_cnt)
+ function TCPFieldCriteria(&$db, &$cs, $export_name,
$element_cnt)
{
- parent::ProtocolFieldCriteria(&$db, &$cs,
$export_name, $element_cnt,
+ parent::ProtocolFieldCriteria($db, $cs,
$export_name, $element_cnt,
array ("tcp_win"
=> "window",
"tcp_urp"
=> "urp",
"tcp_seq"
=> "seq #",
@@ -1176,9 +1176,9 @@
* $udp_port_cnt: number of rows in the $udp_port[][]
structure
*/

- function UDPPortCriteria($db, $cs, $export_name,
$element_cnt)
+ function UDPPortCriteria(&$db, &$cs, $export_name,
$element_cnt)
{
- parent::ProtocolFieldCriteria(&$db, &$cs,
$export_name, $element_cnt,
+ parent::ProtocolFieldCriteria($db, $cs,
$export_name, $element_cnt,
array
("layer4_sport" => "source port",

"layer4_dport" => "dest port"));
}
@@ -1211,9 +1211,9 @@
* $udp_field_cnt: number of rows in the
$udp_field[][] structure
*/

- function UDPFieldCriteria($db, $cs, $export_name,
$element_cnt)
+ function UDPFieldCriteria(&$db, &$cs, $export_name,
$element_cnt)
{
- parent::ProtocolFieldCriteria(&$db, &$cs,
$export_name, $element_cnt,
+ parent::ProtocolFieldCriteria($db, $cs,
$export_name, $element_cnt,
array ("udp_len"
=> "length",
"udp_csum"
=> "chksum"));
}
@@ -1245,9 +1245,9 @@
* $icmp_field_cnt: number of rows in the
$icmp_field[][] structure
*/

- function ICMPFieldCriteria($db, $cs, $export_name,
$element_cnt)
+ function ICMPFieldCriteria(&$db, &$cs,
$export_name, $element_cnt)
{
- parent::ProtocolFieldCriteria(&$db, &$cs,
$export_name, $element_cnt,
+ parent::ProtocolFieldCriteria($db, $cs,
$export_name, $element_cnt,
array ("icmp_type"
=> "type",
"icmp_code"
=> "code",
"icmp_id"
=> "id",
@@ -1346,9 +1346,9 @@

var $data_encode;

- function DataCriteria($db, $cs, $export_name,
$element_cnt)
+ function DataCriteria(&$db, &$cs, $export_name,
$element_cnt)
{
- parent::MultipleElementCriteria(&$db, &$cs,
$export_name, $element_cnt,
+ parent::MultipleElementCriteria($db, $cs,
$export_name, $element_cnt,
array ("LIKE" =>
"has",
"NOT
LIKE" => "has NOT" ));
$this->data_encode = array();
diff -u -r acid/acid_state_criteria.inc
acid_new/acid_state_criteria.inc
--- acid/acid_state_criteria.inc 2003-01-09
03:04:08.000000000 +0200
+++ acid_new/acid_state_criteria.inc 2005-02-06
17:46:30.000000000 +0200
@@ -32,22 +32,22 @@
/* XXX-SEC */
GLOBAL $db;

- $this->criteria['sig'] = new
SignatureCriteria(&$db, &$this, "sig");
- $this->criteria['sig_class'] = new
SignatureClassificationCriteria(&$db, &$this, "sig_class");
- $this->criteria['sig_priority'] = new
SignaturePriorityCriteria(&$db, &$this, "sig_priority");
- $this->criteria['ag'] = new
AlertGroupCriteria(&$db, &$this, "ag");
- $this->criteria['sensor'] = new
SensorCriteria(&$db, &$this, "sensor");
- $this->criteria['time'] = new TimeCriteria(&$db,
&$this, "time", TIME_CFCNT);
- $this->criteria['ip_addr'] = new
IPAddressCriteria(&$db, &$this, "ip_addr", IPADDR_CFCNT);
- $this->criteria['layer4'] = new
Layer4Criteria(&$db, &$this, "layer4");
- $this->criteria['ip_field'] = new
IPFieldCriteria(&$db, &$this, "ip_field", PROTO_CFCNT);
- $this->criteria['tcp_port'] = new
TCPPortCriteria(&$db, &$this, "tcp_port", PROTO_CFCNT);
- $this->criteria['tcp_flags'] = new
TCPFlagsCriteria(&$db, &$this, "tcp_flags");
- $this->criteria['tcp_field'] = new
TCPFieldCriteria(&$db, &$this, "tcp_field", PROTO_CFCNT);
- $this->criteria['udp_port'] = new
UDPPortCriteria(&$db, &$this, "udp_port", PROTO_CFCNT);
- $this->criteria['udp_field'] = new
UDPFieldCriteria(&$db, &$this, "udp_field", PROTO_CFCNT);
- $this->criteria['icmp_field'] = new
ICMPFieldCriteria(&$db, &$this, "icmp_field", PROTO_CFCNT);
- $this->criteria['data'] = new DataCriteria(&$db,
&$this, "data", PAYLOAD_CFCNT);
+ $this->criteria['sig'] = new
SignatureCriteria($db, $this, "sig");
+ $this->criteria['sig_class'] = new
SignatureClassificationCriteria($db, $this, "sig_class");
+ $this->criteria['sig_priority'] = new
SignaturePriorityCriteria($db, $this, "sig_priority");
+ $this->criteria['ag'] = new
AlertGroupCriteria($db, $this, "ag");
+ $this->criteria['sensor'] = new
SensorCriteria($db, $this, "sensor");
+ $this->criteria['time'] = new TimeCriteria($db,
$this, "time", TIME_CFCNT);
+ $this->criteria['ip_addr'] = new
IPAddressCriteria($db, $this, "ip_addr", IPADDR_CFCNT);
+ $this->criteria['layer4'] = new
Layer4Criteria($db, $this, "layer4");
+ $this->criteria['ip_field'] = new
IPFieldCriteria($db, $this, "ip_field", PROTO_CFCNT);
+ $this->criteria['tcp_port'] = new
TCPPortCriteria($db, $this, "tcp_port", PROTO_CFCNT);
+ $this->criteria['tcp_flags'] = new
TCPFlagsCriteria($db, $this, "tcp_flags");
+ $this->criteria['tcp_field'] = new
TCPFieldCriteria($db, $this, "tcp_field", PROTO_CFCNT);
+ $this->criteria['udp_port'] = new
UDPPortCriteria($db, $this, "udp_port", PROTO_CFCNT);
+ $this->criteria['udp_field'] = new
UDPFieldCriteria($db, $this, "udp_field", PROTO_CFCNT);
+ $this->criteria['icmp_field'] = new
ICMPFieldCriteria($db, $this, "icmp_field", PROTO_CFCNT);
+ $this->criteria['data'] = new DataCriteria($db,
$this, "data", PAYLOAD_CFCNT);

/*
* For new criteria, add a call to the
appropriate constructor here, and implement

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.