Include the callerid in all requests not just ones initiated by clients, this ensures that registration messages also include the callerid.
This is a regression that was introduced during #5701 and not yet released code. Signed-off-by: R.I.Pienaar <[email protected]> --- Local-branch: bug/master/7228 lib/mcollective/security/base.rb | 22 +++++++++------------- spec/unit/security/base_spec.rb | 1 + 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/lib/mcollective/security/base.rb b/lib/mcollective/security/base.rb index 9c9d611..53663ef 100644 --- a/lib/mcollective/security/base.rb +++ b/lib/mcollective/security/base.rb @@ -144,19 +144,15 @@ module MCollective target_collective = parsed_target[:collective] end - req = {:body => msg, - :senderid => @config.identity, - :requestid => reqid, - :msgtarget => target, - :filter => filter, - :collective => target_collective, - :agent => target_agent, - :msgtime => Time.now.to_i} - - # if we're in use by a client add the callerid to the main client hashes - req[:callerid] = callerid if initiated_by == :client - - return req + {:body => msg, + :senderid => @config.identity, + :requestid => reqid, + :msgtarget => target, + :filter => filter, + :collective => target_collective, + :agent => target_agent, + :callerid => callerid, + :msgtime => Time.now.to_i} end # Returns a unique id for the caller, by default we just use the unix diff --git a/spec/unit/security/base_spec.rb b/spec/unit/security/base_spec.rb index 5c1adab..4bf3443 100644 --- a/spec/unit/security/base_spec.rb +++ b/spec/unit/security/base_spec.rb @@ -154,6 +154,7 @@ module MCollective::Security :senderid => "test", :requestid => "reqid", :msgtarget => "/topic/mcollective.discovery.command", + :callerid => "uid=#{Process.uid}", :agent => "discovery", :collective => "mcollective", :filter => "filter", -- 1.7.1 -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
