Documentation
¶
Rendered for windows/amd64
Index ¶
- Constants
- func ConvertSidStrToUid(sidStr string) (int, error)
- func GetCurrentGID() int
- func GetCurrentGroupName() string
- func GetCurrentUID() int
- func GetCurrentUserPrimaryGroupSID() (*windows.SID, error)
- func GetCurrentUserSID() (*windows.SID, error)
- func GetSidName(sid *windows.SID, withDomain bool) string
- func IsProcessElevated() (bool, error)
- func IsRelativeSid(sid1 *windows.SID, sid2 *windows.SID) bool
- func LdapClose(handle uintptr)
- func LdapConnect(host string) (uintptr, error)
- func LdapGetDefaultNamingContext(handle uintptr) (string, error)
- func LdapGetTrustPosixOffset(handle uintptr, context string, domain string) (string, error)
- func LdapGetValue(handle uintptr, base string, scope uint32, filter string, attribute string) (string, error)
- type DS_DOMAIN_TRUSTSW
- type GUID
- type LSA_OBJECT_ATTRIBUTES
- type POLICY_ACCOUNT_DOMAIN_INFO
- type POLICY_DNS_DOMAIN_INFO
- type UNICODE_STRING
Constants ¶
View Source
const ( LDAP_PORT = 389 LDAP_SUCCESS = 0 LDAP_OPT_SIGN = 0x95 LDAP_OPT_ENCRYPT = 0x96 LDAP_OPT_ON = 1 LDAP_SCOPE_BASE = 0x00 LDAP_SCOPE_ONELEVEL = 0x01 LDAP_AUTH_NEGOTIATE = 0x0486 // LDAP_AUTH_OTHERKIND (0x86) | 0x0400 )
from winldap.h
View Source
const ( PolicyAccountDomainInformation = 5 PolicyDnsDomainInformation = 12 )
View Source
const ( POLICY_VIEW_LOCAL_INFORMATION = 0x00000001 POLICY_VIEW_AUDIT_INFORMATION = 0x00000002 POLICY_GET_PRIVATE_INFORMATION = 0x00000004 POLICY_TRUST_ADMIN = 0x00000008 POLICY_CREATE_ACCOUNT = 0x00000010 POLICY_CREATE_SECRET = 0x00000020 POLICY_CREATE_PRIVILEGE = 0x00000040 POLICY_SET_DEFAULT_QUOTA_LIMITS = 0x00000080 POLICY_SET_AUDIT_REQUIREMENTS = 0x00000100 POLICY_AUDIT_LOG_ADMIN = 0x00000200 POLICY_SERVER_ADMIN = 0x00000400 POLICY_LOOKUP_NAMES = 0x00000800 POLICY_NOTIFICATION = 0x00001000 )
View Source
const ( AdministratorUIDFromFUSE = 197108 // This is calcuated from the SID of Administrator user on Windows. //0x30000 + 500 AdminstratorsGIDFromFUSE = 544 // S-1-5-32-544 SystemUIDFromFUSE = 18 // S-1-5-32-18 )
View Source
const ( DS_DOMAIN_DIRECT_INBOUND = 0x0001 DS_DOMAIN_DIRECT_OUTBOUND = 0x0002 DS_DOMAIN_IN_FOREST = 0x0008 )
Variables ¶
This section is empty.
Functions ¶
func ConvertSidStrToUid ¶
func GetCurrentGID ¶
func GetCurrentGID() int
func GetCurrentGroupName ¶
func GetCurrentGroupName() string
func GetCurrentUID ¶
func GetCurrentUID() int
func GetCurrentUserSID ¶
func IsProcessElevated ¶
func LdapConnect ¶
func LdapGetTrustPosixOffset ¶
Types ¶
type DS_DOMAIN_TRUSTSW ¶
type LSA_OBJECT_ATTRIBUTES ¶
type POLICY_ACCOUNT_DOMAIN_INFO ¶
type POLICY_ACCOUNT_DOMAIN_INFO struct {
DomainName UNICODE_STRING
DomainSid *windows.SID
}
type POLICY_DNS_DOMAIN_INFO ¶
type POLICY_DNS_DOMAIN_INFO struct {
Name UNICODE_STRING
DnsDomainName UNICODE_STRING
DnsForestName UNICODE_STRING
DomainGuid GUID
Sid *windows.SID
}
https://learn.microsoft.com/en-us/windows/win32/api/lsalookup/ns-lsalookup-policy_dns_domain_info
type UNICODE_STRING ¶
Click to show internal directories.
Click to hide internal directories.