- Catch illegal call to Ob functions when ObjectAttributes == NULL and return distinguished status code for this situation (STATUS_INVALID_PARAMETER), instead of failing due to access violation.

- Create the BNO Global and Local symbolic links in kernel32.
- We pass all the Ob+Native tests in ntdll_winetest om now (we fail some named pipe ones, but I have no idea why WINE calls them "Object Manager" related...)

svn path=/trunk/; revision=22652
This commit is contained in:
Alex Ionescu
2006-06-27 03:06:26 +00:00
parent 7c3d15c5f9
commit bc5d1b0581
2 changed files with 41 additions and 0 deletions
+33
View File
@@ -66,7 +66,10 @@ OpenBaseDirectory(PHANDLE DirHandle)
{
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING Name = RTL_CONSTANT_STRING(L"\\BaseNamedObjects");
UNICODE_STRING SymName = RTL_CONSTANT_STRING(L"Local");
UNICODE_STRING SymName2 = RTL_CONSTANT_STRING(L"Global");
NTSTATUS Status;
HANDLE SymHandle;
InitializeObjectAttributes(&ObjectAttributes,
&Name,
@@ -88,6 +91,36 @@ OpenBaseDirectory(PHANDLE DirHandle)
{
DPRINT1("NtCreateDirectoryObject() failed\n");
}
/* Create the "local" Symbolic Link. FIXME: CSR should do this */
InitializeObjectAttributes(&ObjectAttributes,
&SymName,
OBJ_CASE_INSENSITIVE,
*DirHandle,
NULL);
Status = NtCreateSymbolicLinkObject(&SymHandle,
SYMBOLIC_LINK_ALL_ACCESS,
&ObjectAttributes,
&Name);
if (!NT_SUCCESS(Status))
{
DPRINT1("NtCreateSymbolicLinkObject() failed\n");
}
/* Create the "global" Symbolic Link. FIXME: CSR should do this */
InitializeObjectAttributes(&ObjectAttributes,
&SymName2,
OBJ_CASE_INSENSITIVE,
*DirHandle,
NULL);
Status = NtCreateSymbolicLinkObject(&SymHandle,
SYMBOLIC_LINK_ALL_ACCESS,
&ObjectAttributes,
&Name);
if (!NT_SUCCESS(Status))
{
DPRINT1("NtCreateSymbolicLinkObject() failed\n");
}
}
DPRINT("Opened BNO: %lx\n", *DirHandle);
+8
View File
@@ -1455,6 +1455,14 @@ ObOpenObjectByName(IN POBJECT_ATTRIBUTES ObjectAttributes,
OB_OPEN_REASON OpenReason;
PAGED_CODE();
/* Check if we didn't get any Object Attributes */
if (!ObjectAttributes)
{
/* Fail with special status code */
*Handle = NULL;
return STATUS_INVALID_PARAMETER;
}
/* Capture all the info */
Status = ObpCaptureObjectAttributes(ObjectAttributes,
AccessMode,