Skip to content

Commit

Permalink
Merge branch 'master' into bug/MSP-10963/realm-uniqueness
Browse files Browse the repository at this point in the history
MSP-10963

Conflicts:
	lib/metasploit/credential/version.rb
  • Loading branch information
limhoff-r7 committed Aug 1, 2014
2 parents 39e14d2 + 7fe30b3 commit 4f88d5b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/metasploit/credential/creation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,8 @@ def create_credential_service(opts={})
host_object = Mdm::Host.where(address: address, workspace_id: workspace_id).first_or_create
service_object = Mdm::Service.where(host_id: host_object.id, port: port, proto: protocol).first_or_initialize

service_object.name = service_name
service_object.name = service_name
service_object.state = "open"
service_object.save!

service_object
Expand Down
2 changes: 1 addition & 1 deletion lib/metasploit/credential/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Version
# The minor version number, scoped to the {MAJOR} version number.
MINOR = 8
# The patch number, scoped to the {MINOR} version number.
PATCH = 4
PATCH = 5
# The pre-release version, scoped to the {MINOR} version number.
PRERELEASE = 'realm-uniqueness'

Expand Down
17 changes: 17 additions & 0 deletions spec/lib/metasploit/credential/creation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,23 @@
end
end

context "#create_credential_service" do
let(:opts) do
{
address: '192.168.172.3',
port: 445,
service_name: 'smb',
protocol: 'tcp',
workspace_id: workspace.id
}
end

it 'should create an Mdm::Service in state "open"' do
service = test_object.create_credential_service opts
service.state.should == "open"
end
end

context '#create_credential_origin_service' do
it 'creates a Metasploit::Credential::Origin object' do
opts = {
Expand Down

0 comments on commit 4f88d5b

Please sign in to comment.