summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorNigel Kersten <nigelk@google.com>2008-12-04 13:07:02 -0800
committerJames Turnbull <james@lovedthanlost.net>2008-12-06 12:10:36 +1100
commited49153c28a640c941fb9e1d70f196a454ecf151 (patch)
treeceae0399d01f68c1e76a22445992e9b95d67169e /lib
parent05e05bb70a2eb6b57b59340c15f4c205a4803b3e (diff)
downloadpuppet-ed49153c28a640c941fb9e1d70f196a454ecf151.tar.gz
puppet-ed49153c28a640c941fb9e1d70f196a454ecf151.tar.xz
puppet-ed49153c28a640c941fb9e1d70f196a454ecf151.zip
new better way of doing stdin
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/provider/macauthorization/macauthorization.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/puppet/provider/macauthorization/macauthorization.rb b/lib/puppet/provider/macauthorization/macauthorization.rb
index 9d4886e90..8d20f0819 100644
--- a/lib/puppet/provider/macauthorization/macauthorization.rb
+++ b/lib/puppet/provider/macauthorization/macauthorization.rb
@@ -100,6 +100,7 @@ Puppet::Type.type(:macauthorization).provide :macauthorization, :parent => Puppe
# take the current values, merge the specified values to obtain a complete
# description of the new values.
new_values = current_values.merge(specified_values)
+ Puppet.notice "new values: #{new_values}"
# the security binary only allows for writes using stdin, so we dump this
# to a tempfile.
@@ -107,9 +108,9 @@ Puppet::Type.type(:macauthorization).provide :macauthorization, :parent => Puppe
begin
tmp.flush
Plist::Emit.save_plist(new_values, tmp.path)
- tmp.flush
+ # tmp.flush
cmds = [] << :security << "authorizationdb" << "write" << resource[:name]
- output = execute(cmds, :combine => false, :stdin => tmp.path)
+ output = execute(cmds, :stdinfile => tmp.path.to_s)
ensure
tmp.close
tmp.unlink