winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
December 2005
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
452 discussions
Start a n
N
ew thread
Alexandre Julliard : server: Make alloc_handle use attributes instead of inherit flag.
by Alexandre Julliard
09 Dec '05
09 Dec '05
Module: wine Branch: refs/heads/master Commit: 24560e70bb8a8519aff932d5e06d4e0519b6f1bc URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=24560e70bb8a8519aff932d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Dec 9 13:58:25 2005 +0100 server: Make alloc_handle use attributes instead of inherit flag. --- server/atom.c | 2 +- server/console.c | 13 +++++-------- server/debugger.c | 14 +++++++------- server/directory.c | 6 ++---- server/event.c | 6 ++---- server/file.c | 6 ++---- server/handle.c | 14 +++++++------- server/handle.h | 4 ++-- server/mailslot.c | 6 ++---- server/mapping.c | 6 ++---- server/mutex.c | 6 ++---- server/named_pipe.c | 6 ++---- server/process.c | 15 +++++++-------- server/semaphore.c | 6 ++---- server/snapshot.c | 2 +- server/sock.c | 6 ++---- server/symlink.c | 6 ++---- server/thread.c | 6 ++---- server/timer.c | 6 ++---- server/token.c | 7 +++---- server/winstation.c | 10 ++++------ 21 files changed, 61 insertions(+), 92 deletions(-)
1
0
0
0
Alexandre Julliard : Make wine_server_fd_to_handle use attributes instead of inherit flag.
by Alexandre Julliard
09 Dec '05
09 Dec '05
Module: wine Branch: refs/heads/master Commit: d02c4a1b828ec63846cf19081bbadf351a43f8ac URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=d02c4a1b828ec63846cf190…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Dec 9 12:22:35 2005 +0100 Make wine_server_fd_to_handle use attributes instead of inherit flag. --- dlls/kernel/console.c | 4 ++-- dlls/ntdll/server.c | 6 +++--- dlls/ntdll/thread.c | 6 +++--- dlls/x11drv/x11drv_main.c | 2 +- include/wine/server.h | 2 +- programs/wineconsole/curses.c | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/dlls/kernel/console.c b/dlls/kernel/console.c index 5dac5ec..249c7c2 100644 --- a/dlls/kernel/console.c +++ b/dlls/kernel/console.c @@ -250,8 +250,8 @@ HANDLE WINAPI OpenConsoleW(LPCWSTR name, ret = INVALID_HANDLE_VALUE; if (fd != -1) { - DWORD attr = (output ? GENERIC_WRITE : GENERIC_READ) | SYNCHRONIZE; - wine_server_fd_to_handle(fd, attr, inherit, &ret); + DWORD access = (output ? GENERIC_WRITE : GENERIC_READ) | SYNCHRONIZE; + wine_server_fd_to_handle(fd, access, inherit ? OBJ_INHERIT : 0, &ret); close(fd); } } diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c index 43629a0..88c0015 100644 --- a/dlls/ntdll/server.c +++ b/dlls/ntdll/server.c @@ -440,13 +440,13 @@ static int receive_fd( obj_handle_t *han * PARAMS * fd [I] Unix file descriptor. * access [I] Win32 access flags. - * inherit [I] Indicates whether this handle is inherited by child processes. + * attributes [I] Object attributes. * handle [O] Address where Wine file handle will be stored. * * RETURNS * NTSTATUS code */ -int wine_server_fd_to_handle( int fd, unsigned int access, int inherit, obj_handle_t *handle ) +int wine_server_fd_to_handle( int fd, unsigned int access, unsigned int attributes, obj_handle_t *handle ) { int ret; @@ -456,7 +456,7 @@ int wine_server_fd_to_handle( int fd, un SERVER_START_REQ( alloc_file_handle ) { req->access = access; - req->attributes = inherit ? OBJ_INHERIT : 0; + req->attributes = attributes; req->fd = fd; if (!(ret = wine_server_call( req ))) *handle = reply->handle; } diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c index 6088c97..8367751 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c @@ -181,9 +181,9 @@ void thread_init(void) /* This is wine specific: we have no parent (we're started from unix) * so, create a simple console with bare handles to unix stdio */ - wine_server_fd_to_handle( 0, GENERIC_READ|SYNCHRONIZE, TRUE, ¶ms.hStdInput ); - wine_server_fd_to_handle( 1, GENERIC_WRITE|SYNCHRONIZE, TRUE, ¶ms.hStdOutput ); - wine_server_fd_to_handle( 2, GENERIC_WRITE|SYNCHRONIZE, TRUE, ¶ms.hStdError ); + wine_server_fd_to_handle( 0, GENERIC_READ|SYNCHRONIZE, OBJ_INHERIT, ¶ms.hStdInput ); + wine_server_fd_to_handle( 1, GENERIC_WRITE|SYNCHRONIZE, OBJ_INHERIT, ¶ms.hStdOutput ); + wine_server_fd_to_handle( 2, GENERIC_WRITE|SYNCHRONIZE, OBJ_INHERIT, ¶ms.hStdError ); } } diff --git a/dlls/x11drv/x11drv_main.c b/dlls/x11drv/x11drv_main.c index 2eee0b8..5c10690 100644 --- a/dlls/x11drv/x11drv_main.c +++ b/dlls/x11drv/x11drv_main.c @@ -533,7 +533,7 @@ struct x11drv_thread_data *x11drv_init_t WARN("Input Method is not available\n"); if (wine_server_fd_to_handle( ConnectionNumber(data->display), GENERIC_READ | SYNCHRONIZE, - FALSE, &data->display_fd )) + 0, &data->display_fd )) { MESSAGE( "x11drv: Can't allocate handle for display fd\n" ); ExitProcess(1); diff --git a/include/wine/server.h b/include/wine/server.h index aa83cac..4f7ed68 100644 --- a/include/wine/server.h +++ b/include/wine/server.h @@ -51,7 +51,7 @@ struct __server_request_info extern unsigned int wine_server_call( void *req_ptr ); extern void wine_server_send_fd( int fd ); -extern int wine_server_fd_to_handle( int fd, unsigned int access, int inherit, obj_handle_t *handle ); +extern int wine_server_fd_to_handle( int fd, unsigned int access, unsigned int attributes, obj_handle_t *handle ); extern int wine_server_handle_to_fd( obj_handle_t handle, unsigned int access, int *unix_fd, int *flags ); extern void wine_server_release_fd( obj_handle_t handle, int unix_fd ); diff --git a/programs/wineconsole/curses.c b/programs/wineconsole/curses.c index 7ec3baa..8b283da 100644 --- a/programs/wineconsole/curses.c +++ b/programs/wineconsole/curses.c @@ -919,7 +919,7 @@ enum init_return WCCURSES_InitBackend(st data->fnSetFont = WCCURSES_SetFont; data->fnDeleteBackend = WCCURSES_DeleteBackend; - if (wine_server_fd_to_handle(0, GENERIC_READ|SYNCHRONIZE, FALSE, + if (wine_server_fd_to_handle(0, GENERIC_READ|SYNCHRONIZE, 0, (obj_handle_t*)&PRIVATE(data)->hInput)) { WINE_FIXME("Cannot open 0\n");
1
0
0
0
Alexandre Julliard : wineconsole: Remove some unnecessary typecasts.
by Alexandre Julliard
09 Dec '05
09 Dec '05
Module: wine Branch: refs/heads/master Commit: 2c54b344672d5ec7ee20af2fa87d7981dbfc55ef URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=2c54b344672d5ec7ee20af2…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Dec 9 12:22:01 2005 +0100 wineconsole: Remove some unnecessary typecasts. --- programs/wineconsole/wineconsole.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/programs/wineconsole/wineconsole.c b/programs/wineconsole/wineconsole.c index 1d5ad7d..83fedf5 100644 --- a/programs/wineconsole/wineconsole.c +++ b/programs/wineconsole/wineconsole.c @@ -45,7 +45,7 @@ void WINECON_FetchCells(struct inner_dat { SERVER_START_REQ( read_console_output ) { - req->handle = (obj_handle_t)data->hConOut; + req->handle = data->hConOut; req->x = 0; req->y = upd_tp; req->mode = CHAR_INFO_MODE_TEXTATTR; @@ -67,7 +67,7 @@ void WINECON_NotifyWindowChange(struct i { SERVER_START_REQ( set_console_output_info ) { - req->handle = (obj_handle_t)data->hConOut; + req->handle = data->hConOut; req->win_left = data->curcfg.win_pos.X; req->win_top = data->curcfg.win_pos.Y; req->win_right = data->curcfg.win_pos.X + data->curcfg.win_width - 1; @@ -89,7 +89,7 @@ int WINECON_GetHistorySize(HANDLE hConIn SERVER_START_REQ(get_console_input_info) { - req->handle = (obj_handle_t)hConIn; + req->handle = hConIn; if (!wine_server_call_err( req )) ret = reply->history_size; } SERVER_END_REQ; @@ -107,7 +107,7 @@ BOOL WINECON_SetHistorySize(HANDLE hConI SERVER_START_REQ(set_console_input_info) { - req->handle = (obj_handle_t)hConIn; + req->handle = hConIn; req->mask = SET_CONSOLE_INPUT_INFO_HISTORY_SIZE; req->history_size = size; ret = !wine_server_call_err( req ); @@ -128,7 +128,7 @@ int WINECON_GetHistoryMode(HANDLE hConIn SERVER_START_REQ(get_console_input_info) { - req->handle = (obj_handle_t)hConIn; + req->handle = hConIn; if (!wine_server_call_err( req )) ret = reply->history_mode; } SERVER_END_REQ; @@ -146,7 +146,7 @@ BOOL WINECON_SetHistoryMode(HANDLE hConI SERVER_START_REQ(set_console_input_info) { - req->handle = (obj_handle_t)hConIn; + req->handle = hConIn; req->mask = SET_CONSOLE_INPUT_INFO_HISTORY_MODE; req->history_mode = mode; ret = !wine_server_call_err( req ); @@ -168,7 +168,7 @@ BOOL WINECON_GetConsoleTitle(HANDLE hCon SERVER_START_REQ( get_console_input_info ) { - req->handle = (obj_handle_t)hConIn; + req->handle = hConIn; wine_server_set_reply( req, buffer, len - sizeof(WCHAR) ); if ((ret = !wine_server_call_err( req ))) { @@ -191,7 +191,7 @@ static BOOL WINECON_SetEditionMode(HANDL SERVER_START_REQ( set_console_input_info ) { - req->handle = (obj_handle_t)hConIn; + req->handle = hConIn; req->mask = SET_CONSOLE_INPUT_INFO_EDITION_MODE; req->edition_mode = edition_mode; ret = !wine_server_call_err( req ); @@ -214,7 +214,7 @@ int WINECON_GrabChanges(struct inner_dat SERVER_START_REQ( get_console_renderer_events ) { wine_server_set_reply( req, evts, sizeof(evts) ); - req->handle = (obj_handle_t)data->hSynchro; + req->handle = data->hSynchro; if (!wine_server_call_err( req )) num = wine_server_reply_size(reply) / sizeof(evts[0]); else num = 0; } @@ -621,7 +621,7 @@ static struct inner_data* WINECON_Init(H SERVER_START_REQ( set_console_input_info ) { - req->handle = (obj_handle_t)data->hConIn; + req->handle = data->hConIn; req->mask = SET_CONSOLE_INPUT_INFO_TITLE; wine_server_add_data( req, appname, lstrlenW(appname) * sizeof(WCHAR) ); ret = !wine_server_call_err( req );
1
0
0
0
Alexandre Julliard : server: Use attributes instead of inherit flag in dup_handle request.
by Alexandre Julliard
09 Dec '05
09 Dec '05
Module: wine Branch: refs/heads/master Commit: 7b910f40f266476514cbafd4c43199c8651cdb18 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=7b910f40f266476514cbafd…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Dec 9 12:21:35 2005 +0100 server: Use attributes instead of inherit flag in dup_handle request. --- dlls/ntdll/om.c | 2 +- include/wine/server_protocol.h | 6 +++--- server/handle.c | 4 ++-- server/protocol.def | 4 ++-- server/trace.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dlls/ntdll/om.c b/dlls/ntdll/om.c index 8a358eb..c46845a 100644 --- a/dlls/ntdll/om.c +++ b/dlls/ntdll/om.c @@ -306,7 +306,7 @@ NTSTATUS WINAPI NtDuplicateObject( HANDL req->src_handle = source; req->dst_process = dest_process; req->access = access; - req->inherit = (attributes & OBJ_INHERIT) != 0; + req->attributes = attributes; req->options = options; if (!(ret = wine_server_call( req ))) diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index 65a5be8..f494e54 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -547,8 +547,8 @@ struct dup_handle_request obj_handle_t src_handle; obj_handle_t dst_process; unsigned int access; - int inherit; - int options; + unsigned int attributes; + unsigned int options; }; struct dup_handle_reply { @@ -4321,6 +4321,6 @@ union generic_reply struct query_symlink_reply query_symlink_reply; }; -#define SERVER_PROTOCOL_VERSION 213 +#define SERVER_PROTOCOL_VERSION 214 #endif /* __WINE_WINE_SERVER_PROTOCOL_H */ diff --git a/server/handle.c b/server/handle.c index 176249e..9ba56b6 100644 --- a/server/handle.c +++ b/server/handle.c @@ -573,12 +573,12 @@ DECL_HANDLER(dup_handle) if (req->options & DUP_HANDLE_MAKE_GLOBAL) { reply->handle = duplicate_handle( src, req->src_handle, NULL, - req->access, req->inherit, req->options ); + req->access, req->attributes & OBJ_INHERIT, req->options ); } else if ((dst = get_process_from_handle( req->dst_process, PROCESS_DUP_HANDLE ))) { reply->handle = duplicate_handle( src, req->src_handle, dst, - req->access, req->inherit, req->options ); + req->access, req->attributes & OBJ_INHERIT, req->options ); release_object( dst ); } /* close the handle no matter what happened */ diff --git a/server/protocol.def b/server/protocol.def index 70b587a..3fd4ff0 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -450,8 +450,8 @@ enum apc_type { APC_NONE, APC_USER, APC_ obj_handle_t src_handle; /* src handle to duplicate */ obj_handle_t dst_process; /* dst process handle */ unsigned int access; /* wanted access rights */ - int inherit; /* inherit flag */ - int options; /* duplicate options (see below) */ + unsigned int attributes; /* object attributes */ + unsigned int options; /* duplicate options (see below) */ @REPLY obj_handle_t handle; /* duplicated handle in dst process */ int fd; /* associated fd to close */ diff --git a/server/trace.c b/server/trace.c index aff977f..e0947e2 100644 --- a/server/trace.c +++ b/server/trace.c @@ -846,8 +846,8 @@ static void dump_dup_handle_request( con fprintf( stderr, " src_handle=%p,", req->src_handle ); fprintf( stderr, " dst_process=%p,", req->dst_process ); fprintf( stderr, " access=%08x,", req->access ); - fprintf( stderr, " inherit=%d,", req->inherit ); - fprintf( stderr, " options=%d", req->options ); + fprintf( stderr, " attributes=%08x,", req->attributes ); + fprintf( stderr, " options=%08x", req->options ); } static void dump_dup_handle_reply( const struct dup_handle_reply *req )
1
0
0
0
Alexandre Julliard : server: Use attributes instead of inherit flag in token requests.
by Alexandre Julliard
09 Dec '05
09 Dec '05
Module: wine Branch: refs/heads/master Commit: 836d07c36971305960d8af8d4c9acb4e3ae9de43 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=836d07c36971305960d8af8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Dec 9 12:17:19 2005 +0100 server: Use attributes instead of inherit flag in token requests. Also use the specified access rights in the open_token request. --- dlls/ntdll/nt.c | 20 ++++++++++++-------- include/wine/server_protocol.h | 6 ++++-- server/protocol.def | 10 ++++++---- server/token.c | 9 ++++++--- server/trace.c | 4 +++- 5 files changed, 31 insertions(+), 18 deletions(-) diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c index a60820d..3fe44cb 100644 --- a/dlls/ntdll/nt.c +++ b/dlls/ntdll/nt.c @@ -63,10 +63,10 @@ NTSTATUS WINAPI NtDuplicateToken( SERVER_START_REQ( duplicate_token ) { - req->handle = ExistingToken; - req->access = DesiredAccess; - req->inherit = ObjectAttributes && (ObjectAttributes->Attributes & OBJ_INHERIT); - req->primary = (TokenType == TokenPrimary); + req->handle = ExistingToken; + req->access = DesiredAccess; + req->attributes = ObjectAttributes ? ObjectAttributes->Attributes : 0; + req->primary = (TokenType == TokenPrimary); req->impersonation_level = ImpersonationLevel; status = wine_server_call( req ); if (!status) *NewToken = reply->new_handle; @@ -91,8 +91,10 @@ NTSTATUS WINAPI NtOpenProcessToken( SERVER_START_REQ( open_token ) { - req->handle = ProcessHandle; - req->flags = 0; + req->handle = ProcessHandle; + req->access = DesiredAccess; + req->attributes = 0; + req->flags = 0; ret = wine_server_call( req ); if (!ret) *TokenHandle = reply->token; } @@ -118,8 +120,10 @@ NTSTATUS WINAPI NtOpenThreadToken( SERVER_START_REQ( open_token ) { - req->handle = ThreadHandle; - req->flags = OPEN_TOKEN_THREAD; + req->handle = ThreadHandle; + req->access = DesiredAccess; + req->attributes = 0; + req->flags = OPEN_TOKEN_THREAD; if (OpenAsSelf) req->flags |= OPEN_TOKEN_AS_SELF; ret = wine_server_call( req ); if (!ret) *TokenHandle = reply->token; diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index f38868f..65a5be8 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -3416,6 +3416,8 @@ struct open_token_request { struct request_header __header; obj_handle_t handle; + unsigned int access; + unsigned int attributes; unsigned int flags; }; struct open_token_reply @@ -3498,7 +3500,7 @@ struct duplicate_token_request struct request_header __header; obj_handle_t handle; unsigned int access; - int inherit; + unsigned int attributes; int primary; int impersonation_level; }; @@ -4319,6 +4321,6 @@ union generic_reply struct query_symlink_reply query_symlink_reply; }; -#define SERVER_PROTOCOL_VERSION 212 +#define SERVER_PROTOCOL_VERSION 213 #endif /* __WINE_WINE_SERVER_PROTOCOL_H */ diff --git a/server/protocol.def b/server/protocol.def index df5a975..70b587a 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -2399,6 +2399,8 @@ enum message_type /* Open a security token */ @REQ(open_token) obj_handle_t handle; /* handle to the thread or process */ + unsigned int access; /* access rights to the new token */ + unsigned int attributes;/* object attributes */ unsigned int flags; /* flags (see below) */ @REPLY obj_handle_t token; /* handle to the token */ @@ -2454,10 +2456,10 @@ enum message_type @END @REQ(duplicate_token) - obj_handle_t handle; /* handle to the token to duplicate */ - unsigned int access; /* access rights to the new token */ - int inherit; /* inherit flag */ - int primary; /* is the new token to be a primary one? */ + obj_handle_t handle; /* handle to the token to duplicate */ + unsigned int access; /* access rights to the new token */ + unsigned int attributes; /* object attributes */ + int primary; /* is the new token to be a primary one? */ int impersonation_level; /* impersonation level of the new token */ @REPLY obj_handle_t new_handle; /* duplicated handle */ diff --git a/server/token.c b/server/token.c index a31d656..d10b9a1 100644 --- a/server/token.c +++ b/server/token.c @@ -883,7 +883,8 @@ DECL_HANDLER(open_token) if (thread) { if (thread->token) - reply->token = alloc_handle( current->process, thread->token, TOKEN_ALL_ACCESS, 0); + reply->token = alloc_handle( current->process, thread->token, req->access, + req->attributes & OBJ_INHERIT ); else set_error(STATUS_NO_TOKEN); release_object( thread ); @@ -895,7 +896,8 @@ DECL_HANDLER(open_token) if (process) { if (process->token) - reply->token = alloc_handle( current->process, process->token, TOKEN_ALL_ACCESS, 0); + reply->token = alloc_handle( current->process, process->token, req->access, + req->attributes & OBJ_INHERIT ); else set_error(STATUS_NO_TOKEN); release_object( process ); @@ -1015,7 +1017,8 @@ DECL_HANDLER(duplicate_token) access = req->access; if (access & MAXIMUM_ALLOWED) access = TOKEN_ALL_ACCESS; /* FIXME: needs general solution */ - reply->new_handle = alloc_handle( current->process, token, access, req->inherit); + reply->new_handle = alloc_handle( current->process, token, access, + req->attributes & OBJ_INHERIT); release_object( token ); } release_object( src_token ); diff --git a/server/trace.c b/server/trace.c index 153f5a9..aff977f 100644 --- a/server/trace.c +++ b/server/trace.c @@ -2949,6 +2949,8 @@ static void dump_set_clipboard_info_repl static void dump_open_token_request( const struct open_token_request *req ) { fprintf( stderr, " handle=%p,", req->handle ); + fprintf( stderr, " access=%08x,", req->access ); + fprintf( stderr, " attributes=%08x,", req->attributes ); fprintf( stderr, " flags=%08x", req->flags ); } @@ -3021,7 +3023,7 @@ static void dump_duplicate_token_request { fprintf( stderr, " handle=%p,", req->handle ); fprintf( stderr, " access=%08x,", req->access ); - fprintf( stderr, " inherit=%d,", req->inherit ); + fprintf( stderr, " attributes=%08x,", req->attributes ); fprintf( stderr, " primary=%d,", req->primary ); fprintf( stderr, " impersonation_level=%d", req->impersonation_level ); }
1
0
0
0
Alexandre Julliard : server: Use attributes instead of inherit flag in process and thread requests.
by Alexandre Julliard
09 Dec '05
09 Dec '05
Module: wine Branch: refs/heads/master Commit: f2d7dd645e771fdb6052d789a5b1651ce8740566 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=f2d7dd645e771fdb6052d78…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Dec 9 12:13:11 2005 +0100 server: Use attributes instead of inherit flag in process and thread requests. --- dlls/kernel/process.c | 8 +++++--- dlls/ntdll/process.c | 6 +++--- dlls/ntdll/thread.c | 9 +++++---- include/wine/server_protocol.h | 15 +++++++++------ server/process.c | 7 ++++--- server/protocol.def | 15 +++++++++------ server/thread.c | 5 +++-- server/trace.c | 13 ++++++++----- 8 files changed, 46 insertions(+), 32 deletions(-)
1
0
0
0
Alexandre Julliard : server: Use attributes instead of inherit flag in snapshot requests.
by Alexandre Julliard
09 Dec '05
09 Dec '05
Module: wine Branch: refs/heads/master Commit: f11d0a375f0118a2cc1a528fe0471d0933b9206d URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=f11d0a375f0118a2cc1a528…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Dec 9 12:09:44 2005 +0100 server: Use attributes instead of inherit flag in snapshot requests. --- dlls/kernel/toolhelp.c | 5 ++--- dlls/ntdll/nt.c | 6 +++--- include/wine/server_protocol.h | 4 ++-- server/protocol.def | 2 +- server/snapshot.c | 2 +- server/trace.c | 2 +- 6 files changed, 10 insertions(+), 11 deletions(-) diff --git a/dlls/kernel/toolhelp.c b/dlls/kernel/toolhelp.c index cfbe0e3..2aef731 100644 --- a/dlls/kernel/toolhelp.c +++ b/dlls/kernel/toolhelp.c @@ -61,9 +61,8 @@ HANDLE WINAPI CreateToolhelp32Snapshot( if (flags & TH32CS_SNAPMODULE) req->flags |= SNAP_MODULE; if (flags & TH32CS_SNAPPROCESS) req->flags |= SNAP_PROCESS; if (flags & TH32CS_SNAPTHREAD) req->flags |= SNAP_THREAD; - - req->inherit = (flags & TH32CS_INHERIT) != 0; - req->pid = process; + req->attributes = (flags & TH32CS_INHERIT) ? OBJ_INHERIT : 0; + req->pid = process; wine_server_call_err( req ); ret = reply->handle; } diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c index 4c90f49..a60820d 100644 --- a/dlls/ntdll/nt.c +++ b/dlls/ntdll/nt.c @@ -657,9 +657,9 @@ NTSTATUS WINAPI NtQuerySystemInformation SERVER_START_REQ( create_snapshot ) { - req->flags = SNAP_PROCESS | SNAP_THREAD; - req->inherit = FALSE; - req->pid = 0; + req->flags = SNAP_PROCESS | SNAP_THREAD; + req->attributes = 0; + req->pid = 0; if (!(ret = wine_server_call( req ))) hSnap = reply->handle; } SERVER_END_REQ; diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index 785db2f..4746729 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -1473,7 +1473,7 @@ struct get_mapping_info_reply struct create_snapshot_request { struct request_header __header; - int inherit; + unsigned int attributes; int flags; process_id_t pid; }; @@ -4316,6 +4316,6 @@ union generic_reply struct query_symlink_reply query_symlink_reply; }; -#define SERVER_PROTOCOL_VERSION 210 +#define SERVER_PROTOCOL_VERSION 211 #endif /* __WINE_WINE_SERVER_PROTOCOL_H */ diff --git a/server/protocol.def b/server/protocol.def index 2dfd020..0792f22 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -1096,7 +1096,7 @@ enum char_info_mode #define SNAP_MODULE 0x00000008 /* Create a snapshot */ @REQ(create_snapshot) - int inherit; /* inherit flag */ + unsigned int attributes; /* object attributes */ int flags; /* snapshot flags (SNAP_*) */ process_id_t pid; /* process id */ @REPLY diff --git a/server/snapshot.c b/server/snapshot.c index 7695f0d..4159962 100644 --- a/server/snapshot.c +++ b/server/snapshot.c @@ -236,7 +236,7 @@ DECL_HANDLER(create_snapshot) reply->handle = 0; if ((snapshot = create_snapshot( req->pid, req->flags ))) { - reply->handle = alloc_handle( current->process, snapshot, 0, req->inherit ); + reply->handle = alloc_handle( current->process, snapshot, 0, req->attributes & OBJ_INHERIT ); release_object( snapshot ); } } diff --git a/server/trace.c b/server/trace.c index d79adb6..5cdcfef 100644 --- a/server/trace.c +++ b/server/trace.c @@ -1494,7 +1494,7 @@ static void dump_get_mapping_info_reply( static void dump_create_snapshot_request( const struct create_snapshot_request *req ) { - fprintf( stderr, " inherit=%d,", req->inherit ); + fprintf( stderr, " attributes=%08x,", req->attributes ); fprintf( stderr, " flags=%d,", req->flags ); fprintf( stderr, " pid=%04x", req->pid ); }
1
0
0
0
Alexandre Julliard : server: Use attributes instead of inherit flag in console requests.
by Alexandre Julliard
09 Dec '05
09 Dec '05
Module: wine Branch: refs/heads/master Commit: 7a096601e3f94e932a33e10f3fe40a6a40c1ddee URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=7a096601e3f94e932a33e10…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Dec 9 12:05:20 2005 +0100 server: Use attributes instead of inherit flag in console requests. --- dlls/kernel/console.c | 16 ++++++++-------- include/wine/server_protocol.h | 12 ++++++------ programs/wineconsole/wineconsole.c | 18 +++++++++--------- server/console.c | 6 +++--- server/protocol.def | 10 +++++----- server/trace.c | 10 +++++----- 6 files changed, 36 insertions(+), 36 deletions(-) diff --git a/dlls/kernel/console.c b/dlls/kernel/console.c index 9e62bcb..5dac5ec 100644 --- a/dlls/kernel/console.c +++ b/dlls/kernel/console.c @@ -230,10 +230,10 @@ HANDLE WINAPI OpenConsoleW(LPCWSTR name, SERVER_START_REQ( open_console ) { - req->from = output; - req->access = access; - req->share = FILE_SHARE_READ | FILE_SHARE_WRITE; - req->inherit = inherit; + req->from = output; + req->access = access; + req->attributes = inherit ? OBJ_INHERIT : 0; + req->share = FILE_SHARE_READ | FILE_SHARE_WRITE; SetLastError(0); wine_server_call_err( req ); ret = reply->handle; @@ -1665,10 +1665,10 @@ HANDLE WINAPI CreateConsoleScreenBuffer( SERVER_START_REQ(create_console_output) { - req->handle_in = 0; - req->access = dwDesiredAccess; - req->share = dwShareMode; - req->inherit = (sa && sa->bInheritHandle); + req->handle_in = 0; + req->access = dwDesiredAccess; + req->attributes = (sa && sa->bInheritHandle) ? OBJ_INHERIT : 0; + req->share = dwShareMode; if (!wine_server_call_err( req )) ret = reply->handle_out; } SERVER_END_REQ; diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index 4677cfb..785db2f 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -977,7 +977,7 @@ struct alloc_console_request { struct request_header __header; unsigned int access; - int inherit; + unsigned int attributes; process_id_t pid; }; struct alloc_console_reply @@ -1063,7 +1063,7 @@ struct open_console_request int from; unsigned int access; - int inherit; + unsigned int attributes; int share; }; struct open_console_reply @@ -1183,9 +1183,9 @@ struct create_console_output_request { struct request_header __header; obj_handle_t handle_in; - int access; - int share; - int inherit; + unsigned int access; + unsigned int attributes; + unsigned int share; }; struct create_console_output_reply { @@ -4316,6 +4316,6 @@ union generic_reply struct query_symlink_reply query_symlink_reply; }; -#define SERVER_PROTOCOL_VERSION 209 +#define SERVER_PROTOCOL_VERSION 210 #endif /* __WINE_WINE_SERVER_PROTOCOL_H */ diff --git a/programs/wineconsole/wineconsole.c b/programs/wineconsole/wineconsole.c index d73dc96..1d5ad7d 100644 --- a/programs/wineconsole/wineconsole.c +++ b/programs/wineconsole/wineconsole.c @@ -274,10 +274,10 @@ int WINECON_GrabChanges(struct inner_dat case CONSOLE_RENDERER_ACTIVE_SB_EVENT: SERVER_START_REQ( open_console ) { - req->from = (int)data->hConIn; - req->access = GENERIC_READ | GENERIC_WRITE; - req->share = FILE_SHARE_READ | FILE_SHARE_WRITE; - req->inherit = FALSE; + req->from = (int)data->hConIn; + req->access = GENERIC_READ | GENERIC_WRITE; + req->attributes = 0; + req->share = FILE_SHARE_READ | FILE_SHARE_WRITE; h = wine_server_call_err( req ) ? 0 : (HANDLE)reply->handle; } SERVER_END_REQ; @@ -608,7 +608,7 @@ static struct inner_data* WINECON_Init(H SERVER_START_REQ(alloc_console) { req->access = GENERIC_READ | GENERIC_WRITE; - req->inherit = FALSE; + req->attributes = 0; req->pid = pid; ret = !wine_server_call_err( req ); @@ -631,10 +631,10 @@ static struct inner_data* WINECON_Init(H SERVER_START_REQ(create_console_output) { - req->handle_in = (obj_handle_t)data->hConIn; - req->access = GENERIC_WRITE|GENERIC_READ; - req->share = FILE_SHARE_READ|FILE_SHARE_WRITE; - req->inherit = FALSE; + req->handle_in = data->hConIn; + req->access = GENERIC_WRITE|GENERIC_READ; + req->attributes = 0; + req->share = FILE_SHARE_READ|FILE_SHARE_WRITE; ret = !wine_server_call_err( req ); data->hConOut = (HANDLE)reply->handle_out; } diff --git a/server/console.c b/server/console.c index e567d60..e096079 100644 --- a/server/console.c +++ b/server/console.c @@ -1240,7 +1240,7 @@ DECL_HANDLER(alloc_console) } if ((console = (struct console_input*)create_console_input( current ))) { - if ((in = alloc_handle( renderer, console, req->access, req->inherit ))) + if ((in = alloc_handle( renderer, console, req->access, req->attributes & OBJ_INHERIT ))) { if ((evt = alloc_handle( renderer, console->evt, SYNCHRONIZE|GENERIC_READ|GENERIC_WRITE, FALSE ))) @@ -1312,7 +1312,7 @@ DECL_HANDLER(open_console) /* FIXME: req->share is not used (as in screen buffer creation) */ if (obj) { - reply->handle = alloc_handle( current->process, obj, req->access, req->inherit ); + reply->handle = alloc_handle( current->process, obj, req->access, req->attributes & OBJ_INHERIT ); release_object( obj ); } else if (!get_error()) set_error( STATUS_ACCESS_DENIED ); @@ -1411,7 +1411,7 @@ DECL_HANDLER(create_console_output) /* FIXME: should store sharing and test it when opening the CONOUT$ device * see file.c on how this could be done */ reply->handle_out = alloc_handle( current->process, screen_buffer, - req->access, req->inherit ); + req->access, req->attributes & OBJ_INHERIT ); release_object( screen_buffer ); } release_object( console ); diff --git a/server/protocol.def b/server/protocol.def index 98bcb90..2dfd020 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -738,7 +738,7 @@ enum event_op { PULSE_EVENT, SET_EVENT, /* Allocate a console (only used by a console renderer) */ @REQ(alloc_console) unsigned int access; /* wanted access rights */ - int inherit; /* inherit flag */ + unsigned int attributes; /* object attributes */ process_id_t pid; /* pid of process which shall be attached to the console */ @REPLY obj_handle_t handle_in; /* handle to console input */ @@ -808,7 +808,7 @@ struct console_renderer_event int from; /* 0 (resp 1) input (resp output) of current process console */ /* otherwise console_in handle to get active screen buffer? */ unsigned int access; /* wanted access rights */ - int inherit; /* inherit flag */ + unsigned int attributes; /* object attributes */ int share; /* share mask (only for output handles) */ @REPLY obj_handle_t handle; /* handle to the console */ @@ -885,9 +885,9 @@ struct console_renderer_event /* creates a new screen buffer on process' console */ @REQ(create_console_output) obj_handle_t handle_in; /* handle to console input, or 0 for process' console */ - int access; /* wanted access rights */ - int share; /* sharing credentials */ - int inherit; /* inherit flag */ + unsigned int access; /* wanted access rights */ + unsigned int attributes; /* object attributes */ + unsigned int share; /* sharing credentials */ @REPLY obj_handle_t handle_out; /* handle to the screen buffer */ @END diff --git a/server/trace.c b/server/trace.c index 6ede1c2..d79adb6 100644 --- a/server/trace.c +++ b/server/trace.c @@ -1169,7 +1169,7 @@ static void dump_set_socket_deferred_req static void dump_alloc_console_request( const struct alloc_console_request *req ) { fprintf( stderr, " access=%08x,", req->access ); - fprintf( stderr, " inherit=%d,", req->inherit ); + fprintf( stderr, " attributes=%08x,", req->attributes ); fprintf( stderr, " pid=%04x", req->pid ); } @@ -1198,7 +1198,7 @@ static void dump_open_console_request( c { fprintf( stderr, " from=%d,", req->from ); fprintf( stderr, " access=%08x,", req->access ); - fprintf( stderr, " inherit=%d,", req->inherit ); + fprintf( stderr, " attributes=%08x,", req->attributes ); fprintf( stderr, " share=%d", req->share ); } @@ -1282,9 +1282,9 @@ static void dump_get_console_input_histo static void dump_create_console_output_request( const struct create_console_output_request *req ) { fprintf( stderr, " handle_in=%p,", req->handle_in ); - fprintf( stderr, " access=%d,", req->access ); - fprintf( stderr, " share=%d,", req->share ); - fprintf( stderr, " inherit=%d", req->inherit ); + fprintf( stderr, " access=%08x,", req->access ); + fprintf( stderr, " attributes=%08x,", req->attributes ); + fprintf( stderr, " share=%08x", req->share ); } static void dump_create_console_output_reply( const struct create_console_output_reply *req )
1
0
0
0
Alexandre Julliard : server: Use attributes instead of inherit flag in file requests.
by Alexandre Julliard
09 Dec '05
09 Dec '05
Module: wine Branch: refs/heads/master Commit: 27b1aec925e445488b99b686573835a2263787cd URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=27b1aec925e445488b99b68…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Dec 9 12:00:48 2005 +0100 server: Use attributes instead of inherit flag in file requests. --- dlls/ntdll/file.c | 2 +- dlls/ntdll/server.c | 6 +++--- include/wine/server_protocol.h | 6 +++--- server/file.c | 6 ++++-- server/protocol.def | 4 ++-- server/trace.c | 4 ++-- 6 files changed, 15 insertions(+), 13 deletions(-) diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c index 660ba1b..2e70296 100644 --- a/dlls/ntdll/file.c +++ b/dlls/ntdll/file.c @@ -214,7 +214,7 @@ NTSTATUS WINAPI NtCreateFile( PHANDLE ha SERVER_START_REQ( create_file ) { req->access = access; - req->inherit = (attr->Attributes & OBJ_INHERIT) != 0; + req->attributes = attr->Attributes; req->sharing = sharing; req->create = disposition; req->options = options; diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c index 7bd015c..43629a0 100644 --- a/dlls/ntdll/server.c +++ b/dlls/ntdll/server.c @@ -455,9 +455,9 @@ int wine_server_fd_to_handle( int fd, un SERVER_START_REQ( alloc_file_handle ) { - req->access = access; - req->inherit = inherit; - req->fd = fd; + req->access = access; + req->attributes = inherit ? OBJ_INHERIT : 0; + req->fd = fd; if (!(ret = wine_server_call( req ))) *handle = reply->handle; } SERVER_END_REQ; diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index 359affa..4677cfb 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -754,7 +754,7 @@ struct create_file_request { struct request_header __header; unsigned int access; - int inherit; + unsigned int attributes; unsigned int sharing; int create; unsigned int options; @@ -773,7 +773,7 @@ struct alloc_file_handle_request { struct request_header __header; unsigned int access; - int inherit; + unsigned int attributes; int fd; }; struct alloc_file_handle_reply @@ -4316,6 +4316,6 @@ union generic_reply struct query_symlink_reply query_symlink_reply; }; -#define SERVER_PROTOCOL_VERSION 208 +#define SERVER_PROTOCOL_VERSION 209 #endif /* __WINE_WINE_SERVER_PROTOCOL_H */ diff --git a/server/file.c b/server/file.c index 4d13ca7..1b34c7a 100644 --- a/server/file.c +++ b/server/file.c @@ -356,7 +356,8 @@ DECL_HANDLER(create_file) if ((file = create_file( get_req_data(), get_req_data_size(), req->access, req->sharing, req->create, req->options, req->attrs ))) { - reply->handle = alloc_handle( current->process, file, req->access, req->inherit ); + reply->handle = alloc_handle( current->process, file, req->access, + req->attributes & OBJ_INHERIT ); release_object( file ); } } @@ -375,7 +376,8 @@ DECL_HANDLER(alloc_file_handle) } if ((file = create_file_for_fd( fd, req->access, FILE_SHARE_READ | FILE_SHARE_WRITE ))) { - reply->handle = alloc_handle( current->process, file, req->access, req->inherit ); + reply->handle = alloc_handle( current->process, file, req->access, + req->attributes & OBJ_INHERIT ); release_object( file ); } } diff --git a/server/protocol.def b/server/protocol.def index bbb842e..98bcb90 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -590,7 +590,7 @@ enum event_op { PULSE_EVENT, SET_EVENT, /* Create a file */ @REQ(create_file) unsigned int access; /* wanted access rights */ - int inherit; /* inherit flag */ + unsigned int attributes; /* object attributes */ unsigned int sharing; /* sharing flags */ int create; /* file create action */ unsigned int options; /* file options */ @@ -604,7 +604,7 @@ enum event_op { PULSE_EVENT, SET_EVENT, /* Allocate a file handle for a Unix fd */ @REQ(alloc_file_handle) unsigned int access; /* wanted access rights */ - int inherit; /* inherit flag */ + unsigned int attributes; /* object attributes */ int fd; /* file descriptor on the client side */ @REPLY obj_handle_t handle; /* handle to the file */ diff --git a/server/trace.c b/server/trace.c index eeb4e76..6ede1c2 100644 --- a/server/trace.c +++ b/server/trace.c @@ -1008,7 +1008,7 @@ static void dump_open_semaphore_reply( c static void dump_create_file_request( const struct create_file_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, " create=%d,", req->create ); fprintf( stderr, " options=%08x,", req->options ); @@ -1025,7 +1025,7 @@ static void dump_create_file_reply( cons static void dump_alloc_file_handle_request( const struct alloc_file_handle_request *req ) { fprintf( stderr, " access=%08x,", req->access ); - fprintf( stderr, " inherit=%d,", req->inherit ); + fprintf( stderr, " attributes=%08x,", req->attributes ); fprintf( stderr, " fd=%d", req->fd ); }
1
0
0
0
Alexandre Julliard : server: Use attributes instead of inherit flag in socket requests.
by Alexandre Julliard
09 Dec '05
09 Dec '05
Module: wine Branch: refs/heads/master Commit: bc30303c5668877f7dcb927ddf8777da9e3b5316 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=bc30303c5668877f7dcb927…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Dec 9 11:58:55 2005 +0100 server: Use attributes instead of inherit flag in socket requests. --- dlls/winsock/socket.c | 18 +++++++++--------- include/wine/server_protocol.h | 6 +++--- server/protocol.def | 4 ++-- server/sock.c | 6 ++++-- server/trace.c | 4 ++-- 5 files changed, 20 insertions(+), 18 deletions(-) diff --git a/dlls/winsock/socket.c b/dlls/winsock/socket.c index e83e747..e67363b 100644 --- a/dlls/winsock/socket.c +++ b/dlls/winsock/socket.c @@ -1592,9 +1592,9 @@ SOCKET WINAPI WS_accept(SOCKET s, struct } SERVER_START_REQ( accept_socket ) { - req->lhandle = SOCKET2HANDLE(s); - req->access = GENERIC_READ|GENERIC_WRITE|SYNCHRONIZE; - req->inherit = TRUE; + req->lhandle = SOCKET2HANDLE(s); + req->access = GENERIC_READ|GENERIC_WRITE|SYNCHRONIZE; + req->attributes = OBJ_INHERIT; set_error( wine_server_call( req ) ); as = HANDLE2SOCKET( reply->handle ); } @@ -3513,12 +3513,12 @@ SOCKET WINAPI WSASocketW(int af, int typ SERVER_START_REQ( create_socket ) { - req->family = af; - req->type = type; - req->protocol = protocol; - req->access = GENERIC_READ|GENERIC_WRITE|SYNCHRONIZE; - req->flags = dwFlags; - req->inherit = TRUE; + req->family = af; + req->type = type; + req->protocol = protocol; + req->access = GENERIC_READ|GENERIC_WRITE|SYNCHRONIZE; + req->attributes = OBJ_INHERIT; + req->flags = dwFlags; set_error( wine_server_call( req ) ); ret = HANDLE2SOCKET( reply->handle ); } diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index b81cc6c..359affa 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -885,7 +885,7 @@ struct create_socket_request { struct request_header __header; unsigned int access; - int inherit; + unsigned int attributes; int family; int type; int protocol; @@ -904,7 +904,7 @@ struct accept_socket_request struct request_header __header; obj_handle_t lhandle; unsigned int access; - int inherit; + unsigned int attributes; }; struct accept_socket_reply { @@ -4316,6 +4316,6 @@ union generic_reply struct query_symlink_reply query_symlink_reply; }; -#define SERVER_PROTOCOL_VERSION 207 +#define SERVER_PROTOCOL_VERSION 208 #endif /* __WINE_WINE_SERVER_PROTOCOL_H */ diff --git a/server/protocol.def b/server/protocol.def index dc302b0..bbb842e 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -679,7 +679,7 @@ enum event_op { PULSE_EVENT, SET_EVENT, /* Create a socket */ @REQ(create_socket) unsigned int access; /* wanted access rights */ - int inherit; /* inherit flag */ + unsigned int attributes; /* object attributes */ int family; /* family, see socket manpage */ int type; /* type, see socket manpage */ int protocol; /* protocol, see socket manpage */ @@ -693,7 +693,7 @@ enum event_op { PULSE_EVENT, SET_EVENT, @REQ(accept_socket) obj_handle_t lhandle; /* handle to the listening socket */ unsigned int access; /* wanted access rights */ - int inherit; /* inherit flag */ + unsigned int attributes; /* object attributes */ @REPLY obj_handle_t handle; /* handle to the new socket */ @END diff --git a/server/sock.c b/server/sock.c index 62f39e5..6e2acbb 100644 --- a/server/sock.c +++ b/server/sock.c @@ -773,7 +773,8 @@ DECL_HANDLER(create_socket) reply->handle = 0; if ((obj = create_socket( req->family, req->type, req->protocol, req->flags )) != NULL) { - reply->handle = alloc_handle( current->process, obj, req->access, req->inherit ); + reply->handle = alloc_handle( current->process, obj, req->access, + req->attributes & OBJ_INHERIT ); release_object( obj ); } } @@ -786,7 +787,8 @@ DECL_HANDLER(accept_socket) reply->handle = 0; if ((sock = accept_socket( req->lhandle )) != NULL) { - reply->handle = alloc_handle( current->process, &sock->obj, req->access, req->inherit ); + reply->handle = alloc_handle( current->process, &sock->obj, req->access, + req->attributes & OBJ_INHERIT ); sock->wparam = reply->handle; /* wparam for message is the socket handle */ sock_reselect( sock ); release_object( &sock->obj ); diff --git a/server/trace.c b/server/trace.c index 5319912..eeb4e76 100644 --- a/server/trace.c +++ b/server/trace.c @@ -1103,7 +1103,7 @@ static void dump_unmount_device_request( static void dump_create_socket_request( const struct create_socket_request *req ) { fprintf( stderr, " access=%08x,", req->access ); - fprintf( stderr, " inherit=%d,", req->inherit ); + fprintf( stderr, " attributes=%08x,", req->attributes ); fprintf( stderr, " family=%d,", req->family ); fprintf( stderr, " type=%d,", req->type ); fprintf( stderr, " protocol=%d,", req->protocol ); @@ -1119,7 +1119,7 @@ static void dump_accept_socket_request( { fprintf( stderr, " lhandle=%p,", req->lhandle ); fprintf( stderr, " access=%08x,", req->access ); - fprintf( stderr, " inherit=%d", req->inherit ); + fprintf( stderr, " attributes=%08x", req->attributes ); } static void dump_accept_socket_reply( const struct accept_socket_reply *req )
1
0
0
0
← Newer
1
...
25
26
27
28
29
30
31
...
46
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Results per page:
10
25
50
100
200