def callerid
if @config.pluginconf.include?("psk.callertype")
callertype = @config.pluginconf["psk.callertype"].to_sym if @config.pluginconf.include?("psk.callertype")
else
callertype = :uid
end
case callertype
when :gid
id = "gid=#{Process.gid}"
when :group
raise "Cannot use the 'group' callertype for the PSK security plugin on the Windows platform" if Util.windows?
id = "group=#{Etc.getgrgid(Process.gid).name}"
when :user
id = "user=#{Etc.getlogin}"
when :identity
id = "identity=#{@config.identity}"
else
id ="uid=#{Process.uid}"
end
Log.debug("Setting callerid to #{id} based on callertype=#{callertype}")
id
end