Skip to content
Snippets Groups Projects
Commit 562a0666 authored by Jinoh Kang's avatar Jinoh Kang Committed by Joel Holdsworth
Browse files

server: Inline open_named_object() call in open_file_object handler.

Prepare for passing the remaining subpath after object namespace
traversal to the open_file() method.
parent d20a7632
No related branches found
No related tags found
No related merge requests found
......@@ -2821,14 +2821,19 @@ DECL_HANDLER(open_file_object)
{
struct unicode_str name = get_req_unicode_str();
struct object *obj, *result, *root = NULL;
struct unicode_str name_left;
if (req->rootdir && !(root = get_handle_obj( current->process, req->rootdir, 0, NULL ))) return;
obj = open_named_object( root, NULL, &name, req->attributes );
obj = lookup_named_object( root, &name, req->attributes, &name_left );
if (root) release_object( root );
if (!obj) return;
if ((result = obj->ops->open_file( obj, req->access, req->sharing, req->options )))
if (name_left.len) /* not fully parsed */
{
set_error( STATUS_OBJECT_NAME_NOT_FOUND );
}
else if ((result = obj->ops->open_file( obj, req->access, req->sharing, req->options )))
{
reply->handle = alloc_handle( current->process, result, req->access, req->attributes );
release_object( result );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment