Commit ab40a971 authored by Alex Tayts's avatar Alex Tayts
Browse files

add kerberos distribution as a parameter heimdal

parent 51f5d9fb
......@@ -22,7 +22,7 @@ Puppet::Type.type(:wallet).provide(:wallet) do
# if file is a keytab, read what's in it
begin
if File.file?("/usr/bin/heimtools")
if @resource[:hiemdal] == :true
# Heimdal Kerberos is installed
princs = ktutil("-k", @resource[:path], "list").split("/n")
else
......@@ -32,7 +32,7 @@ Puppet::Type.type(:wallet).provide(:wallet) do
# Check if a principal we need is present. If absent,
# we do not need further verification
return (princs.any? { |s| s.include?(@resource[:name])})
return (princs.any? { |s| s.include?(@resource[:name]) })
rescue
# Keytab is damaged, get it out of the way
# and require a refresh from wallet.
......
......@@ -52,9 +52,16 @@ Puppet::Type.newtype(:wallet) do
end
end
newparam(:verify, :boolean => true, :parent => Puppet::Parameter::Boolean) do
newparam(:heimdal, :boolean => true) do
desc "Kerberos distribution"
defaultto(:false)
newvalues(:true, :false)
end
newparam(:verify, :boolean => true) do
desc "Enable/disable wallet object validation"
defaultto(true)
defaultto(:true)
newvalues(:true, :false)
end
newproperty(:owner) do
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment