Home | History | Annotate | Download | only in include
      1 /**
      2  * This file has no copyright assigned and is placed in the Public Domain.
      3  * This file is part of the mingw-w64 runtime package.
      4  * No warranty is given; refer to the file DISCLAIMER.PD within this package.
      5  */
      6 #ifndef __SDDL_H__
      7 #define __SDDL_H__
      8 
      9 #include <_mingw_unicode.h>
     10 
     11 #ifdef __cplusplus
     12 extern "C" {
     13 #endif
     14 
     15 #define SDDL_REVISION_1 1
     16 #define SDDL_REVISION SDDL_REVISION_1
     17 
     18 #define SDDL_OWNER TEXT("O")
     19 #define SDDL_GROUP TEXT("G")
     20 #define SDDL_DACL TEXT("D")
     21 #define SDDL_SACL TEXT("S")
     22 
     23 #define SDDL_PROTECTED TEXT("P")
     24 #define SDDL_AUTO_INHERIT_REQ TEXT("AR")
     25 #define SDDL_AUTO_INHERITED TEXT("AI")
     26 
     27 #define SDDL_ACCESS_ALLOWED TEXT("A")
     28 #define SDDL_ACCESS_DENIED TEXT("D")
     29 #define SDDL_OBJECT_ACCESS_ALLOWED TEXT("OA")
     30 #define SDDL_OBJECT_ACCESS_DENIED TEXT("OD")
     31 #define SDDL_AUDIT TEXT("AU")
     32 #define SDDL_ALARM TEXT("AL")
     33 #define SDDL_OBJECT_AUDIT TEXT("OU")
     34 #define SDDL_OBJECT_ALARM TEXT("OL")
     35 
     36 #define SDDL_CONTAINER_INHERIT TEXT("CI")
     37 #define SDDL_OBJECT_INHERIT TEXT("OI")
     38 #define SDDL_NO_PROPAGATE TEXT("NP")
     39 #define SDDL_INHERIT_ONLY TEXT("IO")
     40 #define SDDL_INHERITED TEXT("ID")
     41 #define SDDL_AUDIT_SUCCESS TEXT("SA")
     42 #define SDDL_AUDIT_FAILURE TEXT("FA")
     43 
     44 #define SDDL_READ_PROPERTY TEXT("RP")
     45 #define SDDL_WRITE_PROPERTY TEXT("WP")
     46 #define SDDL_CREATE_CHILD TEXT("CC")
     47 #define SDDL_DELETE_CHILD TEXT("DC")
     48 #define SDDL_LIST_CHILDREN TEXT("LC")
     49 #define SDDL_SELF_WRITE TEXT("SW")
     50 #define SDDL_LIST_OBJECT TEXT("LO")
     51 #define SDDL_DELETE_TREE TEXT("DT")
     52 #define SDDL_CONTROL_ACCESS TEXT("CR")
     53 #define SDDL_READ_CONTROL TEXT("RC")
     54 #define SDDL_WRITE_DAC TEXT("WD")
     55 #define SDDL_WRITE_OWNER TEXT("WO")
     56 #define SDDL_STANDARD_DELETE TEXT("SD")
     57 #define SDDL_GENERIC_ALL TEXT("GA")
     58 #define SDDL_GENERIC_READ TEXT("GR")
     59 #define SDDL_GENERIC_WRITE TEXT("GW")
     60 #define SDDL_GENERIC_EXECUTE TEXT("GX")
     61 #define SDDL_FILE_ALL TEXT("FA")
     62 #define SDDL_FILE_READ TEXT("FR")
     63 #define SDDL_FILE_WRITE TEXT("FW")
     64 #define SDDL_FILE_EXECUTE TEXT("FX")
     65 #define SDDL_KEY_ALL TEXT("KA")
     66 #define SDDL_KEY_READ TEXT("KR")
     67 #define SDDL_KEY_WRITE TEXT("KW")
     68 #define SDDL_KEY_EXECUTE TEXT("KX")
     69 
     70 #define SDDL_ALIAS_SIZE 2
     71 
     72 #define SDDL_DOMAIN_ADMINISTRATORS TEXT("DA")
     73 #define SDDL_DOMAIN_GUESTS TEXT("DG")
     74 #define SDDL_DOMAIN_USERS TEXT("DU")
     75 #define SDDL_ENTERPRISE_DOMAIN_CONTROLLERS TEXT("ED")
     76 #define SDDL_DOMAIN_DOMAIN_CONTROLLERS TEXT("DD")
     77 #define SDDL_DOMAIN_COMPUTERS TEXT("DC")
     78 #define SDDL_BUILTIN_ADMINISTRATORS TEXT("BA")
     79 #define SDDL_BUILTIN_GUESTS TEXT("BG")
     80 #define SDDL_BUILTIN_USERS TEXT("BU")
     81 #define SDDL_LOCAL_ADMIN TEXT("LA")
     82 #define SDDL_LOCAL_GUEST TEXT("LG")
     83 #define SDDL_ACCOUNT_OPERATORS TEXT("AO")
     84 #define SDDL_BACKUP_OPERATORS TEXT("BO")
     85 #define SDDL_PRINTER_OPERATORS TEXT("PO")
     86 #define SDDL_SERVER_OPERATORS TEXT("SO")
     87 #define SDDL_AUTHENTICATED_USERS TEXT("AU")
     88 #define SDDL_PERSONAL_SELF TEXT("PS")
     89 #define SDDL_CREATOR_OWNER TEXT("CO")
     90 #define SDDL_CREATOR_GROUP TEXT("CG")
     91 #define SDDL_LOCAL_SYSTEM TEXT("SY")
     92 #define SDDL_POWER_USERS TEXT("PU")
     93 #define SDDL_EVERYONE TEXT("WD")
     94 #define SDDL_REPLICATOR TEXT("RE")
     95 #define SDDL_INTERACTIVE TEXT("IU")
     96 #define SDDL_NETWORK TEXT("NU")
     97 #define SDDL_SERVICE TEXT("SU")
     98 #define SDDL_RESTRICTED_CODE TEXT("RC")
     99 #define SDDL_ANONYMOUS TEXT("AN")
    100 #define SDDL_SCHEMA_ADMINISTRATORS TEXT("SA")
    101 #define SDDL_CERT_SERV_ADMINISTRATORS TEXT("CA")
    102 #define SDDL_RAS_SERVERS TEXT("RS")
    103 #define SDDL_ENTERPRISE_ADMINS TEXT("EA")
    104 #define SDDL_GROUP_POLICY_ADMINS TEXT("PA")
    105 #define SDDL_ALIAS_PREW2KCOMPACC TEXT("RU")
    106 #define SDDL_LOCAL_SERVICE TEXT("LS")
    107 #define SDDL_NETWORK_SERVICE TEXT("NS")
    108 #define SDDL_REMOTE_DESKTOP TEXT("RD")
    109 #define SDDL_NETWORK_CONFIGURATION_OPS TEXT("NO")
    110 #define SDDL_PERFMON_USERS TEXT("MU")
    111 #define SDDL_PERFLOG_USERS TEXT("LU")
    112 
    113 #define SDDL_SEPERATORC TEXT(';')
    114 #define SDDL_DELIMINATORC TEXT(':')
    115 #define SDDL_ACE_BEGINC TEXT('(')
    116 #define SDDL_ACE_ENDC TEXT(')')
    117 
    118 #define SDDL_SEPERATOR TEXT(";")
    119 #define SDDL_DELIMINATOR TEXT(":")
    120 #define SDDL_ACE_BEGIN TEXT("(")
    121 #define SDDL_ACE_END TEXT(")")
    122 
    123 #define ConvertSidToStringSid __MINGW_NAME_AW(ConvertSidToStringSid)
    124 #define ConvertStringSidToSid __MINGW_NAME_AW(ConvertStringSidToSid)
    125 #define ConvertStringSecurityDescriptorToSecurityDescriptor __MINGW_NAME_AW(ConvertStringSecurityDescriptorToSecurityDescriptor)
    126 #define ConvertSecurityDescriptorToStringSecurityDescriptor __MINGW_NAME_AW(ConvertSecurityDescriptorToStringSecurityDescriptor)
    127 
    128   WINADVAPI WINBOOL WINAPI ConvertSidToStringSidA(PSID Sid,LPSTR *StringSid);
    129   WINADVAPI WINBOOL WINAPI ConvertSidToStringSidW(PSID Sid,LPWSTR *StringSid);
    130   WINADVAPI WINBOOL WINAPI ConvertStringSidToSidA(LPCSTR StringSid,PSID *Sid);
    131   WINADVAPI WINBOOL WINAPI ConvertStringSidToSidW(LPCWSTR StringSid,PSID *Sid);
    132   WINADVAPI WINBOOL WINAPI ConvertStringSecurityDescriptorToSecurityDescriptorA(LPCSTR StringSecurityDescriptor,DWORD StringSDRevision,PSECURITY_DESCRIPTOR *SecurityDescriptor,PULONG SecurityDescriptorSize);
    133   WINADVAPI WINBOOL WINAPI ConvertStringSecurityDescriptorToSecurityDescriptorW(LPCWSTR StringSecurityDescriptor,DWORD StringSDRevision,PSECURITY_DESCRIPTOR *SecurityDescriptor,PULONG SecurityDescriptorSize);
    134   WINADVAPI WINBOOL WINAPI ConvertSecurityDescriptorToStringSecurityDescriptorA(PSECURITY_DESCRIPTOR SecurityDescriptor,DWORD RequestedStringSDRevision,SECURITY_INFORMATION SecurityInformation,LPSTR *StringSecurityDescriptor,PULONG StringSecurityDescriptorLen);
    135   WINADVAPI WINBOOL WINAPI ConvertSecurityDescriptorToStringSecurityDescriptorW(PSECURITY_DESCRIPTOR SecurityDescriptor,DWORD RequestedStringSDRevision,SECURITY_INFORMATION SecurityInformation,LPWSTR *StringSecurityDescriptor,PULONG StringSecurityDescriptorLen);
    136 
    137 #ifdef __cplusplus
    138 }
    139 #endif
    140 #endif
    141