# File lib/puppet/provider/macauthorization/macauthorization.rb, line 202
202:   def set_rule(name, values)
203:     # Both creates and modifies rules as it overwrites the entry in the
204:     # rules dictionary.  Unfortunately the security binary doesn't
205:     # support modifying rules at all so we have to twiddle the whole
206:     # plist... :( See Apple Bug #6386000
207:     values = convert_plist_to_native_attributes(values)
208:     authdb = Plist::parse_xml(AuthDB)
209:     authdb["rules"][name] = values
210: 
211:     begin
212:       Plist::Emit.save_plist(authdb, AuthDB)
213:     rescue
214:       raise Puppet::Error.new("Error writing to: #{AuthDB}")
215:     end
216:   end