Remove Msf::DBManager::Sink

MSP-11614

`Msf::DBManager::Sink` contains code for a `sink` that is a meant to
serialize database events, but it's unneeded because all database events
go directly through ActiveRecord, which handles threading.
bug/bundler_fix
Luke Imhoff 2014-11-14 10:51:51 -06:00
parent 8863367cc7
commit 55a8f6f339
No known key found for this signature in database
GPG Key ID: 5B1FB01FB33356F8
4 changed files with 0 additions and 49 deletions

View File

@ -47,7 +47,6 @@ class Msf::DBManager
autoload :Service, 'msf/core/db_manager/service'
autoload :Session, 'msf/core/db_manager/session'
autoload :SessionEvent, 'msf/core/db_manager/session_event'
autoload :Sink, 'msf/core/db_manager/sink'
autoload :Task, 'msf/core/db_manager/task'
autoload :Vuln, 'msf/core/db_manager/vuln'
autoload :VulnAttempt, 'msf/core/db_manager/vuln_attempt'
@ -80,7 +79,6 @@ class Msf::DBManager
include Msf::DBManager::Service
include Msf::DBManager::Session
include Msf::DBManager::SessionEvent
include Msf::DBManager::Sink
include Msf::DBManager::Task
include Msf::DBManager::Vuln
include Msf::DBManager::VulnAttempt
@ -160,11 +158,6 @@ class Msf::DBManager
#
initialize_adapter
#
# Instantiate the database sink
#
initialize_sink
true
end

View File

@ -1,34 +0,0 @@
module Msf::DBManager::Sink
#
# Attributes
#
# Stores a TaskManager for serializing database events
attr_accessor :sink
#
# Instance Methods
#
#
# Create a new database sink and initialize it
#
def initialize_sink
self.sink = Msf::TaskManager.new(framework)
self.sink.start
end
#
# Add a new task to the sink
#
def queue(proc)
self.sink.queue_proc(proc)
end
#
# Wait for all pending write to finish
#
def sync
# There is no more queue.
end
end

View File

@ -40,7 +40,6 @@ describe Msf::DBManager do
it_should_behave_like 'Msf::DBManager::Service'
it_should_behave_like 'Msf::DBManager::Session'
it_should_behave_like 'Msf::DBManager::SessionEvent'
it_should_behave_like 'Msf::DBManager::Sink'
it_should_behave_like 'Msf::DBManager::Task'
it_should_behave_like 'Msf::DBManager::Vuln'
it_should_behave_like 'Msf::DBManager::VulnAttempt'

View File

@ -1,7 +0,0 @@
shared_examples_for 'Msf::DBManager::Sink' do
it { is_expected.to respond_to :initialize_sink }
it { is_expected.to respond_to :queue }
it { is_expected.to respond_to :sink }
it { is_expected.to respond_to :sink= }
it { is_expected.to respond_to :sync }
end