From: Jinoh Kang jinoh.kang.kr@gmail.com
Prepare for passing the remaining subpath after object namespace traversal to the open_file() method. --- server/fd.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/server/fd.c b/server/fd.c index f28937466fc..dabba024fb9 100644 --- a/server/fd.c +++ b/server/fd.c @@ -2769,14 +2769,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 );