[Win32utils-devel] Some more win32-security: SID.create
Berger, Daniel
Daniel.Berger at qwest.com
Tue Jul 8 15:38:00 EDT 2008
Hi all,
How does this look as a general approach to a SID.create method:
# Creates and initializes
def self.create(authority, *sub_authorities)
if sub_authorities.length > 8
raise ArgumentError, 'maximum of 8 subauthorities allowed'
end
authorities = Array.new(8, 0)
authorities.replace(sub_authorities)
count = authorities.select{ |e| e > 0 }.size
if count == 0
# Use InitializeSid()
else
# Use AllocateAndInitializeSid()
end
end
Any help actually implementing this method would also be greatly
appreciated, as my attempts were not working out so well.
Thanks,
Dan
This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly
prohibited and may be unlawful. If you have received this communication
in error, please immediately notify the sender by reply e-mail and destroy
all copies of the communication and any attachments.
More information about the win32utils-devel
mailing list