NAME
Win32::SDDL - SDDL parsing module for Windows
SYNOPSIS
use Win32::SDDL;
my $sddl = Win32::SDDL->new('service');
$sddl->Import('D:(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPLOCRRC;;;PU)');
foreach my $account(@{$sddl->{Trustees}}){
print "$account...".scalar(@{$sddl->{$account}})." entries found.\n";
};
DESCRIPTION
This module was created to aid in interpreting SDDL strings commonly used in Windows to represent access control lists. SDDL stands for Security Descriptor Definition Language. Because SDDL uses many predefined constants, it can be difficult to read. This module provides an object-oriented interface for converting and using the information in SDDL strings.
NOTE: For resources relating to SDDL, see the SEE ALSO section of this document.
METHODS
- Win32::SDDL->new(*type*);
-
Example:
my $sddl = Win32::SDDL-
new('service');>Creates a new Win32::SDDL object. Optionally, an object type can be provided. The only optional type supported at present is 'service'. This will change the value of certain constants as they have a different meaning for services than they do for files, registry keys, or other objects.
- $sddl->Import($sddl_string);
-
Example:
my $sddl_string = 'D:(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPLOCRRC;;;PU)';
$sddl-
Import($sddl_string) or die("Error! Unable to import '$sddl_string'!\n");>
PROPERTIES
All Win32::SDDL objects have the following properties:
- $sddl->{SDString}
-
The currently loaded SDDL string
- $sddl->{Type}
-
The type of SDDL string (changes the description of some constants).
- $sddl->{SDString}
-
The currently loaded SDDL string
- $sddl->{ACL}
-
An array of Win32::SDDL::ACE objects.
Each object has the following properties:
- Flags
-
An array of flags translated into English.
- AccessMask
-
An array of permissions translated into English.
- Type
-
The type of ACE (SYSTEM_AUDIT,ACCESS_ALLOW, or ACCESS_DENY).
- objectType
-
A GUID representing the object type for the ACE (usually empty).
- InheritedObjectType
-
A GUID representing the parent object type if it exists.
- Trustee
-
The Trustee name.
SEE ALSO
http://windowssdk.msdn.microsoft.com/en-us/library/ms723280.aspx
COPYRIGHT
Copyright 2006 Tim Johnson
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHOR
Tim Johnson <tojo2000@tojo2000.com>