diff --git a/dlls/kernel/change.c b/dlls/kernel/change.c index e2d6978c038..601c18fafaf 100644 --- a/dlls/kernel/change.c +++ b/dlls/kernel/change.c @@ -88,9 +88,11 @@ HANDLE WINAPI FindFirstChangeNotificationW( LPCWSTR lpPathName, BOOL bWatchSubtr SERVER_START_REQ( create_change_notification ) { - req->handle = file; - req->subtree = bWatchSubtree; - req->filter = dwNotifyFilter; + req->access = STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE; + req->attributes = 0; + req->handle = file; + req->subtree = bWatchSubtree; + req->filter = dwNotifyFilter; if (!wine_server_call_err( req )) ret = reply->handle; } SERVER_END_REQ; diff --git a/dlls/ntdll/reg.c b/dlls/ntdll/reg.c index 5ade8bdea5c..d05d9c7deb9 100644 --- a/dlls/ntdll/reg.c +++ b/dlls/ntdll/reg.c @@ -63,11 +63,12 @@ NTSTATUS WINAPI NtCreateKey( PHANDLE retkey, ACCESS_MASK access, const OBJECT_AT SERVER_START_REQ( create_key ) { - req->parent = attr->RootDirectory; - req->access = access; - req->options = options; - req->modif = 0; - req->namelen = attr->ObjectName->Length; + req->parent = attr->RootDirectory; + req->access = access; + req->attributes = attr->Attributes; + req->options = options; + req->modif = 0; + req->namelen = attr->ObjectName->Length; wine_server_add_data( req, attr->ObjectName->Buffer, attr->ObjectName->Length ); if (class) wine_server_add_data( req, class->Buffer, class->Length ); if (!(ret = wine_server_call( req ))) @@ -123,8 +124,9 @@ NTSTATUS WINAPI NtOpenKey( PHANDLE retkey, ACCESS_MASK access, const OBJECT_ATTR SERVER_START_REQ( open_key ) { - req->parent = attr->RootDirectory; - req->access = access; + req->parent = attr->RootDirectory; + req->access = access; + req->attributes = attr->Attributes; wine_server_add_data( req, attr->ObjectName->Buffer, len ); ret = wine_server_call( req ); *retkey = reply->hkey; diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index f494e54113d..46af45f7e08 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -1382,6 +1382,8 @@ struct send_console_signal_reply struct create_change_notification_request { struct request_header __header; + unsigned int access; + unsigned int attributes; obj_handle_t handle; int subtree; unsigned int filter; @@ -1689,6 +1691,7 @@ struct create_key_request struct request_header __header; obj_handle_t parent; unsigned int access; + unsigned int attributes; unsigned int options; time_t modif; size_t namelen; @@ -1708,6 +1711,7 @@ struct open_key_request struct request_header __header; obj_handle_t parent; unsigned int access; + unsigned int attributes; /* VARARG(name,unicode_str); */ }; struct open_key_reply @@ -4321,6 +4325,6 @@ union generic_reply struct query_symlink_reply query_symlink_reply; }; -#define SERVER_PROTOCOL_VERSION 214 +#define SERVER_PROTOCOL_VERSION 215 #endif /* __WINE_WINE_SERVER_PROTOCOL_H */ diff --git a/server/change.c b/server/change.c index f85f0d37727..661cb874df2 100644 --- a/server/change.c +++ b/server/change.c @@ -232,8 +232,7 @@ DECL_HANDLER(create_change_notification) if ((change = create_change_notification( fd, req->subtree, req->filter ))) { - reply->handle = alloc_handle( current->process, change, - STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE, 0 ); + reply->handle = alloc_handle( current->process, change, req->access, req->attributes ); release_object( change ); } release_object( fd ); diff --git a/server/protocol.def b/server/protocol.def index 3fd4ff0d322..3d055cb6af0 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -1031,6 +1031,8 @@ enum char_info_mode /* Create a change notification */ @REQ(create_change_notification) + unsigned int access; /* wanted access rights */ + unsigned int attributes; /* object attributes */ obj_handle_t handle; /* handle to the directory */ int subtree; /* watch all the subtree */ unsigned int filter; /* notification filter */ @@ -1237,6 +1239,7 @@ enum char_info_mode @REQ(create_key) obj_handle_t parent; /* handle to the parent key */ unsigned int access; /* desired access rights */ + unsigned int attributes; /* object attributes */ unsigned int options; /* creation options */ time_t modif; /* last modification time */ size_t namelen; /* length of key name in bytes */ @@ -1251,6 +1254,7 @@ enum char_info_mode @REQ(open_key) obj_handle_t parent; /* handle to the parent key */ unsigned int access; /* desired access rights */ + unsigned int attributes; /* object attributes */ VARARG(name,unicode_str); /* key name */ @REPLY obj_handle_t hkey; /* handle to the open key */ diff --git a/server/registry.c b/server/registry.c index 964bdefea2b..5610984501e 100644 --- a/server/registry.c +++ b/server/registry.c @@ -1731,7 +1731,7 @@ DECL_HANDLER(create_key) if ((key = create_key( parent, &name, &class, flags, req->modif, &reply->created ))) { - reply->hkey = alloc_handle( current->process, key, access, 0 ); + reply->hkey = alloc_handle( current->process, key, access, req->attributes ); release_object( key ); } release_object( parent ); @@ -1753,7 +1753,7 @@ DECL_HANDLER(open_key) get_req_path( &name, !req->parent ); if ((key = open_key( parent, &name ))) { - reply->hkey = alloc_handle( current->process, key, access, 0 ); + reply->hkey = alloc_handle( current->process, key, access, req->attributes ); release_object( key ); } release_object( parent ); diff --git a/server/trace.c b/server/trace.c index e0947e2a1de..fcc447ea710 100644 --- a/server/trace.c +++ b/server/trace.c @@ -1432,6 +1432,8 @@ static void dump_send_console_signal_request( const struct send_console_signal_r static void dump_create_change_notification_request( const struct create_change_notification_request *req ) { + fprintf( stderr, " access=%08x,", req->access ); + fprintf( stderr, " attributes=%08x,", req->attributes ); fprintf( stderr, " handle=%p,", req->handle ); fprintf( stderr, " subtree=%d,", req->subtree ); fprintf( stderr, " filter=%08x", req->filter ); @@ -1655,6 +1657,7 @@ static void dump_create_key_request( const struct create_key_request *req ) { fprintf( stderr, " parent=%p,", req->parent ); fprintf( stderr, " access=%08x,", req->access ); + fprintf( stderr, " attributes=%08x,", req->attributes ); fprintf( stderr, " options=%08x,", req->options ); fprintf( stderr, " modif=%ld,", (long)req->modif ); fprintf( stderr, " namelen=%d,", req->namelen ); @@ -1675,6 +1678,7 @@ static void dump_open_key_request( const struct open_key_request *req ) { fprintf( stderr, " parent=%p,", req->parent ); fprintf( stderr, " access=%08x,", req->access ); + fprintf( stderr, " attributes=%08x,", req->attributes ); fprintf( stderr, " name=" ); dump_varargs_unicode_str( cur_size ); }