This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'pp' | |
require 'osx/cocoa' | |
include OSX | |
class DSLocalPassword | |
attr_reader :content | |
@@macosx_major_version = 10.7 | |
@@password_create_methods = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'osx/cocoa' | |
require 'pp' | |
require 'delegate' | |
load './password.rb' | |
include OSX | |
def load_plist(file) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# This code comes with no guarantees and it is not a "fix", just a workaround. | |
# It would be trivial to replace the patched file and restore these debugging messages. | |
# Also, this script modifies a Mac OS X System file, so... | |
require 'etc' | |
require 'fileutils' | |
require 'syslog' | |
@log = Syslog.open('patchhomedirmech') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple Provider | |
require 'fileutils' | |
Puppet::Type.type(:simple).provide(:simple) do | |
desc "Provides simple useless file creation" | |
def create | |
notice("Creating: #{resource[:name]}") | |
system('/usr/bin/touch', "#{resource[:path]}/#{resource[:name]}") | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'openssl' | |
require 'osx/cocoa' | |
include OSX | |
plain_text_pass = 'foobar' | |
file = 'user.plist' | |
user_plist = NSDictionary.dictionaryWithContentsOfFile(file) |
NewerOlder