kernel32: Handle the SECURITY_* flags passed into CreateFileW by filling out the SECURITY_QUALITY_OF_SERVICE structure and passing it to NtCreateFile.

Print a fixme in NtCreateFile if the SECURITY_QUALITY_OF_SERVICE
structure is specified, since it isn't handled yet.
This commit is contained in:
Rob Shearman 2007-01-19 07:00:29 -06:00 committed by Alexandre Julliard
parent 0debcf5b1e
commit 8132707bce
2 changed files with 15 additions and 1 deletions

View File

@ -1281,6 +1281,7 @@ HANDLE WINAPI CreateFileW( LPCWSTR filename, DWORD access, DWORD sharing,
static const WCHAR bkslashes_with_dotW[] = {'\\','\\','.','\\',0};
static const WCHAR coninW[] = {'C','O','N','I','N','$',0};
static const WCHAR conoutW[] = {'C','O','N','O','U','T','$',0};
SECURITY_QUALITY_OF_SERVICE qos;
static const UINT nt_disposition[5] =
{
@ -1406,7 +1407,16 @@ HANDLE WINAPI CreateFileW( LPCWSTR filename, DWORD access, DWORD sharing,
attr.Attributes = OBJ_CASE_INSENSITIVE;
attr.ObjectName = &nameW;
attr.SecurityDescriptor = sa ? sa->lpSecurityDescriptor : NULL;
attr.SecurityQualityOfService = NULL;
if (attributes & SECURITY_SQOS_PRESENT)
{
qos.Length = sizeof(qos);
qos.ImpersonationLevel = (attributes >> 16) & 0x3;
qos.ContextTrackingMode = attributes & SECURITY_CONTEXT_TRACKING ? SECURITY_DYNAMIC_TRACKING : SECURITY_STATIC_TRACKING;
qos.EffectiveOnly = attributes & SECURITY_EFFECTIVE_ONLY ? TRUE : FALSE;
attr.SecurityQualityOfService = &qos;
}
else
attr.SecurityQualityOfService = NULL;
if (sa && sa->bInheritHandle) attr.Attributes |= OBJ_INHERIT;

View File

@ -162,6 +162,8 @@ NTSTATUS WINAPI NtCreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATTRIB
if (attr->ObjectName->Length > sizeof(pipeW) &&
!memicmpW( attr->ObjectName->Buffer, pipeW, sizeof(pipeW)/sizeof(WCHAR) ))
{
if (attr->SecurityQualityOfService)
FIXME("SecurityQualityOfService ignored\n");
SERVER_START_REQ( open_named_pipe )
{
req->access = access;
@ -182,6 +184,8 @@ NTSTATUS WINAPI NtCreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATTRIB
if (attr->ObjectName->Length > sizeof(mailslotW) &&
!memicmpW( attr->ObjectName->Buffer, mailslotW, sizeof(mailslotW)/sizeof(WCHAR) ))
{
if (attr->SecurityQualityOfService)
FIXME("SecurityQualityOfService ignored\n");
SERVER_START_REQ( open_mailslot )
{
req->access = access & GENERIC_WRITE;