Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
Warden
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pavel Valach
Warden
Commits
9469e9d3
Commit
9469e9d3
authored
10 years ago
by
Tomáš Plesník
Browse files
Options
Downloads
Patches
Plain Diff
bugfix: defined(%hash) is deprecated
parent
eacc2606
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/warden-server/lib/Warden.pm
+5
-5
5 additions, 5 deletions
src/warden-server/lib/Warden.pm
with
5 additions
and
5 deletions
src/warden-server/lib/Warden.pm
+
5
−
5
View file @
9469e9d3
# Warden.pm
# Warden.pm
#
#
# Copyright (C) 2011-201
5
Cesnet z.s.p.o
# Copyright (C) 2011-201
4
Cesnet z.s.p.o
#
#
# Use of this source is governed by a BSD-style license, see LICENSE file.
# Use of this source is governed by a BSD-style license, see LICENSE file.
...
@@ -221,7 +221,7 @@ sub saveNewEvent
...
@@ -221,7 +221,7 @@ sub saveNewEvent
# authorize incoming client
# authorize incoming client
my
%client
=
authorizeClient
(
$alt_names
,
$ip
,
$service
,
$client_type
,
$function_name
);
my
%client
=
authorizeClient
(
$alt_names
,
$ip
,
$service
,
$client_type
,
$function_name
);
if
(
defined
%client
)
{
if
(
%client
)
{
# log incoming event
# log incoming event
sendMsg
("
debug
",
sendMsg
("
debug
",
"
Incoming event: [client_id: '
$client
{'client_id'}', service: '
$service
', detected: '
$detected
', type: '
$type
', source_type: '
$source_type
', source: '
$source
', target_proto: '
$target_proto
', target_port: '
$target_port
', attack_scale: '
$attack_scale
', note: '
$note
', priority: '
$priority
', timeout: '
$timeout
']
",
"
Incoming event: [client_id: '
$client
{'client_id'}', service: '
$service
', detected: '
$detected
', type: '
$type
', source_type: '
$source_type
', source: '
$source
', target_proto: '
$target_proto
', target_port: '
$target_port
', attack_scale: '
$attack_scale
', note: '
$note
', priority: '
$priority
', timeout: '
$timeout
']
",
...
@@ -326,7 +326,7 @@ sub getNewEvents
...
@@ -326,7 +326,7 @@ sub getNewEvents
# authorize incoming client
# authorize incoming client
my
%client
=
authorizeClient
(
$alt_names
,
$ip
,
$requested_type
,
$client_type
,
$function_name
);
my
%client
=
authorizeClient
(
$alt_names
,
$ip
,
$requested_type
,
$client_type
,
$function_name
);
if
(
defined
%client
)
{
if
(
%client
)
{
# obtain events from database
# obtain events from database
my
$query
=
"
SELECT id, hostname, service, detected, events.type, source_type, source, target_proto, target_port, attack_scale, note, priority, timeout FROM events INNER JOIN clients ON events.client_id = clients.client_id WHERE events.type != 'test' AND id > ? AND events.valid = 't'
";
my
$query
=
"
SELECT id, hostname, service, detected, events.type, source_type, source, target_proto, target_port, attack_scale, note, priority, timeout FROM events INNER JOIN clients ON events.client_id = clients.client_id WHERE events.type != 'test' AND id > ? AND events.valid = 't'
";
my
@params
=
(
$last_id
);
my
@params
=
(
$last_id
);
...
@@ -419,7 +419,7 @@ sub getLastId
...
@@ -419,7 +419,7 @@ sub getLastId
# authorize incoming client
# authorize incoming client
my
%client
=
authorizeClient
(
$alt_names
,
$ip
,
$service
,
$client_type
,
$function_name
);
my
%client
=
authorizeClient
(
$alt_names
,
$ip
,
$service
,
$client_type
,
$function_name
);
if
(
defined
%client
)
{
if
(
%client
)
{
# obtain max event ID
# obtain max event ID
my
$sth
=
$DBH
->
prepare
("
SELECT max(id) FROM events;
");
my
$sth
=
$DBH
->
prepare
("
SELECT max(id) FROM events;
");
unless
(
defined
$sth
)
{
unless
(
defined
$sth
)
{
...
@@ -462,7 +462,7 @@ sub getClientInfo
...
@@ -462,7 +462,7 @@ sub getClientInfo
# authorize incoming client
# authorize incoming client
my
%client
=
authorizeClient
(
$alt_names
,
$ip
,
$service
,
$client_type
,
$function_name
);
my
%client
=
authorizeClient
(
$alt_names
,
$ip
,
$service
,
$client_type
,
$function_name
);
if
(
defined
%client
)
{
if
(
%client
)
{
# obtain all valid clients from DB
# obtain all valid clients from DB
my
$sth
=
$DBH
->
prepare
("
SELECT * FROM clients WHERE valid = 't' ORDER BY client_id ASC;
");
my
$sth
=
$DBH
->
prepare
("
SELECT * FROM clients WHERE valid = 't' ORDER BY client_id ASC;
");
unless
(
defined
$sth
)
{
unless
(
defined
$sth
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment