ntdll/server: send whole object attributes not just an inherit flag
Vitaliy Margolen
wine-patch at kievinfo.com
Fri Sep 23 07:48:07 CDT 2005
Oops, went a little to far in timer.c Use this one instead.
This will allow server to handle other attributes like case-insensitive flag.
Vitaliy Margolen
changelog:
ntdll, server
send whole object attributes not just an inherit flag
-------------- next part --------------
Index: dlls/ntdll/file.c
===================================================================
RCS file: /home/wine/wine/dlls/ntdll/file.c,v
retrieving revision 1.99
diff -u -p -r1.99 file.c
--- dlls/ntdll/file.c 6 Sep 2005 14:09:42 -0000 1.99
+++ dlls/ntdll/file.c 21 Sep 2005 20:15:41 -0000
@@ -164,8 +164,8 @@ NTSTATUS WINAPI NtCreateFile( PHANDLE ha
SERVER_START_REQ( open_named_pipe )
{
req->access = access;
+ req->attributes = (attr) ? attr->Attributes : 0;
req->flags = options;
- req->inherit = (attr->Attributes & OBJ_INHERIT) != 0;
wine_server_add_data( req, attr->ObjectName->Buffer + 4,
attr->ObjectName->Length - 4*sizeof(WCHAR) );
io->u.Status = wine_server_call( req );
@@ -183,8 +183,8 @@ NTSTATUS WINAPI NtCreateFile( PHANDLE ha
SERVER_START_REQ( open_mailslot )
{
req->access = access & GENERIC_WRITE;
+ req->attributes = (attr) ? attr->Attributes : 0;
req->sharing = sharing;
- req->inherit = (attr->Attributes & OBJ_INHERIT) != 0;
wine_server_add_data( req, attr->ObjectName->Buffer + 4,
attr->ObjectName->Length - 4*sizeof(WCHAR) );
io->u.Status = wine_server_call( req );
@@ -1915,7 +1915,7 @@ NTSTATUS WINAPI NtUnlockFile( HANDLE hFi
*
*/
NTSTATUS WINAPI NtCreateNamedPipeFile( PHANDLE handle, ULONG access,
- POBJECT_ATTRIBUTES oa, PIO_STATUS_BLOCK iosb,
+ POBJECT_ATTRIBUTES attr, PIO_STATUS_BLOCK iosb,
ULONG sharing, ULONG dispo, ULONG options,
ULONG pipe_type, ULONG read_mode,
ULONG completion_mode, ULONG max_inst,
@@ -1926,12 +1926,12 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( P
static const WCHAR leadin[] = {'\\','?','?','\\','P','I','P','E','\\'};
TRACE("(%p %lx %s %p %lx %ld %lx %ld %ld %ld %ld %ld %ld %p)\n",
- handle, access, debugstr_w(oa->ObjectName->Buffer), iosb, sharing, dispo,
+ handle, access, debugstr_w(attr->ObjectName->Buffer), iosb, sharing, dispo,
options, pipe_type, read_mode, completion_mode, max_inst, inbound_quota,
outbound_quota, timeout);
- if (oa->ObjectName->Length < sizeof(leadin) ||
- strncmpiW( oa->ObjectName->Buffer,
+ if (attr->ObjectName->Length < sizeof(leadin) ||
+ strncmpiW( attr->ObjectName->Buffer,
leadin, sizeof(leadin)/sizeof(leadin[0]) ))
return STATUS_OBJECT_NAME_INVALID;
/* assume we only get relative timeout, and storable in a DWORD as ms */
@@ -1949,9 +1949,9 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( P
req->outsize = outbound_quota;
req->insize = inbound_quota;
req->timeout = timeout->QuadPart / -10000;
- req->inherit = (oa->Attributes & OBJ_INHERIT) != 0;
- wine_server_add_data( req, oa->ObjectName->Buffer + 4,
- oa->ObjectName->Length - 4 * sizeof(WCHAR) );
+ req->attributes = (attr) ? attr->Attributes : 0;
+ wine_server_add_data( req, attr->ObjectName->Buffer + 4,
+ attr->ObjectName->Length - 4 * sizeof(WCHAR) );
status = wine_server_call( req );
if (!status) *handle = reply->handle;
}
@@ -2046,7 +2046,7 @@ NTSTATUS WINAPI NtCreateMailslotFile(PHA
{
req->max_msgsize = MaxMessageSize;
req->read_timeout = TimeOut->QuadPart / -10000;
- req->inherit = (attr->Attributes & OBJ_INHERIT) != 0;
+ req->attributes = (attr) ? attr->Attributes : 0;
wine_server_add_data( req, attr->ObjectName->Buffer + 4,
attr->ObjectName->Length - 4*sizeof(WCHAR) );
ret = wine_server_call( req );
Index: dlls/ntdll/sync.c
===================================================================
RCS file: /home/wine/wine/dlls/ntdll/sync.c,v
retrieving revision 1.51
diff -u -p -r1.51 sync.c
--- dlls/ntdll/sync.c 21 Jun 2005 09:52:41 -0000 1.51
+++ dlls/ntdll/sync.c 21 Sep 2005 20:15:41 -0000
@@ -82,9 +82,9 @@ NTSTATUS WINAPI NtCreateSemaphore( OUT P
SERVER_START_REQ( create_semaphore )
{
req->access = access;
+ req->attributes = (attr) ? attr->Attributes : 0;
req->initial = InitialCount;
req->max = MaximumCount;
- req->inherit = attr && (attr->Attributes & OBJ_INHERIT);
if (len) wine_server_add_data( req, attr->ObjectName->Buffer, len );
ret = wine_server_call( req );
*SemaphoreHandle = reply->handle;
@@ -108,7 +108,7 @@ NTSTATUS WINAPI NtOpenSemaphore( OUT PHA
SERVER_START_REQ( open_semaphore )
{
req->access = access;
- req->inherit = attr && (attr->Attributes & OBJ_INHERIT);
+ req->attributes = (attr) ? attr->Attributes : 0;
if (len) wine_server_add_data( req, attr->ObjectName->Buffer, len );
ret = wine_server_call( req );
*SemaphoreHandle = reply->handle;
@@ -174,9 +174,9 @@ NTSTATUS WINAPI NtCreateEvent(
SERVER_START_REQ( create_event )
{
req->access = DesiredAccess;
+ req->attributes = (attr) ? attr->Attributes : 0;
req->manual_reset = ManualReset;
req->initial_state = InitialState;
- req->inherit = attr && (attr->Attributes & OBJ_INHERIT);
if (len) wine_server_add_data( req, attr->ObjectName->Buffer, len );
ret = wine_server_call( req );
*EventHandle = reply->handle;
@@ -202,7 +202,7 @@ NTSTATUS WINAPI NtOpenEvent(
SERVER_START_REQ( open_event )
{
req->access = DesiredAccess;
- req->inherit = attr && (attr->Attributes & OBJ_INHERIT);
+ req->attributes = (attr) ? attr->Attributes : 0;
if (len) wine_server_add_data( req, attr->ObjectName->Buffer, len );
ret = wine_server_call( req );
*EventHandle = reply->handle;
@@ -321,8 +321,8 @@ NTSTATUS WINAPI NtCreateMutant(OUT HANDL
SERVER_START_REQ( create_mutex )
{
req->access = access;
+ req->attributes = (attr) ? attr->Attributes : 0;
req->owned = InitialOwner;
- req->inherit = attr && (attr->Attributes & OBJ_INHERIT);
if (len) wine_server_add_data( req, attr->ObjectName->Buffer, len );
status = wine_server_call( req );
*MutantHandle = reply->handle;
@@ -347,7 +347,7 @@ NTSTATUS WINAPI NtOpenMutant(OUT HANDLE*
SERVER_START_REQ( open_mutex )
{
req->access = access;
- req->inherit = attr && (attr->Attributes & OBJ_INHERIT);
+ req->attributes = (attr) ? attr->Attributes : 0;
if (len) wine_server_add_data( req, attr->ObjectName->Buffer, len );
status = wine_server_call( req );
*MutantHandle = reply->handle;
@@ -413,8 +413,8 @@ NTSTATUS WINAPI NtCreateTimer(OUT HANDLE
SERVER_START_REQ( create_timer )
{
req->access = access;
+ req->attributes = (attr) ? attr->Attributes : 0;
req->manual = (timer_type == NotificationTimer) ? TRUE : FALSE;
- req->inherit = attr && (attr->Attributes & OBJ_INHERIT);
if (len) wine_server_add_data( req, attr->ObjectName->Buffer, len );
status = wine_server_call( req );
*handle = reply->handle;
@@ -440,7 +440,7 @@ NTSTATUS WINAPI NtOpenTimer(OUT PHANDLE
SERVER_START_REQ( open_timer )
{
req->access = access;
- req->inherit = attr && (attr->Attributes & OBJ_INHERIT);
+ req->attributes = (attr) ? attr->Attributes : 0;
if (len) wine_server_add_data( req, attr->ObjectName->Buffer, len );
status = wine_server_call( req );
*handle = reply->handle;
Index: dlls/ntdll/virtual.c
===================================================================
RCS file: /home/wine/wine/dlls/ntdll/virtual.c,v
retrieving revision 1.69
diff -u -p -r1.69 virtual.c
--- dlls/ntdll/virtual.c 21 Sep 2005 09:47:12 -0000 1.69
+++ dlls/ntdll/virtual.c 21 Sep 2005 20:15:42 -0000
@@ -1659,7 +1659,7 @@ NTSTATUS WINAPI NtCreateSection( HANDLE
req->size_low = size ? size->u.LowPart : 0;
req->protect = vprot;
req->access = access;
- req->inherit = (attr && (attr->Attributes & OBJ_INHERIT) != 0);
+ req->attributes = (attr) ? attr->Attributes : 0;
if (len) wine_server_add_data( req, attr->ObjectName->Buffer, len );
ret = wine_server_call( req );
*handle = reply->handle;
@@ -1683,7 +1683,7 @@ NTSTATUS WINAPI NtOpenSection( HANDLE *h
SERVER_START_REQ( open_mapping )
{
req->access = access;
- req->inherit = (attr->Attributes & OBJ_INHERIT) != 0;
+ req->attributes = (attr) ? attr->Attributes : 0;
wine_server_add_data( req, attr->ObjectName->Buffer, len );
if (!(ret = wine_server_call( req ))) *handle = reply->handle;
}
Index: server/protocol.def
===================================================================
RCS file: /home/wine/wine/server/protocol.def,v
retrieving revision 1.155
diff -u -p -r1.155 protocol.def
--- server/protocol.def 6 Sep 2005 14:10:53 -0000 1.155
+++ server/protocol.def 21 Sep 2005 20:15:42 -0000
@@ -60,6 +60,15 @@ typedef unsigned int thread_id_t;
#define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
#define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
+#define OBJ_INHERIT 0x00000002L
+#define OBJ_PERMANENT 0x00000010L
+#define OBJ_EXCLUSIVE 0x00000020L
+#define OBJ_CASE_INSENSITIVE 0x00000040L
+#define OBJ_OPENIF 0x00000080L
+#define OBJ_OPENLINK 0x00000100L
+#define OBJ_KERNEL_HANDLE 0x00000200L
+#define OBJ_VALID_ATTRIBUTES 0x000003F2L
+
/* definitions of the event data depending on the event code */
struct debug_event_exception
@@ -496,9 +505,9 @@ enum apc_type { APC_NONE, APC_USER, APC_
/* 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 */
- int inherit; /* inherit flag */
VARARG(name,unicode_str); /* object name */
@REPLY
obj_handle_t handle; /* handle to the event */
@@ -515,7 +524,7 @@ enum event_op { PULSE_EVENT, SET_EVENT,
/* Open an event */
@REQ(open_event)
unsigned int access; /* wanted access rights */
- int inherit; /* inherit flag */
+ unsigned int attributes; /* object attributes */
VARARG(name,unicode_str); /* object name */
@REPLY
obj_handle_t handle; /* handle to the event */
@@ -525,8 +534,8 @@ enum event_op { PULSE_EVENT, SET_EVENT,
/* Create a mutex */
@REQ(create_mutex)
unsigned int access; /* wanted access rights */
+ unsigned int attributes; /* object attributes */
int owned; /* initially owned? */
- int inherit; /* inherit flag */
VARARG(name,unicode_str); /* object name */
@REPLY
obj_handle_t handle; /* handle to the mutex */
@@ -544,7 +553,7 @@ enum event_op { PULSE_EVENT, SET_EVENT,
/* Open a mutex */
@REQ(open_mutex)
unsigned int access; /* wanted access rights */
- int inherit; /* inherit flag */
+ unsigned int attributes; /* object attributes */
VARARG(name,unicode_str); /* object name */
@REPLY
obj_handle_t handle; /* handle to the mutex */
@@ -554,9 +563,9 @@ enum event_op { PULSE_EVENT, SET_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 */
- int inherit; /* inherit flag */
VARARG(name,unicode_str); /* object name */
@REPLY
obj_handle_t handle; /* handle to the semaphore */
@@ -575,7 +584,7 @@ enum event_op { PULSE_EVENT, SET_EVENT,
/* Open a semaphore */
@REQ(open_semaphore)
unsigned int access; /* wanted access rights */
- int inherit; /* inherit flag */
+ unsigned int attributes; /* object attributes */
VARARG(name,unicode_str); /* object name */
@REPLY
obj_handle_t handle; /* handle to the semaphore */
@@ -1042,7 +1051,7 @@ enum char_info_mode
int size_low; /* mapping size */
int protect; /* protection flags (see below) */
unsigned int access; /* wanted access rights */
- int inherit; /* inherit flag */
+ unsigned int attributes; /* object attributes */
obj_handle_t file_handle; /* file handle */
VARARG(name,unicode_str); /* object name */
@REPLY
@@ -1062,7 +1071,7 @@ enum char_info_mode
/* Open a mapping */
@REQ(open_mapping)
unsigned int access; /* wanted access rights */
- int inherit; /* inherit flag */
+ unsigned int attributes; /* object attributes */
VARARG(name,unicode_str); /* object name */
@REPLY
obj_handle_t handle; /* handle to the mapping */
@@ -1355,7 +1364,7 @@ enum char_info_mode
/* Create a waitable timer */
@REQ(create_timer)
unsigned int access; /* wanted access rights */
- int inherit; /* inherit flag */
+ unsigned int attributes; /* object attributes */
int manual; /* manual reset */
VARARG(name,unicode_str); /* object name */
@REPLY
@@ -1366,7 +1375,7 @@ enum char_info_mode
/* Open a waitable timer */
@REQ(open_timer)
unsigned int access; /* wanted access rights */
- int inherit; /* inherit flag */
+ unsigned int attributes; /* object attributes */
VARARG(name,unicode_str); /* object name */
@REPLY
obj_handle_t handle; /* handle to the timer */
@@ -1680,13 +1689,13 @@ enum message_type
/* Create a named pipe */
@REQ(create_named_pipe)
+ unsigned int attributes; /* object attributes */
unsigned int options;
unsigned int flags;
unsigned int maxinstances;
unsigned int outsize;
unsigned int insize;
unsigned int timeout;
- int inherit; /* inherit flag */
VARARG(name,unicode_str); /* pipe name */
@REPLY
obj_handle_t handle; /* handle to the pipe */
@@ -1701,8 +1710,8 @@ enum message_type
/* Open an existing named pipe */
@REQ(open_named_pipe)
unsigned int access;
+ unsigned int attributes; /* object attributes */
unsigned int flags; /* file flags */
- int inherit; /* inherit flag */
VARARG(name,unicode_str); /* pipe name */
@REPLY
obj_handle_t handle; /* handle to the pipe */
@@ -2473,7 +2482,7 @@ enum message_type
@REQ(create_mailslot)
unsigned int max_msgsize;
unsigned int read_timeout;
- int inherit;
+ unsigned int attributes; /* object attributes */
VARARG(name,unicode_str); /* mailslot name */
@REPLY
obj_handle_t handle; /* handle to the mailslot */
@@ -2483,7 +2492,7 @@ enum message_type
/* Open an existing mailslot */
@REQ(open_mailslot)
unsigned int access;
- int inherit; /* inherit flag */
+ unsigned int attributes; /* object attributes */
unsigned int sharing; /* sharing mode */
VARARG(name,unicode_str); /* mailslot name */
@REPLY
Index: include/wine/server_protocol.h
===================================================================
RCS file: /home/wine/wine/include/wine/server_protocol.h,v
retrieving revision 1.156
diff -u -p -r1.156 server_protocol.h
--- include/wine/server_protocol.h 6 Sep 2005 14:10:53 -0000 1.156
+++ include/wine/server_protocol.h 21 Sep 2005 20:15:42 -0000
@@ -44,6 +44,15 @@ typedef unsigned int thread_id_t;
#define FIRST_USER_HANDLE 0x0020
#define LAST_USER_HANDLE 0xffef
+#define OBJ_INHERIT 0x00000002L
+#define OBJ_PERMANENT 0x00000010L
+#define OBJ_EXCLUSIVE 0x00000020L
+#define OBJ_CASE_INSENSITIVE 0x00000040L
+#define OBJ_OPENIF 0x00000080L
+#define OBJ_OPENLINK 0x00000100L
+#define OBJ_KERNEL_HANDLE 0x00000200L
+#define OBJ_VALID_ATTRIBUTES 0x000003F2L
+
struct debug_event_exception
@@ -614,9 +623,9 @@ struct create_event_request
{
struct request_header __header;
unsigned int access;
+ unsigned int attributes;
int manual_reset;
int initial_state;
- int inherit;
/* VARARG(name,unicode_str); */
};
struct create_event_reply
@@ -644,7 +653,7 @@ struct open_event_request
{
struct request_header __header;
unsigned int access;
- int inherit;
+ unsigned int attributes;
/* VARARG(name,unicode_str); */
};
struct open_event_reply
@@ -659,8 +668,8 @@ struct create_mutex_request
{
struct request_header __header;
unsigned int access;
+ unsigned int attributes;
int owned;
- int inherit;
/* VARARG(name,unicode_str); */
};
struct create_mutex_reply
@@ -688,7 +697,7 @@ struct open_mutex_request
{
struct request_header __header;
unsigned int access;
- int inherit;
+ unsigned int attributes;
/* VARARG(name,unicode_str); */
};
struct open_mutex_reply
@@ -703,9 +712,9 @@ struct create_semaphore_request
{
struct request_header __header;
unsigned int access;
+ unsigned int attributes;
unsigned int initial;
unsigned int max;
- int inherit;
/* VARARG(name,unicode_str); */
};
struct create_semaphore_reply
@@ -734,7 +743,7 @@ struct open_semaphore_request
{
struct request_header __header;
unsigned int access;
- int inherit;
+ unsigned int attributes;
/* VARARG(name,unicode_str); */
};
struct open_semaphore_reply
@@ -1404,7 +1413,7 @@ struct create_mapping_request
int size_low;
int protect;
unsigned int access;
- int inherit;
+ unsigned int attributes;
obj_handle_t file_handle;
/* VARARG(name,unicode_str); */
};
@@ -1429,7 +1438,7 @@ struct open_mapping_request
{
struct request_header __header;
unsigned int access;
- int inherit;
+ unsigned int attributes;
/* VARARG(name,unicode_str); */
};
struct open_mapping_reply
@@ -1880,7 +1889,7 @@ struct create_timer_request
{
struct request_header __header;
unsigned int access;
- int inherit;
+ unsigned int attributes;
int manual;
/* VARARG(name,unicode_str); */
};
@@ -1896,7 +1905,7 @@ struct open_timer_request
{
struct request_header __header;
unsigned int access;
- int inherit;
+ unsigned int attributes;
/* VARARG(name,unicode_str); */
};
struct open_timer_reply
@@ -2366,13 +2375,13 @@ struct cancel_async_reply
struct create_named_pipe_request
{
struct request_header __header;
+ unsigned int attributes;
unsigned int options;
unsigned int flags;
unsigned int maxinstances;
unsigned int outsize;
unsigned int insize;
unsigned int timeout;
- int inherit;
/* VARARG(name,unicode_str); */
};
struct create_named_pipe_reply
@@ -2392,8 +2401,8 @@ struct open_named_pipe_request
{
struct request_header __header;
unsigned int access;
+ unsigned int attributes;
unsigned int flags;
- int inherit;
/* VARARG(name,unicode_str); */
};
struct open_named_pipe_reply
@@ -3530,7 +3539,7 @@ struct create_mailslot_request
struct request_header __header;
unsigned int max_msgsize;
unsigned int read_timeout;
- int inherit;
+ unsigned int attributes;
/* VARARG(name,unicode_str); */
};
struct create_mailslot_reply
@@ -3545,7 +3554,7 @@ struct open_mailslot_request
{
struct request_header __header;
unsigned int access;
- int inherit;
+ unsigned int attributes;
unsigned int sharing;
/* VARARG(name,unicode_str); */
};
@@ -4206,6 +4215,6 @@ union generic_reply
struct set_mailslot_info_reply set_mailslot_info_reply;
};
-#define SERVER_PROTOCOL_VERSION 192
+#define SERVER_PROTOCOL_VERSION 193
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */
Index: server/event.c
===================================================================
RCS file: /home/wine/wine/server/event.c,v
retrieving revision 1.31
diff -u -p -r1.31 event.c
--- server/event.c 9 Jun 2005 15:39:52 -0000 1.31
+++ server/event.c 21 Sep 2005 20:15:42 -0000
@@ -149,7 +149,8 @@ DECL_HANDLER(create_event)
if ((event = create_event( get_req_data(), get_req_data_size(),
req->manual_reset, req->initial_state )))
{
- reply->handle = alloc_handle( current->process, event, req->access, req->inherit );
+ reply->handle = alloc_handle( current->process, event, req->access,
+ IS_INHERIT( req->attributes ) );
release_object( event );
}
}
@@ -158,7 +159,7 @@ DECL_HANDLER(create_event)
DECL_HANDLER(open_event)
{
reply->handle = open_object( sync_namespace, get_req_data(), get_req_data_size(),
- &event_ops, req->access, req->inherit );
+ &event_ops, req->access, IS_INHERIT( req->attributes ) );
}
/* do an event operation */
Index: server/mailslot.c
===================================================================
RCS file: /home/wine/wine/server/mailslot.c,v
retrieving revision 1.9
diff -u -p -r1.9 mailslot.c
--- server/mailslot.c 14 Jul 2005 12:18:05 -0000 1.9
+++ server/mailslot.c 21 Sep 2005 20:15:42 -0000
@@ -356,7 +356,7 @@ DECL_HANDLER(create_mailslot)
if (mailslot)
{
reply->handle = alloc_handle( current->process, mailslot,
- GENERIC_READ, req->inherit );
+ GENERIC_READ, IS_INHERIT( req->attributes ) );
release_object( mailslot );
}
}
@@ -384,7 +384,7 @@ DECL_HANDLER(open_mailslot)
if (writer)
{
reply->handle = alloc_handle( current->process, writer,
- req->access, req->inherit );
+ req->access, IS_INHERIT( req->attributes ) );
release_object( writer );
}
release_object( mailslot );
Index: server/mapping.c
===================================================================
RCS file: /home/wine/wine/server/mapping.c,v
retrieving revision 1.56
diff -u -p -r1.56 mapping.c
--- server/mapping.c 15 Aug 2005 14:50:06 -0000 1.56
+++ server/mapping.c 21 Sep 2005 20:15:42 -0000
@@ -379,7 +379,7 @@ DECL_HANDLER(create_mapping)
if ((obj = create_mapping( size, req->protect, req->file_handle,
get_req_data(), get_req_data_size() )))
{
- reply->handle = alloc_handle( current->process, obj, req->access, req->inherit );
+ reply->handle = alloc_handle( current->process, obj, req->access, IS_INHERIT( req->attributes ) );
release_object( obj );
}
}
@@ -388,7 +388,7 @@ DECL_HANDLER(create_mapping)
DECL_HANDLER(open_mapping)
{
reply->handle = open_object( sync_namespace, get_req_data(), get_req_data_size(),
- &mapping_ops, req->access, req->inherit );
+ &mapping_ops, req->access, IS_INHERIT( req->attributes ) );
}
/* get a mapping information */
Index: server/mutex.c
===================================================================
RCS file: /home/wine/wine/server/mutex.c,v
retrieving revision 1.29
diff -u -p -r1.29 mutex.c
--- server/mutex.c 9 Jun 2005 15:39:52 -0000 1.29
+++ server/mutex.c 21 Sep 2005 20:15:42 -0000
@@ -173,7 +173,8 @@ DECL_HANDLER(create_mutex)
reply->handle = 0;
if ((mutex = create_mutex( get_req_data(), get_req_data_size(), req->owned )))
{
- reply->handle = alloc_handle( current->process, mutex, req->access, req->inherit );
+ reply->handle = alloc_handle( current->process, mutex, req->access,
+ IS_INHERIT( req->attributes ) );
release_object( mutex );
}
}
@@ -182,7 +183,7 @@ DECL_HANDLER(create_mutex)
DECL_HANDLER(open_mutex)
{
reply->handle = open_object( sync_namespace, get_req_data(), get_req_data_size(),
- &mutex_ops, req->access, req->inherit );
+ &mutex_ops, req->access, IS_INHERIT( req->attributes ) );
}
/* release a mutex */
Index: server/named_pipe.c
===================================================================
RCS file: /home/wine/wine/server/named_pipe.c,v
retrieving revision 1.47
diff -u -p -r1.47 named_pipe.c
--- server/named_pipe.c 6 Sep 2005 14:10:53 -0000 1.47
+++ server/named_pipe.c 21 Sep 2005 20:15:42 -0000
@@ -583,7 +583,8 @@ DECL_HANDLER(create_named_pipe)
if (server)
{
reply->handle = alloc_handle( current->process, server,
- GENERIC_READ|GENERIC_WRITE, req->inherit );
+ GENERIC_READ|GENERIC_WRITE,
+ IS_INHERIT( req->attributes ) );
server->pipe->instances++;
release_object( server );
}
@@ -645,7 +646,7 @@ DECL_HANDLER(open_named_pipe)
server->client = client;
client->server = server;
reply->handle = alloc_handle( current->process, client,
- req->access, req->inherit );
+ req->access, IS_INHERIT( req->attributes ) );
}
}
else
Index: server/object.h
===================================================================
RCS file: /home/wine/wine/server/object.h,v
retrieving revision 1.66
diff -u -p -r1.66 object.h
--- server/object.h 19 Aug 2005 14:01:43 -0000 1.66
+++ server/object.h 21 Sep 2005 20:15:42 -0000
@@ -29,6 +29,8 @@
#include "wine/server_protocol.h"
#include "wine/list.h"
+#define IS_INHERIT(a) ((a)&OBJ_INHERIT)
+
#define DEBUG_OBJECTS
/* kernel objects */
Index: server/semaphore.c
===================================================================
RCS file: /home/wine/wine/server/semaphore.c,v
retrieving revision 1.29
diff -u -p -r1.29 semaphore.c
--- server/semaphore.c 9 Jun 2005 15:39:52 -0000 1.29
+++ server/semaphore.c 21 Sep 2005 20:15:42 -0000
@@ -149,7 +149,8 @@ DECL_HANDLER(create_semaphore)
if ((sem = create_semaphore( get_req_data(), get_req_data_size(),
req->initial, req->max )))
{
- reply->handle = alloc_handle( current->process, sem, req->access, req->inherit );
+ reply->handle = alloc_handle( current->process, sem, req->access,
+ IS_INHERIT( req->attributes ) );
release_object( sem );
}
}
@@ -158,7 +159,8 @@ DECL_HANDLER(create_semaphore)
DECL_HANDLER(open_semaphore)
{
reply->handle = open_object( sync_namespace, get_req_data(), get_req_data_size(),
- &semaphore_ops, req->access, req->inherit );
+ &semaphore_ops, req->access,
+ IS_INHERIT( req->attributes ) );
}
/* release a semaphore */
Index: server/timer.c
===================================================================
RCS file: /home/wine/wine/server/timer.c,v
retrieving revision 1.28
diff -u -p -r1.28 timer.c
--- server/timer.c 9 Jun 2005 15:39:52 -0000 1.28
+++ server/timer.c 21 Sep 2005 20:15:42 -0000
@@ -206,7 +206,8 @@ DECL_HANDLER(create_timer)
reply->handle = 0;
if ((timer = create_timer( get_req_data(), get_req_data_size(), req->manual )))
{
- reply->handle = alloc_handle( current->process, timer, req->access, req->inherit );
+ reply->handle = alloc_handle( current->process, timer, req->access,
+ IS_INHERIT( req->attributes ) );
release_object( timer );
}
}
@@ -215,7 +217,7 @@ DECL_HANDLER(create_timer)
DECL_HANDLER(open_timer)
{
reply->handle = open_object( sync_namespace, get_req_data(), get_req_data_size(),
- &timer_ops, req->access, req->inherit );
+ &timer_ops, req->access, IS_INHERIT( req->attributes ) );
}
/* set a waitable timer */
Index: server/trace.c
===================================================================
RCS file: /home/wine/wine/server/trace.c,v
retrieving revision 1.263
diff -u -p -r1.263 trace.c
--- server/trace.c 6 Sep 2005 14:10:53 -0000 1.263
+++ server/trace.c 21 Sep 2005 20:15:43 -0000
@@ -891,9 +891,9 @@ static void dump_select_request( const s
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 );
- fprintf( stderr, " inherit=%d,", req->inherit );
fprintf( stderr, " name=" );
dump_varargs_unicode_str( cur_size );
}
@@ -912,7 +912,7 @@ static void dump_event_op_request( const
static void dump_open_event_request( const struct open_event_request *req )
{
fprintf( stderr, " access=%08x,", req->access );
- fprintf( stderr, " inherit=%d,", req->inherit );
+ fprintf( stderr, " attributes=%08x,", req->attributes );
fprintf( stderr, " name=" );
dump_varargs_unicode_str( cur_size );
}
@@ -925,8 +925,8 @@ static void dump_open_event_reply( const
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 );
- fprintf( stderr, " inherit=%d,", req->inherit );
fprintf( stderr, " name=" );
dump_varargs_unicode_str( cur_size );
}
@@ -949,7 +949,7 @@ static void dump_release_mutex_reply( co
static void dump_open_mutex_request( const struct open_mutex_request *req )
{
fprintf( stderr, " access=%08x,", req->access );
- fprintf( stderr, " inherit=%d,", req->inherit );
+ fprintf( stderr, " attributes=%08x,", req->attributes );
fprintf( stderr, " name=" );
dump_varargs_unicode_str( cur_size );
}
@@ -962,9 +962,9 @@ static void dump_open_mutex_reply( const
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 );
- fprintf( stderr, " inherit=%d,", req->inherit );
fprintf( stderr, " name=" );
dump_varargs_unicode_str( cur_size );
}
@@ -988,7 +988,7 @@ static void dump_release_semaphore_reply
static void dump_open_semaphore_request( const struct open_semaphore_request *req )
{
fprintf( stderr, " access=%08x,", req->access );
- fprintf( stderr, " inherit=%d,", req->inherit );
+ fprintf( stderr, " attributes=%08x,", req->attributes );
fprintf( stderr, " name=" );
dump_varargs_unicode_str( cur_size );
}
@@ -1443,7 +1443,7 @@ static void dump_create_mapping_request(
fprintf( stderr, " size_low=%d,", req->size_low );
fprintf( stderr, " protect=%d,", req->protect );
fprintf( stderr, " access=%08x,", req->access );
- fprintf( stderr, " inherit=%d,", req->inherit );
+ fprintf( stderr, " attributes=%08x,", req->attributes );
fprintf( stderr, " file_handle=%p,", req->file_handle );
fprintf( stderr, " name=" );
dump_varargs_unicode_str( cur_size );
@@ -1457,7 +1457,7 @@ static void dump_create_mapping_reply( c
static void dump_open_mapping_request( const struct open_mapping_request *req )
{
fprintf( stderr, " access=%08x,", req->access );
- fprintf( stderr, " inherit=%d,", req->inherit );
+ fprintf( stderr, " attributes=%08x,", req->attributes );
fprintf( stderr, " name=" );
dump_varargs_unicode_str( cur_size );
}
@@ -1791,7 +1791,7 @@ static void dump_set_registry_notificati
static void dump_create_timer_request( const struct create_timer_request *req )
{
fprintf( stderr, " access=%08x,", req->access );
- fprintf( stderr, " inherit=%d,", req->inherit );
+ fprintf( stderr, " attributes=%08x,", req->attributes );
fprintf( stderr, " manual=%d,", req->manual );
fprintf( stderr, " name=" );
dump_varargs_unicode_str( cur_size );
@@ -1805,7 +1805,7 @@ static void dump_create_timer_reply( con
static void dump_open_timer_request( const struct open_timer_request *req )
{
fprintf( stderr, " access=%08x,", req->access );
- fprintf( stderr, " inherit=%d,", req->inherit );
+ fprintf( stderr, " attributes=%08x,", req->attributes );
fprintf( stderr, " name=" );
dump_varargs_unicode_str( cur_size );
}
@@ -2140,13 +2140,13 @@ static void dump_cancel_async_request( c
static void dump_create_named_pipe_request( const struct create_named_pipe_request *req )
{
+ fprintf( stderr, " attributes=%08x,", req->attributes );
fprintf( stderr, " options=%08x,", req->options );
fprintf( stderr, " flags=%08x,", req->flags );
fprintf( stderr, " maxinstances=%08x,", req->maxinstances );
fprintf( stderr, " outsize=%08x,", req->outsize );
fprintf( stderr, " insize=%08x,", req->insize );
fprintf( stderr, " timeout=%08x,", req->timeout );
- fprintf( stderr, " inherit=%d,", req->inherit );
fprintf( stderr, " name=" );
dump_varargs_unicode_str( cur_size );
}
@@ -2159,8 +2159,8 @@ static void dump_create_named_pipe_reply
static void dump_open_named_pipe_request( const struct open_named_pipe_request *req )
{
fprintf( stderr, " access=%08x,", req->access );
+ fprintf( stderr, " attributes=%08x,", req->attributes );
fprintf( stderr, " flags=%08x,", req->flags );
- fprintf( stderr, " inherit=%d,", req->inherit );
fprintf( stderr, " name=" );
dump_varargs_unicode_str( cur_size );
}
@@ -3050,7 +3050,7 @@ static void dump_create_mailslot_request
{
fprintf( stderr, " max_msgsize=%08x,", req->max_msgsize );
fprintf( stderr, " read_timeout=%08x,", req->read_timeout );
- fprintf( stderr, " inherit=%d,", req->inherit );
+ fprintf( stderr, " attributes=%08x,", req->attributes );
fprintf( stderr, " name=" );
dump_varargs_unicode_str( cur_size );
}
@@ -3063,7 +3063,7 @@ static void dump_create_mailslot_reply(
static void dump_open_mailslot_request( const struct open_mailslot_request *req )
{
fprintf( stderr, " access=%08x,", req->access );
- fprintf( stderr, " inherit=%d,", req->inherit );
+ fprintf( stderr, " attributes=%08x,", req->attributes );
fprintf( stderr, " sharing=%08x,", req->sharing );
fprintf( stderr, " name=" );
dump_varargs_unicode_str( cur_size );
More information about the wine-patches
mailing list