server: Store the attributes in the object_attributes structure.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
3198fb0c1c
commit
7350682aa6
|
@ -232,7 +232,6 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
|
|||
SERVER_START_REQ( create_file )
|
||||
{
|
||||
req->access = access;
|
||||
req->attributes = attr->Attributes;
|
||||
req->sharing = sharing;
|
||||
req->create = disposition;
|
||||
req->options = options;
|
||||
|
@ -3522,7 +3521,6 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( PHANDLE handle, ULONG access,
|
|||
SERVER_START_REQ( create_named_pipe )
|
||||
{
|
||||
req->access = access;
|
||||
req->attributes = attr->Attributes;
|
||||
req->options = options;
|
||||
req->sharing = sharing;
|
||||
req->flags =
|
||||
|
|
|
@ -121,6 +121,7 @@ NTSTATUS alloc_object_attributes( const OBJECT_ATTRIBUTES *attr, struct object_a
|
|||
if (!*ret) return STATUS_NO_MEMORY;
|
||||
|
||||
(*ret)->rootdir = wine_server_obj_handle( attr->RootDirectory );
|
||||
(*ret)->attributes = attr->Attributes;
|
||||
|
||||
if (attr->SecurityDescriptor)
|
||||
{
|
||||
|
@ -180,7 +181,6 @@ NTSTATUS WINAPI NtCreateSemaphore( OUT PHANDLE SemaphoreHandle,
|
|||
SERVER_START_REQ( create_semaphore )
|
||||
{
|
||||
req->access = access;
|
||||
req->attributes = (attr) ? attr->Attributes : 0;
|
||||
req->initial = InitialCount;
|
||||
req->max = MaximumCount;
|
||||
wine_server_add_data( req, objattr, len );
|
||||
|
@ -289,7 +289,6 @@ NTSTATUS WINAPI NtCreateEvent( PHANDLE EventHandle, ACCESS_MASK DesiredAccess,
|
|||
SERVER_START_REQ( create_event )
|
||||
{
|
||||
req->access = DesiredAccess;
|
||||
req->attributes = (attr) ? attr->Attributes : 0;
|
||||
req->manual_reset = (type == NotificationEvent);
|
||||
req->initial_state = InitialState;
|
||||
wine_server_add_data( req, objattr, len );
|
||||
|
@ -459,7 +458,6 @@ NTSTATUS WINAPI NtCreateMutant(OUT HANDLE* MutantHandle,
|
|||
SERVER_START_REQ( create_mutex )
|
||||
{
|
||||
req->access = access;
|
||||
req->attributes = (attr) ? attr->Attributes : 0;
|
||||
req->owned = InitialOwner;
|
||||
wine_server_add_data( req, objattr, len );
|
||||
status = wine_server_call( req );
|
||||
|
@ -549,7 +547,6 @@ NTSTATUS WINAPI NtCreateJobObject( PHANDLE handle, ACCESS_MASK access, const OBJ
|
|||
SERVER_START_REQ( create_job )
|
||||
{
|
||||
req->access = access;
|
||||
req->attributes = attr ? attr->Attributes : 0;
|
||||
wine_server_add_data( req, objattr, len );
|
||||
ret = wine_server_call( req );
|
||||
*handle = wine_server_ptr_handle( reply->handle );
|
||||
|
@ -1080,7 +1077,6 @@ NTSTATUS WINAPI NtCreateKeyedEvent( HANDLE *handle, ACCESS_MASK access,
|
|||
SERVER_START_REQ( create_keyed_event )
|
||||
{
|
||||
req->access = access;
|
||||
req->attributes = attr ? attr->Attributes : 0;
|
||||
wine_server_add_data( req, objattr, len );
|
||||
ret = wine_server_call( req );
|
||||
*handle = wine_server_ptr_handle( reply->handle );
|
||||
|
|
|
@ -2477,7 +2477,6 @@ NTSTATUS WINAPI NtCreateSection( HANDLE *handle, ACCESS_MASK access, const OBJEC
|
|||
SERVER_START_REQ( create_mapping )
|
||||
{
|
||||
req->access = access;
|
||||
req->attributes = (attr) ? attr->Attributes : 0;
|
||||
req->file_handle = wine_server_obj_handle( file );
|
||||
req->size = size ? size->QuadPart : 0;
|
||||
req->protect = vprot;
|
||||
|
|
|
@ -377,6 +377,7 @@ struct security_descriptor
|
|||
struct object_attributes
|
||||
{
|
||||
obj_handle_t rootdir;
|
||||
unsigned int attributes;
|
||||
data_size_t sd_len;
|
||||
data_size_t name_len;
|
||||
|
||||
|
@ -1157,11 +1158,9 @@ struct create_event_request
|
|||
{
|
||||
struct request_header __header;
|
||||
unsigned int access;
|
||||
unsigned int attributes;
|
||||
int manual_reset;
|
||||
int initial_state;
|
||||
/* VARARG(objattr,object_attributes); */
|
||||
char __pad_28[4];
|
||||
};
|
||||
struct create_event_reply
|
||||
{
|
||||
|
@ -1218,9 +1217,7 @@ struct create_keyed_event_request
|
|||
{
|
||||
struct request_header __header;
|
||||
unsigned int access;
|
||||
unsigned int attributes;
|
||||
/* VARARG(objattr,object_attributes); */
|
||||
char __pad_20[4];
|
||||
};
|
||||
struct create_keyed_event_reply
|
||||
{
|
||||
|
@ -1251,9 +1248,9 @@ struct create_mutex_request
|
|||
{
|
||||
struct request_header __header;
|
||||
unsigned int access;
|
||||
unsigned int attributes;
|
||||
int owned;
|
||||
/* VARARG(objattr,object_attributes); */
|
||||
char __pad_20[4];
|
||||
};
|
||||
struct create_mutex_reply
|
||||
{
|
||||
|
@ -1299,11 +1296,9 @@ struct create_semaphore_request
|
|||
{
|
||||
struct request_header __header;
|
||||
unsigned int access;
|
||||
unsigned int attributes;
|
||||
unsigned int initial;
|
||||
unsigned int max;
|
||||
/* VARARG(objattr,object_attributes); */
|
||||
char __pad_28[4];
|
||||
};
|
||||
struct create_semaphore_reply
|
||||
{
|
||||
|
@ -1362,14 +1357,12 @@ struct create_file_request
|
|||
{
|
||||
struct request_header __header;
|
||||
unsigned int access;
|
||||
unsigned int attributes;
|
||||
unsigned int sharing;
|
||||
int create;
|
||||
unsigned int options;
|
||||
unsigned int attrs;
|
||||
/* VARARG(objattr,object_attributes); */
|
||||
/* VARARG(filename,string); */
|
||||
char __pad_36[4];
|
||||
};
|
||||
struct create_file_reply
|
||||
{
|
||||
|
@ -2105,8 +2098,8 @@ struct create_mapping_request
|
|||
{
|
||||
struct request_header __header;
|
||||
unsigned int access;
|
||||
unsigned int attributes;
|
||||
unsigned int protect;
|
||||
char __pad_20[4];
|
||||
mem_size_t size;
|
||||
obj_handle_t file_handle;
|
||||
/* VARARG(objattr,object_attributes); */
|
||||
|
@ -3267,12 +3260,12 @@ struct create_named_pipe_request
|
|||
{
|
||||
struct request_header __header;
|
||||
unsigned int access;
|
||||
unsigned int attributes;
|
||||
unsigned int options;
|
||||
unsigned int sharing;
|
||||
unsigned int maxinstances;
|
||||
unsigned int outsize;
|
||||
unsigned int insize;
|
||||
char __pad_36[4];
|
||||
timeout_t timeout;
|
||||
unsigned int flags;
|
||||
/* VARARG(objattr,object_attributes); */
|
||||
|
@ -5271,9 +5264,7 @@ struct create_job_request
|
|||
{
|
||||
struct request_header __header;
|
||||
unsigned int access;
|
||||
unsigned int attributes;
|
||||
/* VARARG(objattr,object_attributes); */
|
||||
char __pad_20[4];
|
||||
};
|
||||
struct create_job_reply
|
||||
{
|
||||
|
@ -6180,6 +6171,6 @@ union generic_reply
|
|||
struct terminate_job_reply terminate_job_reply;
|
||||
};
|
||||
|
||||
#define SERVER_PROTOCOL_VERSION 492
|
||||
#define SERVER_PROTOCOL_VERSION 493
|
||||
|
||||
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */
|
||||
|
|
|
@ -301,12 +301,14 @@ DECL_HANDLER(create_event)
|
|||
if (objattr->rootdir && !(root = get_directory_obj( current->process, objattr->rootdir, 0 )))
|
||||
return;
|
||||
|
||||
if ((event = create_event( root, &name, req->attributes, req->manual_reset, req->initial_state, sd )))
|
||||
if ((event = create_event( root, &name, objattr->attributes,
|
||||
req->manual_reset, req->initial_state, sd )))
|
||||
{
|
||||
if (get_error() == STATUS_OBJECT_NAME_EXISTS)
|
||||
reply->handle = alloc_handle( current->process, event, req->access, req->attributes );
|
||||
reply->handle = alloc_handle( current->process, event, req->access, objattr->attributes );
|
||||
else
|
||||
reply->handle = alloc_handle_no_access_check( current->process, event, req->access, req->attributes );
|
||||
reply->handle = alloc_handle_no_access_check( current->process, event,
|
||||
req->access, objattr->attributes );
|
||||
release_object( event );
|
||||
}
|
||||
|
||||
|
@ -386,12 +388,13 @@ DECL_HANDLER(create_keyed_event)
|
|||
|
||||
if (objattr->rootdir && !(root = get_directory_obj( current->process, objattr->rootdir, 0 ))) return;
|
||||
|
||||
if ((event = create_keyed_event( root, &name, req->attributes, sd )))
|
||||
if ((event = create_keyed_event( root, &name, objattr->attributes, sd )))
|
||||
{
|
||||
if (get_error() == STATUS_OBJECT_NAME_EXISTS)
|
||||
reply->handle = alloc_handle( current->process, event, req->access, req->attributes );
|
||||
reply->handle = alloc_handle( current->process, event, req->access, objattr->attributes );
|
||||
else
|
||||
reply->handle = alloc_handle_no_access_check( current->process, event, req->access, req->attributes );
|
||||
reply->handle = alloc_handle_no_access_check( current->process, event,
|
||||
req->access, objattr->attributes );
|
||||
release_object( event );
|
||||
}
|
||||
if (root) release_object( root );
|
||||
|
|
|
@ -721,7 +721,7 @@ DECL_HANDLER(create_file)
|
|||
if ((file = create_file( root_fd, name, name_len, req->access, req->sharing,
|
||||
req->create, req->options, req->attrs, sd )))
|
||||
{
|
||||
reply->handle = alloc_handle( current->process, file, req->access, req->attributes );
|
||||
reply->handle = alloc_handle( current->process, file, req->access, objattr->attributes );
|
||||
release_object( file );
|
||||
}
|
||||
if (root_fd) release_object( root_fd );
|
||||
|
|
|
@ -678,12 +678,14 @@ DECL_HANDLER(create_mapping)
|
|||
if (objattr->rootdir && !(root = get_directory_obj( current->process, objattr->rootdir, 0 )))
|
||||
return;
|
||||
|
||||
if ((obj = create_mapping( root, &name, req->attributes, req->size, req->protect, req->file_handle, sd )))
|
||||
if ((obj = create_mapping( root, &name, objattr->attributes,
|
||||
req->size, req->protect, req->file_handle, sd )))
|
||||
{
|
||||
if (get_error() == STATUS_OBJECT_NAME_EXISTS)
|
||||
reply->handle = alloc_handle( current->process, obj, req->access, req->attributes );
|
||||
reply->handle = alloc_handle( current->process, obj, req->access, objattr->attributes );
|
||||
else
|
||||
reply->handle = alloc_handle_no_access_check( current->process, obj, req->access, req->attributes );
|
||||
reply->handle = alloc_handle_no_access_check( current->process, obj,
|
||||
req->access, objattr->attributes );
|
||||
release_object( obj );
|
||||
}
|
||||
|
||||
|
|
|
@ -225,12 +225,13 @@ DECL_HANDLER(create_mutex)
|
|||
if (objattr->rootdir && !(root = get_directory_obj( current->process, objattr->rootdir, 0 )))
|
||||
return;
|
||||
|
||||
if ((mutex = create_mutex( root, &name, req->attributes, req->owned, sd )))
|
||||
if ((mutex = create_mutex( root, &name, objattr->attributes, req->owned, sd )))
|
||||
{
|
||||
if (get_error() == STATUS_OBJECT_NAME_EXISTS)
|
||||
reply->handle = alloc_handle( current->process, mutex, req->access, req->attributes );
|
||||
reply->handle = alloc_handle( current->process, mutex, req->access, objattr->attributes );
|
||||
else
|
||||
reply->handle = alloc_handle_no_access_check( current->process, mutex, req->access, req->attributes );
|
||||
reply->handle = alloc_handle_no_access_check( current->process, mutex,
|
||||
req->access, objattr->attributes );
|
||||
release_object( mutex );
|
||||
}
|
||||
|
||||
|
|
|
@ -944,7 +944,7 @@ DECL_HANDLER(create_named_pipe)
|
|||
if (objattr->rootdir && !(root = get_directory_obj( current->process, objattr->rootdir, 0 )))
|
||||
return;
|
||||
|
||||
pipe = create_named_pipe( root, &name, req->attributes | OBJ_OPENIF, sd );
|
||||
pipe = create_named_pipe( root, &name, objattr->attributes | OBJ_OPENIF, sd );
|
||||
|
||||
if (root) release_object( root );
|
||||
if (!pipe) return;
|
||||
|
@ -982,7 +982,7 @@ DECL_HANDLER(create_named_pipe)
|
|||
server = create_pipe_server( pipe, req->options, req->flags );
|
||||
if (server)
|
||||
{
|
||||
reply->handle = alloc_handle( current->process, server, req->access, req->attributes );
|
||||
reply->handle = alloc_handle( current->process, server, req->access, objattr->attributes );
|
||||
server->pipe->instances++;
|
||||
if (sd) default_set_sd( &server->obj, sd, OWNER_SECURITY_INFORMATION |
|
||||
GROUP_SECURITY_INFORMATION |
|
||||
|
|
|
@ -1549,12 +1549,13 @@ DECL_HANDLER(create_job)
|
|||
|
||||
if (objattr->rootdir && !(root = get_directory_obj( current->process, objattr->rootdir, 0 ))) return;
|
||||
|
||||
if ((job = create_job_object( root, &name, req->attributes, sd )))
|
||||
if ((job = create_job_object( root, &name, objattr->attributes, sd )))
|
||||
{
|
||||
if (get_error() == STATUS_OBJECT_NAME_EXISTS)
|
||||
reply->handle = alloc_handle( current->process, job, req->access, req->attributes );
|
||||
reply->handle = alloc_handle( current->process, job, req->access, objattr->attributes );
|
||||
else
|
||||
reply->handle = alloc_handle_no_access_check( current->process, job, req->access, req->attributes );
|
||||
reply->handle = alloc_handle_no_access_check( current->process, job,
|
||||
req->access, objattr->attributes );
|
||||
release_object( job );
|
||||
}
|
||||
if (root) release_object( root );
|
||||
|
|
|
@ -393,6 +393,7 @@ struct security_descriptor
|
|||
struct object_attributes
|
||||
{
|
||||
obj_handle_t rootdir; /* root directory */
|
||||
unsigned int attributes; /* object attributes */
|
||||
data_size_t sd_len; /* length of security_descriptor data. may be 0 */
|
||||
data_size_t name_len; /* length of the name string. may be 0 */
|
||||
/* VARARG(sd,security_descriptor); */
|
||||
|
@ -1012,7 +1013,6 @@ struct rawinput_device
|
|||
/* Create an event */
|
||||
@REQ(create_event)
|
||||
unsigned int access; /* wanted access rights */
|
||||
unsigned int attributes; /* object attributes */
|
||||
int manual_reset; /* manual reset event */
|
||||
int initial_state; /* initial state of the event */
|
||||
VARARG(objattr,object_attributes); /* object attributes */
|
||||
|
@ -1048,7 +1048,6 @@ enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
|
|||
/* Create a keyed event */
|
||||
@REQ(create_keyed_event)
|
||||
unsigned int access; /* wanted access rights */
|
||||
unsigned int attributes; /* object attributes */
|
||||
VARARG(objattr,object_attributes); /* object attributes */
|
||||
@REPLY
|
||||
obj_handle_t handle; /* handle to the event */
|
||||
|
@ -1068,7 +1067,6 @@ enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
|
|||
/* Create a mutex */
|
||||
@REQ(create_mutex)
|
||||
unsigned int access; /* wanted access rights */
|
||||
unsigned int attributes; /* object attributes */
|
||||
int owned; /* initially owned? */
|
||||
VARARG(objattr,object_attributes); /* object attributes */
|
||||
@REPLY
|
||||
|
@ -1098,7 +1096,6 @@ enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
|
|||
/* Create a semaphore */
|
||||
@REQ(create_semaphore)
|
||||
unsigned int access; /* wanted access rights */
|
||||
unsigned int attributes; /* object attributes */
|
||||
unsigned int initial; /* initial count */
|
||||
unsigned int max; /* maximum count */
|
||||
VARARG(objattr,object_attributes); /* object attributes */
|
||||
|
@ -1136,7 +1133,6 @@ enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
|
|||
/* Create a file */
|
||||
@REQ(create_file)
|
||||
unsigned int access; /* wanted access rights */
|
||||
unsigned int attributes; /* object attributes */
|
||||
unsigned int sharing; /* sharing flags */
|
||||
int create; /* file create action */
|
||||
unsigned int options; /* file options */
|
||||
|
@ -1636,7 +1632,6 @@ enum char_info_mode
|
|||
/* Create a file mapping */
|
||||
@REQ(create_mapping)
|
||||
unsigned int access; /* wanted access rights */
|
||||
unsigned int attributes; /* object attributes */
|
||||
unsigned int protect; /* protection flags (see below) */
|
||||
mem_size_t size; /* mapping size */
|
||||
obj_handle_t file_handle; /* file handle */
|
||||
|
@ -2372,7 +2367,6 @@ enum message_type
|
|||
/* Create a named pipe */
|
||||
@REQ(create_named_pipe)
|
||||
unsigned int access;
|
||||
unsigned int attributes; /* object attributes */
|
||||
unsigned int options;
|
||||
unsigned int sharing;
|
||||
unsigned int maxinstances;
|
||||
|
@ -3643,7 +3637,6 @@ struct handle_info
|
|||
/* Create a new job object */
|
||||
@REQ(create_job)
|
||||
unsigned int access; /* wanted access rights */
|
||||
unsigned int attributes; /* object attributes */
|
||||
VARARG(objattr,object_attributes); /* object attributes */
|
||||
@REPLY
|
||||
obj_handle_t handle; /* handle to the job */
|
||||
|
|
|
@ -868,10 +868,9 @@ C_ASSERT( FIELD_OFFSET(struct select_reply, call) == 16 );
|
|||
C_ASSERT( FIELD_OFFSET(struct select_reply, apc_handle) == 56 );
|
||||
C_ASSERT( sizeof(struct select_reply) == 64 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_event_request, access) == 12 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_event_request, attributes) == 16 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_event_request, manual_reset) == 20 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_event_request, initial_state) == 24 );
|
||||
C_ASSERT( sizeof(struct create_event_request) == 32 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_event_request, manual_reset) == 16 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_event_request, initial_state) == 20 );
|
||||
C_ASSERT( sizeof(struct create_event_request) == 24 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_event_reply, handle) == 8 );
|
||||
C_ASSERT( sizeof(struct create_event_reply) == 16 );
|
||||
C_ASSERT( FIELD_OFFSET(struct event_op_request, handle) == 12 );
|
||||
|
@ -889,8 +888,7 @@ C_ASSERT( sizeof(struct open_event_request) == 24 );
|
|||
C_ASSERT( FIELD_OFFSET(struct open_event_reply, handle) == 8 );
|
||||
C_ASSERT( sizeof(struct open_event_reply) == 16 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_keyed_event_request, access) == 12 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_keyed_event_request, attributes) == 16 );
|
||||
C_ASSERT( sizeof(struct create_keyed_event_request) == 24 );
|
||||
C_ASSERT( sizeof(struct create_keyed_event_request) == 16 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_keyed_event_reply, handle) == 8 );
|
||||
C_ASSERT( sizeof(struct create_keyed_event_reply) == 16 );
|
||||
C_ASSERT( FIELD_OFFSET(struct open_keyed_event_request, access) == 12 );
|
||||
|
@ -900,8 +898,7 @@ C_ASSERT( sizeof(struct open_keyed_event_request) == 24 );
|
|||
C_ASSERT( FIELD_OFFSET(struct open_keyed_event_reply, handle) == 8 );
|
||||
C_ASSERT( sizeof(struct open_keyed_event_reply) == 16 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_mutex_request, access) == 12 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_mutex_request, attributes) == 16 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_mutex_request, owned) == 20 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_mutex_request, owned) == 16 );
|
||||
C_ASSERT( sizeof(struct create_mutex_request) == 24 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_mutex_reply, handle) == 8 );
|
||||
C_ASSERT( sizeof(struct create_mutex_reply) == 16 );
|
||||
|
@ -916,10 +913,9 @@ C_ASSERT( sizeof(struct open_mutex_request) == 24 );
|
|||
C_ASSERT( FIELD_OFFSET(struct open_mutex_reply, handle) == 8 );
|
||||
C_ASSERT( sizeof(struct open_mutex_reply) == 16 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_semaphore_request, access) == 12 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_semaphore_request, attributes) == 16 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_semaphore_request, initial) == 20 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_semaphore_request, max) == 24 );
|
||||
C_ASSERT( sizeof(struct create_semaphore_request) == 32 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_semaphore_request, initial) == 16 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_semaphore_request, max) == 20 );
|
||||
C_ASSERT( sizeof(struct create_semaphore_request) == 24 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_semaphore_reply, handle) == 8 );
|
||||
C_ASSERT( sizeof(struct create_semaphore_reply) == 16 );
|
||||
C_ASSERT( FIELD_OFFSET(struct release_semaphore_request, handle) == 12 );
|
||||
|
@ -939,12 +935,11 @@ C_ASSERT( sizeof(struct open_semaphore_request) == 24 );
|
|||
C_ASSERT( FIELD_OFFSET(struct open_semaphore_reply, handle) == 8 );
|
||||
C_ASSERT( sizeof(struct open_semaphore_reply) == 16 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_file_request, access) == 12 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_file_request, attributes) == 16 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_file_request, sharing) == 20 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_file_request, create) == 24 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_file_request, options) == 28 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_file_request, attrs) == 32 );
|
||||
C_ASSERT( sizeof(struct create_file_request) == 40 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_file_request, sharing) == 16 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_file_request, create) == 20 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_file_request, options) == 24 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_file_request, attrs) == 28 );
|
||||
C_ASSERT( sizeof(struct create_file_request) == 32 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_file_reply, handle) == 8 );
|
||||
C_ASSERT( sizeof(struct create_file_reply) == 16 );
|
||||
C_ASSERT( FIELD_OFFSET(struct open_file_object_request, access) == 12 );
|
||||
|
@ -1194,8 +1189,7 @@ C_ASSERT( FIELD_OFFSET(struct read_change_request, handle) == 12 );
|
|||
C_ASSERT( sizeof(struct read_change_request) == 16 );
|
||||
C_ASSERT( sizeof(struct read_change_reply) == 8 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_mapping_request, access) == 12 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_mapping_request, attributes) == 16 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_mapping_request, protect) == 20 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_mapping_request, protect) == 16 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_mapping_request, size) == 24 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_mapping_request, file_handle) == 32 );
|
||||
C_ASSERT( sizeof(struct create_mapping_request) == 40 );
|
||||
|
@ -1581,12 +1575,11 @@ C_ASSERT( sizeof(struct get_irp_result_request) == 24 );
|
|||
C_ASSERT( FIELD_OFFSET(struct get_irp_result_reply, size) == 8 );
|
||||
C_ASSERT( sizeof(struct get_irp_result_reply) == 16 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_named_pipe_request, access) == 12 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_named_pipe_request, attributes) == 16 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_named_pipe_request, options) == 20 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_named_pipe_request, sharing) == 24 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_named_pipe_request, maxinstances) == 28 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_named_pipe_request, outsize) == 32 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_named_pipe_request, insize) == 36 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_named_pipe_request, options) == 16 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_named_pipe_request, sharing) == 20 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_named_pipe_request, maxinstances) == 24 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_named_pipe_request, outsize) == 28 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_named_pipe_request, insize) == 32 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_named_pipe_request, timeout) == 40 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_named_pipe_request, flags) == 48 );
|
||||
C_ASSERT( sizeof(struct create_named_pipe_request) == 56 );
|
||||
|
@ -2279,8 +2272,7 @@ C_ASSERT( sizeof(struct get_suspend_context_request) == 16 );
|
|||
C_ASSERT( sizeof(struct get_suspend_context_reply) == 8 );
|
||||
C_ASSERT( sizeof(struct set_suspend_context_request) == 16 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_job_request, access) == 12 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_job_request, attributes) == 16 );
|
||||
C_ASSERT( sizeof(struct create_job_request) == 24 );
|
||||
C_ASSERT( sizeof(struct create_job_request) == 16 );
|
||||
C_ASSERT( FIELD_OFFSET(struct create_job_reply, handle) == 8 );
|
||||
C_ASSERT( sizeof(struct create_job_reply) == 16 );
|
||||
C_ASSERT( FIELD_OFFSET(struct assign_job_request, job) == 12 );
|
||||
|
|
|
@ -193,12 +193,13 @@ DECL_HANDLER(create_semaphore)
|
|||
if (objattr->rootdir && !(root = get_directory_obj( current->process, objattr->rootdir, 0 )))
|
||||
return;
|
||||
|
||||
if ((sem = create_semaphore( root, &name, req->attributes, req->initial, req->max, sd )))
|
||||
if ((sem = create_semaphore( root, &name, objattr->attributes, req->initial, req->max, sd )))
|
||||
{
|
||||
if (get_error() == STATUS_OBJECT_NAME_EXISTS)
|
||||
reply->handle = alloc_handle( current->process, sem, req->access, req->attributes );
|
||||
reply->handle = alloc_handle( current->process, sem, req->access, objattr->attributes );
|
||||
else
|
||||
reply->handle = alloc_handle_no_access_check( current->process, sem, req->access, req->attributes );
|
||||
reply->handle = alloc_handle_no_access_check( current->process, sem,
|
||||
req->access, objattr->attributes );
|
||||
release_object( sem );
|
||||
}
|
||||
|
||||
|
|
|
@ -1077,7 +1077,7 @@ static void dump_varargs_object_attributes( const char *prefix, data_size_t size
|
|||
if (size >= sizeof(struct object_attributes))
|
||||
{
|
||||
const WCHAR *str;
|
||||
fprintf( stderr, "rootdir=%04x", objattr->rootdir );
|
||||
fprintf( stderr, "rootdir=%04x,attributes=%08x", objattr->rootdir, objattr->attributes );
|
||||
if (objattr->sd_len > size - sizeof(*objattr) ||
|
||||
objattr->name_len > size - sizeof(*objattr) - objattr->sd_len)
|
||||
return;
|
||||
|
@ -1496,7 +1496,6 @@ static void dump_select_reply( const struct select_reply *req )
|
|||
static void dump_create_event_request( const struct create_event_request *req )
|
||||
{
|
||||
fprintf( stderr, " access=%08x", req->access );
|
||||
fprintf( stderr, ", attributes=%08x", req->attributes );
|
||||
fprintf( stderr, ", manual_reset=%d", req->manual_reset );
|
||||
fprintf( stderr, ", initial_state=%d", req->initial_state );
|
||||
dump_varargs_object_attributes( ", objattr=", cur_size );
|
||||
|
@ -1540,7 +1539,6 @@ static void dump_open_event_reply( const struct open_event_reply *req )
|
|||
static void dump_create_keyed_event_request( const struct create_keyed_event_request *req )
|
||||
{
|
||||
fprintf( stderr, " access=%08x", req->access );
|
||||
fprintf( stderr, ", attributes=%08x", req->attributes );
|
||||
dump_varargs_object_attributes( ", objattr=", cur_size );
|
||||
}
|
||||
|
||||
|
@ -1565,7 +1563,6 @@ static void dump_open_keyed_event_reply( const struct open_keyed_event_reply *re
|
|||
static void dump_create_mutex_request( const struct create_mutex_request *req )
|
||||
{
|
||||
fprintf( stderr, " access=%08x", req->access );
|
||||
fprintf( stderr, ", attributes=%08x", req->attributes );
|
||||
fprintf( stderr, ", owned=%d", req->owned );
|
||||
dump_varargs_object_attributes( ", objattr=", cur_size );
|
||||
}
|
||||
|
@ -1601,7 +1598,6 @@ static void dump_open_mutex_reply( const struct open_mutex_reply *req )
|
|||
static void dump_create_semaphore_request( const struct create_semaphore_request *req )
|
||||
{
|
||||
fprintf( stderr, " access=%08x", req->access );
|
||||
fprintf( stderr, ", attributes=%08x", req->attributes );
|
||||
fprintf( stderr, ", initial=%08x", req->initial );
|
||||
fprintf( stderr, ", max=%08x", req->max );
|
||||
dump_varargs_object_attributes( ", objattr=", cur_size );
|
||||
|
@ -1650,7 +1646,6 @@ static void dump_open_semaphore_reply( const struct open_semaphore_reply *req )
|
|||
static void dump_create_file_request( const struct create_file_request *req )
|
||||
{
|
||||
fprintf( stderr, " access=%08x", req->access );
|
||||
fprintf( stderr, ", attributes=%08x", req->attributes );
|
||||
fprintf( stderr, ", sharing=%08x", req->sharing );
|
||||
fprintf( stderr, ", create=%d", req->create );
|
||||
fprintf( stderr, ", options=%08x", req->options );
|
||||
|
@ -2115,7 +2110,6 @@ static void dump_read_change_reply( const struct read_change_reply *req )
|
|||
static void dump_create_mapping_request( const struct create_mapping_request *req )
|
||||
{
|
||||
fprintf( stderr, " access=%08x", req->access );
|
||||
fprintf( stderr, ", attributes=%08x", req->attributes );
|
||||
fprintf( stderr, ", protect=%08x", req->protect );
|
||||
dump_uint64( ", size=", &req->size );
|
||||
fprintf( stderr, ", file_handle=%04x", req->file_handle );
|
||||
|
@ -2878,7 +2872,6 @@ static void dump_get_irp_result_reply( const struct get_irp_result_reply *req )
|
|||
static void dump_create_named_pipe_request( const struct create_named_pipe_request *req )
|
||||
{
|
||||
fprintf( stderr, " access=%08x", req->access );
|
||||
fprintf( stderr, ", attributes=%08x", req->attributes );
|
||||
fprintf( stderr, ", options=%08x", req->options );
|
||||
fprintf( stderr, ", sharing=%08x", req->sharing );
|
||||
fprintf( stderr, ", maxinstances=%08x", req->maxinstances );
|
||||
|
@ -4260,7 +4253,6 @@ static void dump_set_suspend_context_request( const struct set_suspend_context_r
|
|||
static void dump_create_job_request( const struct create_job_request *req )
|
||||
{
|
||||
fprintf( stderr, " access=%08x", req->access );
|
||||
fprintf( stderr, ", attributes=%08x", req->attributes );
|
||||
dump_varargs_object_attributes( ", objattr=", cur_size );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue