server: Added object attributes to a few more requests.

This commit is contained in:
Alexandre Julliard 2005-12-09 14:52:04 +01:00
parent 24560e70bb
commit 03b040c51d
7 changed files with 30 additions and 15 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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 */

View File

@ -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 );

View File

@ -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 */

View File

@ -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 );

View File

@ -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 );
}