server: Added object attributes to a few more requests.
diff --git a/dlls/kernel/change.c b/dlls/kernel/change.c
index e2d6978..601c18f 100644
--- a/dlls/kernel/change.c
+++ b/dlls/kernel/change.c
@@ -88,9 +88,11 @@
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 5ade8bd..d05d9c7 100644
--- a/dlls/ntdll/reg.c
+++ b/dlls/ntdll/reg.c
@@ -63,11 +63,12 @@
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 @@
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 f494e54..46af45f 100644
--- a/include/wine/server_protocol.h
+++ b/include/wine/server_protocol.h
@@ -1382,6 +1382,8 @@
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 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 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 @@
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 f85f0d3..661cb87 100644
--- a/server/change.c
+++ b/server/change.c
@@ -232,8 +232,7 @@
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 3fd4ff0..3d055cb 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -1031,6 +1031,8 @@
/* 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 @@
@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 @@
@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 964bdef..5610984 100644
--- a/server/registry.c
+++ b/server/registry.c
@@ -1731,7 +1731,7 @@
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 @@
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 e0947e2..fcc447e 100644
--- a/server/trace.c
+++ b/server/trace.c
@@ -1432,6 +1432,8 @@
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 @@
{
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 @@
{
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 );
}