# File lib/puppet/provider/macauthorization/macauthorization.rb, line 179
179:   def set_right(name, values)
180:     # Both creates and modifies rights as it simply overwrites them.
181:     # The security binary only allows for writes using stdin, so we
182:     # dump the values to a tempfile.
183:     values = convert_plist_to_native_attributes(values)
184:     tmp = Tempfile.new('puppet_macauthorization')
185:     begin
186:       Plist::Emit.save_plist(values, tmp.path)
187:       cmds = []
188:       cmds << :security << "authorizationdb" << "write" << name
189: 
190:         output = execute(
191:           cmds, :combine => false,
192: 
193:             :stdinfile => tmp.path.to_s)
194:     rescue Errno::EACCES => e
195:       raise Puppet::Error.new("Cannot save right to #{tmp.path}: #{e}")
196:     ensure
197:       tmp.close
198:       tmp.unlink
199:     end
200:   end