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