46{
47 static WCHAR machineW[] = {
'W',
'i',
'n',
'e',
'N',
'o',
'M',
'a',
'c',
'h',
'i',
'n',
'e',0};
52
53 ZeroMemory(&object_attributes,
sizeof(object_attributes));
54 object_attributes.
Length =
sizeof(object_attributes);
55
59
62 "LsaOpenPolicy(POLICY_LOOKUP_NAMES) for invalid machine returned 0x%08x\n",
status);
63
66 "LsaOpenPolicy(POLICY_ALL_ACCESS) returned 0x%08x\n",
status);
67
68
70 trace(
"LsaOpenPolicy(POLICY_ALL_ACCESS) failed, trying POLICY_VIEW_LOCAL_INFORMATION|POLICY_LOOKUP_NAMES\n");
73 }
74
82
85 skip(
"Not enough rights to retrieve PolicyAuditEventsInformation\n");
86 else
90
94 if (primary_domain_info->
Sid) {
97 {
104 trace(
" name: %s sid: %s\n",
name, strsid);
106 } else
107 trace(
" name: NULL sid: %s\n", strsid);
109 }
110 else
111 trace(
"invalid sid\n");
112 }
113 else
114 trace(
"Running on a standalone system.\n");
116 }
117
122
123
126 "LsaQueryInformationPolicy(PolicyDnsDomainInformation) failed, returned 0x%08x\n",
status);
136 guidstrW[0] = '\0';
146 }
151 }
156 }
157 trace(
" name: %s domain: %s forest: %s guid: %s sid: %s\n",
159 forest ? forest : "NULL", guidstr, strsid ? strsid : "NULL");
165 }
166 else
167 trace(
"Running on a standalone system.\n");
169 }
170
171
181 trace(
"Resizing buffer to %u.\n",
len);
183 if (token_user !=
NULL)
185 }
186
191 rights_count = 0xcafecafe;
196 else
197 ok(rights ==
NULL && rights_count == 0,
"Expected rights and rights_count to be set to 0 on failure\n");
198 }
202 }
203
206 }
207}
#define ERROR_INSUFFICIENT_BUFFER
NTSTATUS WINAPI LsaOpenPolicy(IN PLSA_UNICODE_STRING SystemName OPTIONAL, IN PLSA_OBJECT_ATTRIBUTES ObjectAttributes, IN ACCESS_MASK DesiredAccess, OUT PLSA_HANDLE PolicyHandle)
NTSTATUS WINAPI LsaQueryInformationPolicy(IN LSA_HANDLE PolicyHandle, IN POLICY_INFORMATION_CLASS InformationClass, OUT PVOID *Buffer)
NTSTATUS WINAPI LsaFreeMemory(IN PVOID Buffer)
NTSTATUS WINAPI LsaEnumerateAccountRights(IN LSA_HANDLE PolicyHandle, IN PSID AccountSid, OUT PLSA_UNICODE_STRING *UserRights, OUT PULONG CountOfRights)
NTSTATUS WINAPI LsaClose(IN LSA_HANDLE ObjectHandle)
BOOL WINAPI GetTokenInformation(HANDLE TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, LPVOID TokenInformation, DWORD TokenInformationLength, PDWORD ReturnLength)
BOOL WINAPI OpenProcessToken(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle)
BOOL WINAPI ConvertSidToStringSidA(PSID Sid, LPSTR *StringSid)
#define GetCurrentProcess()
#define WideCharToMultiByte
INT WINAPI StringFromGUID2(REFGUID id, LPOLESTR str, INT cmax)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat token
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
HLOCAL NTAPI LocalFree(HLOCAL hMem)
static const WCHAR machineW[]
static const char machine[]
@ PolicyAuditEventsInformation
@ PolicyDnsDomainInformation
@ PolicyPrimaryDomainInformation
@ PolicyAccountDomainInformation
struct _LSA_UNICODE_STRING * PLSA_UNICODE_STRING
#define POLICY_VIEW_LOCAL_INFORMATION
#define POLICY_ALL_ACCESS
#define POLICY_LOOKUP_NAMES
#define RPC_NT_SERVER_UNAVAILABLE
#define IsEqualGUID(rguid1, rguid2)
LSA_UNICODE_STRING DnsDomainName
LSA_UNICODE_STRING DnsForestName
#define STATUS_ACCESS_DENIED
#define STATUS_INVALID_PARAMETER
#define STATUS_OBJECT_NAME_NOT_FOUND