47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# File 'lib/active_samba_ldap/active_directory.rb', line 47
def resolve(name, security_enabled=true)
type = 0
case name.to_s
when "global"
type = GLOBAL_GROUP
when /\Adomain[-_]local\z/
type = DOMAIN_LOCAL_GROUP
when "universal"
type = UNIVERSAL_GROUP
else
raise ArgumentError, "unknown group type: #{name.inspect}: " +
"available: [:global, :domain_local, :universal]"
end
type |= SECURITY_ENABLED if security_enabled
[type].pack("L").unpack("l")[0]
end
|