Windows bindings for security tokens
parent
f625f3ea47
commit
ed416d210b
|
@ -127,25 +127,6 @@ CONSTANT: SE_SELF_RELATIVE 32768
|
||||||
TYPEDEF: DWORD SECURITY_DESCRIPTOR_CONTROL
|
TYPEDEF: DWORD SECURITY_DESCRIPTOR_CONTROL
|
||||||
TYPEDEF: SECURITY_DESCRIPTOR_CONTROL* PSECURITY_DESCRIPTOR_CONTROL
|
TYPEDEF: SECURITY_DESCRIPTOR_CONTROL* PSECURITY_DESCRIPTOR_CONTROL
|
||||||
|
|
||||||
|
|
||||||
! typedef enum _TOKEN_INFORMATION_CLASS {
|
|
||||||
CONSTANT: TokenUser 1
|
|
||||||
CONSTANT: TokenGroups 2
|
|
||||||
CONSTANT: TokenPrivileges 3
|
|
||||||
CONSTANT: TokenOwner 4
|
|
||||||
CONSTANT: TokenPrimaryGroup 5
|
|
||||||
CONSTANT: TokenDefaultDacl 6
|
|
||||||
CONSTANT: TokenSource 7
|
|
||||||
CONSTANT: TokenType 8
|
|
||||||
CONSTANT: TokenImpersonationLevel 9
|
|
||||||
CONSTANT: TokenStatistics 10
|
|
||||||
CONSTANT: TokenRestrictedSids 11
|
|
||||||
CONSTANT: TokenSessionId 12
|
|
||||||
CONSTANT: TokenGroupsAndPrivileges 13
|
|
||||||
CONSTANT: TokenSessionReference 14
|
|
||||||
CONSTANT: TokenSandBoxInert 15
|
|
||||||
! } TOKEN_INFORMATION_CLASS;
|
|
||||||
|
|
||||||
ENUM: ACCESS_MODE
|
ENUM: ACCESS_MODE
|
||||||
NOT_USED_ACCESS
|
NOT_USED_ACCESS
|
||||||
GRANT_ACCESS
|
GRANT_ACCESS
|
||||||
|
@ -684,6 +665,124 @@ CONSTANT: PUBLICKEYBLOBEX HEX: A
|
||||||
CONSTANT: SIMPLEBLOB HEX: 1
|
CONSTANT: SIMPLEBLOB HEX: 1
|
||||||
CONSTANT: SYMMETRICWRAPKEYBLOB HEX: B
|
CONSTANT: SYMMETRICWRAPKEYBLOB HEX: B
|
||||||
|
|
||||||
|
TYPEDEF: void* SID
|
||||||
|
|
||||||
|
CONSTANT: SECURITY_MAX_SID_SIZE 68
|
||||||
|
|
||||||
|
ENUM: WELL_KNOWN_SID_TYPE
|
||||||
|
{ WinNullSid 0 }
|
||||||
|
{ WinWorldSid 1 }
|
||||||
|
{ WinLocalSid 2 }
|
||||||
|
{ WinCreatorOwnerSid 3 }
|
||||||
|
{ WinCreatorGroupSid 4 }
|
||||||
|
{ WinCreatorOwnerServerSid 5 }
|
||||||
|
{ WinCreatorGroupServerSid 6 }
|
||||||
|
{ WinNtAuthoritySid 7 }
|
||||||
|
{ WinDialupSid 8 }
|
||||||
|
{ WinNetworkSid 9 }
|
||||||
|
{ WinBatchSid 10 }
|
||||||
|
{ WinInteractiveSid 11 }
|
||||||
|
{ WinServiceSid 12 }
|
||||||
|
{ WinAnonymousSid 13 }
|
||||||
|
{ WinProxySid 14 }
|
||||||
|
{ WinEnterpriseControllersSid 15 }
|
||||||
|
{ WinSelfSid 16 }
|
||||||
|
{ WinAuthenticatedUserSid 17 }
|
||||||
|
{ WinRestrictedCodeSid 18 }
|
||||||
|
{ WinTerminalServerSid 19 }
|
||||||
|
{ WinRemoteLogonIdSid 20 }
|
||||||
|
{ WinLogonIdsSid 21 }
|
||||||
|
{ WinLocalSystemSid 22 }
|
||||||
|
{ WinLocalServiceSid 23 }
|
||||||
|
{ WinNetworkServiceSid 24 }
|
||||||
|
{ WinBuiltinDomainSid 25 }
|
||||||
|
{ WinBuiltinAdministratorsSid 26 }
|
||||||
|
{ WinBuiltinUsersSid 27 }
|
||||||
|
{ WinBuiltinGuestsSid 28 }
|
||||||
|
{ WinBuiltinPowerUsersSid 29 }
|
||||||
|
{ WinBuiltinAccountOperatorsSid 30 }
|
||||||
|
{ WinBuiltinSystemOperatorsSid 31 }
|
||||||
|
{ WinBuiltinPrintOperatorsSid 32 }
|
||||||
|
{ WinBuiltinBackupOperatorsSid 33 }
|
||||||
|
{ WinBuiltinReplicatorSid 34 }
|
||||||
|
{ WinBuiltinPreWindows2000CompatibleAccessSid 35 }
|
||||||
|
{ WinBuiltinRemoteDesktopUsersSid 36 }
|
||||||
|
{ WinBuiltinNetworkConfigurationOperatorsSid 37 }
|
||||||
|
{ WinAccountAdministratorSid 38 }
|
||||||
|
{ WinAccountGuestSid 39 }
|
||||||
|
{ WinAccountKrbtgtSid 40 }
|
||||||
|
{ WinAccountDomainAdminsSid 41 }
|
||||||
|
{ WinAccountDomainUsersSid 42 }
|
||||||
|
{ WinAccountDomainGuestsSid 43 }
|
||||||
|
{ WinAccountComputersSid 44 }
|
||||||
|
{ WinAccountControllersSid 45 }
|
||||||
|
{ WinAccountCertAdminsSid 46 }
|
||||||
|
{ WinAccountSchemaAdminsSid 47 }
|
||||||
|
{ WinAccountEnterpriseAdminsSid 48 }
|
||||||
|
{ WinAccountPolicyAdminsSid 49 }
|
||||||
|
{ WinAccountRasAndIasServersSid 50 }
|
||||||
|
{ WinNTLMAuthenticationSid 51 }
|
||||||
|
{ WinDigestAuthenticationSid 52 }
|
||||||
|
{ WinSChannelAuthenticationSid 53 }
|
||||||
|
{ WinThisOrganizationSid 54 }
|
||||||
|
{ WinOtherOrganizationSid 55 }
|
||||||
|
{ WinBuiltinIncomingForestTrustBuildersSid 56 }
|
||||||
|
{ WinBuiltinPerfMonitoringUsersSid 57 }
|
||||||
|
{ WinBuiltinPerfLoggingUsersSid 58 }
|
||||||
|
{ WinBuiltinAuthorizationAccessSid 59 }
|
||||||
|
{ WinBuiltinTerminalServerLicenseServersSid 60 }
|
||||||
|
{ WinBuiltinDCOMUsersSid 61 }
|
||||||
|
{ WinBuiltinIUsersSid 62 }
|
||||||
|
{ WinIUserSid 63 }
|
||||||
|
{ WinBuiltinCryptoOperatorsSid 64 }
|
||||||
|
{ WinUntrustedLabelSid 65 }
|
||||||
|
{ WinLowLabelSid 66 }
|
||||||
|
{ WinMediumLabelSid 67 }
|
||||||
|
{ WinHighLabelSid 68 }
|
||||||
|
{ WinSystemLabelSid 69 }
|
||||||
|
{ WinWriteRestrictedCodeSid 70 }
|
||||||
|
{ WinCreatorOwnerRightsSid 71 }
|
||||||
|
{ WinCacheablePrincipalsGroupSid 72 }
|
||||||
|
{ WinNonCacheablePrincipalsGroupSid 73 }
|
||||||
|
{ WinEnterpriseReadonlyControllersSid 74 }
|
||||||
|
{ WinAccountReadonlyControllersSid 75 }
|
||||||
|
{ WinBuiltinEventLogReadersGroup 76 }
|
||||||
|
{ WinNewEnterpriseReadonlyControllersSid 77 }
|
||||||
|
{ WinBuiltinCertSvcDComAccessGroup 78 } ;
|
||||||
|
|
||||||
|
ENUM: TOKEN_INFORMATION_CLASS
|
||||||
|
{ TokenUser 1 }
|
||||||
|
TokenGroups
|
||||||
|
TokenPrivileges
|
||||||
|
TokenOwner
|
||||||
|
TokenPrimaryGroup
|
||||||
|
TokenDefaultDacl
|
||||||
|
TokenSource
|
||||||
|
TokenType
|
||||||
|
TokenImpersonationLevel
|
||||||
|
TokenStatistics
|
||||||
|
TokenRestrictedSids
|
||||||
|
TokenSessionId
|
||||||
|
TokenGroupsAndPrivileges
|
||||||
|
TokenSessionReference
|
||||||
|
TokenSandBoxInert
|
||||||
|
TokenAuditPolicy
|
||||||
|
TokenOrigin
|
||||||
|
TokenElevationType
|
||||||
|
TokenLinkedToken
|
||||||
|
TokenElevation
|
||||||
|
TokenHasRestrictions
|
||||||
|
TokenAccessInformation
|
||||||
|
TokenVirtualizationAllowed
|
||||||
|
TokenVirtualizationEnabled
|
||||||
|
TokenIntegrityLevel
|
||||||
|
TokenUIAccess
|
||||||
|
TokenMandatoryPolicy
|
||||||
|
TokenLogonSid
|
||||||
|
MaxTokenInfoClass ;
|
||||||
|
|
||||||
|
TYPEDEF: TOKEN_INFORMATION_CLASS* PTOKEN_INFORMATION_CLASS
|
||||||
|
|
||||||
TYPEDEF: uint ALG_ID
|
TYPEDEF: uint ALG_ID
|
||||||
|
|
||||||
STRUCT: PUBLICKEYSTRUC
|
STRUCT: PUBLICKEYSTRUC
|
||||||
|
@ -819,7 +918,7 @@ FUNCTION: BOOL AllocateAndInitializeSid (
|
||||||
! : CreateServiceA ;
|
! : CreateServiceA ;
|
||||||
! : CreateServiceW ;
|
! : CreateServiceW ;
|
||||||
! : CreateTraceInstanceId ;
|
! : CreateTraceInstanceId ;
|
||||||
! : CreateWellKnownSid ;
|
FUNCTION: BOOL CreateWellKnownSid ( WELL_KNOWN_SID_TYPE WellKnownSidType, PSID DomainSid, PSID pSid, DWORD *cbSid ) ;
|
||||||
! : CredDeleteA ;
|
! : CredDeleteA ;
|
||||||
! : CredDeleteW ;
|
! : CredDeleteW ;
|
||||||
! : CredEnumerateA ;
|
! : CredEnumerateA ;
|
||||||
|
@ -1006,7 +1105,7 @@ FUNCTION: BOOL GetSecurityDescriptorSacl ( PSECURITY_DESCRIPTOR pSecurityDescrip
|
||||||
! : GetSidLengthRequired ;
|
! : GetSidLengthRequired ;
|
||||||
! : GetSidSubAuthority ;
|
! : GetSidSubAuthority ;
|
||||||
! : GetSidSubAuthorityCount ;
|
! : GetSidSubAuthorityCount ;
|
||||||
! : GetTokenInformation ;
|
FUNCTION: BOOL GetTokenInformation ( HANDLE TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, LPVOID TokenInformation, DWORD TokenInformationLenghth, PWORD ReturnLength ) ;
|
||||||
! : GetTraceEnableFlags ;
|
! : GetTraceEnableFlags ;
|
||||||
! : GetTraceEnableLevel ;
|
! : GetTraceEnableLevel ;
|
||||||
! : GetTraceLoggerHandle ;
|
! : GetTraceLoggerHandle ;
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors alien alien.data alien.syntax classes.struct
|
USING: accessors alien alien.data alien.syntax classes.struct
|
||||||
continuations fry kernel libc literals locals sequences
|
continuations fry kernel libc literals locals sequences
|
||||||
windows.advapi32 windows.errors windows.kernel32 windows.types ;
|
windows.advapi32 windows.errors windows.kernel32 windows.types
|
||||||
|
alien.c-types ;
|
||||||
IN: windows.privileges
|
IN: windows.privileges
|
||||||
|
|
||||||
TYPEDEF: TOKEN_PRIVILEGES* PTOKEN_PRIVILEGES
|
TYPEDEF: TOKEN_PRIVILEGES* PTOKEN_PRIVILEGES
|
||||||
|
|
|
@ -223,3 +223,5 @@ FUNCTION: HRESULT SHGetDesktopFolder ( IShellFolder** ppshf ) ;
|
||||||
|
|
||||||
FUNCTION: UINT DragQueryFileW ( HDROP hDrop, UINT iFile, LPWSTR lpszFile, UINT cch ) ;
|
FUNCTION: UINT DragQueryFileW ( HDROP hDrop, UINT iFile, LPWSTR lpszFile, UINT cch ) ;
|
||||||
ALIAS: DragQueryFile DragQueryFileW
|
ALIAS: DragQueryFile DragQueryFileW
|
||||||
|
|
||||||
|
FUNCTION: BOOL IsUserAnAdmin ( ) ;
|
Loading…
Reference in New Issue