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
July
June
May
April
March
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
August 2018
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 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
2 participants
618 discussions
Start a n
N
ew thread
Zebediah Figura : msi: Don't refcount the msi_custom_action_info struct.
by Alexandre Julliard
16 Aug '18
16 Aug '18
Module: wine Branch: master Commit: b7f06accb05edd70239dbd7b04b956bf10456dee URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b7f06accb05edd70239dbd7b…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Aug 16 10:34:39 2018 -0500 msi: Don't refcount the msi_custom_action_info struct. This is unnecessary, and may have always been so. The struct will either be freed after it completes synchronously, or after it has completed asynchronously in ACTION_FinishCustomActions(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msi/custom.c | 46 ++++++++++++++-------------------------------- 1 file changed, 14 insertions(+), 32 deletions(-) diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c index 9418b42..950681e 100644 --- a/dlls/msi/custom.c +++ b/dlls/msi/custom.c @@ -380,7 +380,6 @@ static UINT wait_process_handle(MSIPACKAGE* package, UINT type, typedef struct _msi_custom_action_info { struct list entry; - LONG refs; MSIPACKAGE *package; LPWSTR source; LPWSTR target; @@ -391,31 +390,22 @@ typedef struct _msi_custom_action_info { DWORD arch; } msi_custom_action_info; -static void release_custom_action_data( msi_custom_action_info *info ) +static void free_custom_action_data( msi_custom_action_info *info ) { EnterCriticalSection( &msi_custom_action_cs ); - if (!--info->refs) - { - list_remove( &info->entry ); - if (info->handle) - CloseHandle( info->handle ); - msi_free( info->action ); - msi_free( info->source ); - msi_free( info->target ); - msiobj_release( &info->package->hdr ); - msi_free( info ); - } + list_remove( &info->entry ); + if (info->handle) + CloseHandle( info->handle ); + msi_free( info->action ); + msi_free( info->source ); + msi_free( info->target ); + msiobj_release( &info->package->hdr ); + msi_free( info ); LeaveCriticalSection( &msi_custom_action_cs ); } -/* must be called inside msi_custom_action_cs if info is in the pending custom actions list */ -static void addref_custom_action_data( msi_custom_action_info *info ) -{ - info->refs++; - } - static UINT wait_thread_handle( msi_custom_action_info *info ) { UINT rc = ERROR_SUCCESS; @@ -429,7 +419,7 @@ static UINT wait_thread_handle( msi_custom_action_info *info ) if (!(info->type & msidbCustomActionTypeContinue)) rc = custom_get_thread_return( info->package, info->handle ); - release_custom_action_data( info ); + free_custom_action_data( info ); } else { @@ -450,7 +440,6 @@ static msi_custom_action_info *find_action_by_guid( const GUID *guid ) { if (IsEqualGUID( &info->guid, guid )) { - addref_custom_action_data( info ); found = TRUE; break; } @@ -725,7 +714,6 @@ static msi_custom_action_info *do_msidbCustomActionTypeDll( return NULL; msiobj_addref( &package->hdr ); - info->refs = 2; /* 1 for our caller and 1 for thread we created */ info->package = package; info->type = type; info->target = strdupW( target ); @@ -767,9 +755,7 @@ static msi_custom_action_info *do_msidbCustomActionTypeDll( info->handle = CreateThread(NULL, 0, custom_client_thread, info, 0, NULL); if (!info->handle) { - /* release both references */ - release_custom_action_data( info ); - release_custom_action_data( info ); + free_custom_action_data( info ); return NULL; } @@ -1056,7 +1042,6 @@ static DWORD ACTION_CallScript( const GUID *guid ) else ERR("failed to create handle for %p\n", info->package ); - release_custom_action_data( info ); return r; } @@ -1085,7 +1070,6 @@ static msi_custom_action_info *do_msidbCustomActionTypeScript( return NULL; msiobj_addref( &package->hdr ); - info->refs = 2; /* 1 for our caller and 1 for thread we created */ info->package = package; info->type = type; info->target = strdupW( function ); @@ -1100,9 +1084,7 @@ static msi_custom_action_info *do_msidbCustomActionTypeScript( info->handle = CreateThread( NULL, 0, ScriptThread, &info->guid, 0, NULL ); if (!info->handle) { - /* release both references */ - release_custom_action_data( info ); - release_custom_action_data( info ); + free_custom_action_data( info ); return NULL; } @@ -1496,7 +1478,8 @@ void ACTION_FinishCustomActions(const MSIPACKAGE* package) EnterCriticalSection( &msi_custom_action_cs ); LIST_FOR_EACH_ENTRY_SAFE( info, cursor, &msi_pending_custom_actions, msi_custom_action_info, entry ) { - if (info->package == package) release_custom_action_data( info ); + if (info->package == package) + free_custom_action_data( info ); } LeaveCriticalSection( &msi_custom_action_cs ); } @@ -1514,6 +1497,5 @@ UINT __cdecl s_remote_GetActionInfo(const GUID *guid, int *type, LPWSTR *dll, LP *dll = strdupW(info->source); *func = strdupWtoA(info->target); - release_custom_action_data(info); return ERROR_SUCCESS; }
1
0
0
0
Zebediah Figura : msi: Protect communication with the custom action server with a critical section.
by Alexandre Julliard
16 Aug '18
16 Aug '18
Module: wine Branch: master Commit: 583edf7f59866cf0a58c978e692f3077e74b4938 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=583edf7f59866cf0a58c978e…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Aug 16 10:34:38 2018 -0500 msi: Protect communication with the custom action server with a critical section. Avoids a potential race whereby an asynchronous custom action receives the wrong thread handle. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msi/custom.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c index a9bb81f..9418b42 100644 --- a/dlls/msi/custom.c +++ b/dlls/msi/custom.c @@ -683,6 +683,8 @@ static DWORD WINAPI custom_client_thread(void *arg) pipe = info->package->custom_server_64_pipe; } + EnterCriticalSection(&msi_custom_action_cs); + if (!WriteFile(pipe, &info->guid, sizeof(info->guid), &size, NULL) || size != sizeof(info->guid)) { @@ -695,6 +697,8 @@ static DWORD WINAPI custom_client_thread(void *arg) return GetLastError(); } + LeaveCriticalSection(&msi_custom_action_cs); + if (DuplicateHandle(process, (HANDLE)(DWORD_PTR)thread64, GetCurrentProcess(), &thread, 0, FALSE, DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE)) {
1
0
0
0
Zebediah Figura : msi: Don' t start the custom action server inside of custom_client_thread().
by Alexandre Julliard
16 Aug '18
16 Aug '18
Module: wine Branch: master Commit: 3a884c2ef7a5828a5b42bf9d2532422afeac0fd8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3a884c2ef7a5828a5b42bf9d…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Aug 16 10:34:37 2018 -0500 msi: Don't start the custom action server inside of custom_client_thread(). Asynchronous custom actions don't wait for custom_client_thread() to terminate, so it's possible for two consecutive actions to both try to start the server at once, causing failures when the second action e.g. receives ERROR_PIPE_BUSY from CreateNamedPipe(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msi/custom.c | 61 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c index b250b1b..a9bb81f 100644 --- a/dlls/msi/custom.c +++ b/dlls/msi/custom.c @@ -388,6 +388,7 @@ typedef struct _msi_custom_action_info { LPWSTR action; INT type; GUID guid; + DWORD arch; } msi_custom_action_info; static void release_custom_action_data( msi_custom_action_info *info ) @@ -662,45 +663,16 @@ void custom_stop_server(HANDLE process, HANDLE pipe) static DWORD WINAPI custom_client_thread(void *arg) { msi_custom_action_info *info = arg; - RPC_STATUS status; DWORD64 thread64; HANDLE process; HANDLE thread; HANDLE pipe; - DWORD arch; DWORD size; - BOOL ret; UINT rc; CoInitializeEx(NULL, COINIT_MULTITHREADED); /* needed to marshal streams */ - if (!info->package->rpc_server_started) - { - status = RpcServerUseProtseqEpW(ncalrpcW, RPC_C_PROTSEQ_MAX_REQS_DEFAULT, - endpoint_lrpcW, NULL); - if (status != RPC_S_OK) - { - ERR("RpcServerUseProtseqEp failed: %#x\n", status); - return status; - } - - status = RpcServerRegisterIfEx(s_IWineMsiRemote_v0_0_s_ifspec, NULL, NULL, - RPC_IF_AUTOLISTEN, RPC_C_LISTEN_MAX_CALLS_DEFAULT, NULL); - if (status != RPC_S_OK) - { - ERR("RpcServerRegisterIfEx failed: %#x\n", status); - return status; - } - - info->package->rpc_server_started = 1; - } - - ret = GetBinaryTypeW(info->source, &arch); - if (!ret) - arch = (sizeof(void *) == 8 ? SCS_64BIT_BINARY : SCS_32BIT_BINARY); - - custom_start_server(info->package, arch); - if (arch == SCS_32BIT_BINARY) + if (info->arch == SCS_32BIT_BINARY) { process = info->package->custom_server_32_process; pipe = info->package->custom_server_32_pipe; @@ -741,6 +713,8 @@ static msi_custom_action_info *do_msidbCustomActionTypeDll( MSIPACKAGE *package, INT type, LPCWSTR source, LPCWSTR target, LPCWSTR action ) { msi_custom_action_info *info; + RPC_STATUS status; + BOOL ret; info = msi_alloc( sizeof *info ); if (!info) @@ -759,6 +733,33 @@ static msi_custom_action_info *do_msidbCustomActionTypeDll( list_add_tail( &msi_pending_custom_actions, &info->entry ); LeaveCriticalSection( &msi_custom_action_cs ); + if (!package->rpc_server_started) + { + status = RpcServerUseProtseqEpW(ncalrpcW, RPC_C_PROTSEQ_MAX_REQS_DEFAULT, + endpoint_lrpcW, NULL); + if (status != RPC_S_OK) + { + ERR("RpcServerUseProtseqEp failed: %#x\n", status); + return NULL; + } + + status = RpcServerRegisterIfEx(s_IWineMsiRemote_v0_0_s_ifspec, NULL, NULL, + RPC_IF_AUTOLISTEN, RPC_C_LISTEN_MAX_CALLS_DEFAULT, NULL); + if (status != RPC_S_OK) + { + ERR("RpcServerRegisterIfEx failed: %#x\n", status); + return NULL; + } + + info->package->rpc_server_started = 1; + } + + ret = GetBinaryTypeW(source, &info->arch); + if (!ret) + info->arch = (sizeof(void *) == 8 ? SCS_64BIT_BINARY : SCS_32BIT_BINARY); + + custom_start_server(package, info->arch); + info->handle = CreateThread(NULL, 0, custom_client_thread, info, 0, NULL); if (!info->handle) {
1
0
0
0
Dmitry Timoshkov : winecfg: Allow to disable MIME-type associations.
by Alexandre Julliard
16 Aug '18
16 Aug '18
Module: wine Branch: master Commit: 186ae9ed31317aa76b2f768b2b555451b2021057 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=186ae9ed31317aa76b2f768b…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Wed Jul 25 15:22:57 2018 +0800 winecfg: Allow to disable MIME-type associations. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- po/ar.po | 14 ++++++++--- po/bg.po | 14 ++++++++--- po/ca.po | 14 ++++++++--- po/cs.po | 14 ++++++++--- po/da.po | 14 ++++++++--- po/de.po | 14 ++++++++--- po/el.po | 14 ++++++++--- po/en.po | 14 ++++++++--- po/en_US.po | 14 ++++++++--- po/eo.po | 14 ++++++++--- po/es.po | 14 ++++++++--- po/fa.po | 14 ++++++++--- po/fi.po | 14 ++++++++--- po/fr.po | 14 ++++++++--- po/he.po | 14 ++++++++--- po/hi.po | 14 ++++++++--- po/hr.po | 14 ++++++++--- po/hu.po | 14 ++++++++--- po/it.po | 14 ++++++++--- po/ja.po | 14 ++++++++--- po/ko.po | 14 ++++++++--- po/lt.po | 14 ++++++++--- po/ml.po | 14 ++++++++--- po/nb_NO.po | 14 ++++++++--- po/nl.po | 14 ++++++++--- po/or.po | 14 ++++++++--- po/pa.po | 14 ++++++++--- po/pl.po | 14 ++++++++--- po/pt_BR.po | 14 ++++++++--- po/pt_PT.po | 14 ++++++++--- po/rm.po | 14 ++++++++--- po/ro.po | 14 ++++++++--- po/ru.po | 14 ++++++++--- po/sk.po | 14 ++++++++--- po/sl.po | 14 ++++++++--- po/sr_RS(a)cyrillic.po | 14 ++++++++--- po/sr_RS(a)latin.po | 14 ++++++++--- po/sv.po | 14 ++++++++--- po/te.po | 14 ++++++++--- po/th.po | 14 ++++++++--- po/tr.po | 14 ++++++++--- po/uk.po | 14 ++++++++--- po/wa.po | 14 ++++++++--- po/wine.pot | 14 ++++++++--- po/zh_CN.po | 14 ++++++++--- po/zh_TW.po | 14 ++++++++--- programs/winecfg/resource.h | 1 + programs/winecfg/theme.c | 30 ++++++++++++++++++++-- programs/winecfg/winecfg.rc | 40 ++++++++++++++++-------------- programs/winemenubuilder/winemenubuilder.c | 24 +++++++++++++++++- 50 files changed, 580 insertions(+), 159 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=186ae9ed31317aa76b2f…
1
0
0
0
Jacek Caban : server: Remove no longer needed client and server pointers.
by Alexandre Julliard
16 Aug '18
16 Aug '18
Module: wine Branch: master Commit: 6098af824ba800f24e88d54b15e41c9d79ab7e96 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6098af824ba800f24e88d54b…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Aug 16 15:12:01 2018 +0200 server: Remove no longer needed client and server pointers. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- server/named_pipe.c | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/server/named_pipe.c b/server/named_pipe.c index 7828c77..76e38a9 100644 --- a/server/named_pipe.c +++ b/server/named_pipe.c @@ -82,14 +82,12 @@ struct pipe_server struct pipe_end pipe_end; /* common header for pipe_client and pipe_server */ struct list entry; /* entry in named pipe servers list */ enum pipe_state state; /* server state */ - struct pipe_client *client; /* client that this server is connected to */ unsigned int options; /* pipe options */ }; struct pipe_client { struct pipe_end pipe_end; /* common header for pipe_client and pipe_server */ - struct pipe_server *server; /* server that this client is connected to */ unsigned int flags; /* file flags */ }; @@ -313,7 +311,7 @@ static void pipe_client_dump( struct object *obj, int verbose ) { struct pipe_client *client = (struct pipe_client *) obj; assert( obj->ops == &pipe_client_ops ); - fprintf( stderr, "Named pipe client server=%p\n", client->server ); + fprintf( stderr, "Named pipe client server=%p\n", client->pipe_end.connection ); } static void named_pipe_destroy( struct object *obj) @@ -429,17 +427,12 @@ static void pipe_server_destroy( struct object *obj) pipe_end_disconnect( &server->pipe_end, STATUS_PIPE_BROKEN ); pipe_end_destroy( &server->pipe_end ); - if (server->client) - { - server->client->server = NULL; - server->client = NULL; - } } static void pipe_client_destroy( struct object *obj) { struct pipe_client *client = (struct pipe_client *)obj; - struct pipe_server *server = client->server; + struct pipe_server *server = (struct pipe_server *)client->pipe_end.connection; assert( obj->ops == &pipe_client_ops ); @@ -460,9 +453,6 @@ static void pipe_client_destroy( struct object *obj) case ps_wait_connect: assert( 0 ); } - assert( server->client ); - server->client = NULL; - client->server = NULL; } pipe_end_destroy( &client->pipe_end ); @@ -1026,19 +1016,17 @@ static int pipe_server_ioctl( struct fd *fd, ioctl_code_t code, struct async *as switch(server->state) { case ps_connected_server: - assert( server->client ); + assert( server->pipe_end.connection ); /* dump the client connection - all data is lost */ release_object( server->pipe_end.connection->pipe ); server->pipe_end.connection->pipe = NULL; pipe_end_disconnect( &server->pipe_end, STATUS_PIPE_DISCONNECTED ); - server->client->server = NULL; - server->client = NULL; set_server_state( server, ps_wait_connect ); break; case ps_wait_disconnect: - assert( !server->client ); + assert( !server->pipe_end.connection ); pipe_end_disconnect( &server->pipe_end, STATUS_PIPE_DISCONNECTED ); set_server_state( server, ps_wait_connect ); break; @@ -1094,7 +1082,6 @@ static struct pipe_server *create_pipe_server( struct named_pipe *pipe, unsigned if (!server) return NULL; - server->client = NULL; server->options = options; init_pipe_end( &server->pipe_end, pipe, pipe_flags, pipe->insize ); server->pipe_end.state = FILE_PIPE_LISTENING_STATE; @@ -1121,7 +1108,6 @@ static struct pipe_client *create_pipe_client( unsigned int flags, struct named_ if (!client) return NULL; - client->server = NULL; client->flags = flags; init_pipe_end( &client->pipe_end, pipe, pipe->flags, buffer_size ); client->pipe_end.state = FILE_PIPE_CONNECTED_STATE; @@ -1203,8 +1189,6 @@ static struct object *named_pipe_open_file( struct object *obj, unsigned int acc fd_async_wake_up( server->pipe_end.fd, ASYNC_TYPE_WAIT, STATUS_SUCCESS ); server->pipe_end.state = FILE_PIPE_CONNECTED_STATE; set_server_state( server, ps_connected_server ); - server->client = client; - client->server = server; server->pipe_end.connection = &client->pipe_end; client->pipe_end.connection = &server->pipe_end; server->pipe_end.client_pid = client->pipe_end.client_pid;
1
0
0
0
Jacek Caban : server: Remove no longer needed pipe reference from pipe server object.
by Alexandre Julliard
16 Aug '18
16 Aug '18
Module: wine Branch: master Commit: 0ae95951333eb4db90fcd2c9fc70dfd5a3e7d4a7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0ae95951333eb4db90fcd2c9…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Aug 16 15:11:48 2018 +0200 server: Remove no longer needed pipe reference from pipe server object. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- server/named_pipe.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/server/named_pipe.c b/server/named_pipe.c index 7883a1d..7828c77 100644 --- a/server/named_pipe.c +++ b/server/named_pipe.c @@ -83,7 +83,6 @@ struct pipe_server struct list entry; /* entry in named pipe servers list */ enum pipe_state state; /* server state */ struct pipe_client *client; /* client that this server is connected to */ - struct named_pipe *pipe; unsigned int options; /* pipe options */ }; @@ -307,7 +306,7 @@ static void pipe_server_dump( struct object *obj, int verbose ) { struct pipe_server *server = (struct pipe_server *) obj; assert( obj->ops == &pipe_server_ops ); - fprintf( stderr, "Named pipe server pipe=%p state=%d\n", server->pipe, server->state ); + fprintf( stderr, "Named pipe server pipe=%p state=%d\n", server->pipe_end.pipe, server->state ); } static void pipe_client_dump( struct object *obj, int verbose ) @@ -435,8 +434,6 @@ static void pipe_server_destroy( struct object *obj) server->client->server = NULL; server->client = NULL; } - - release_object( pipe ); } static void pipe_client_destroy( struct object *obj) @@ -1010,7 +1007,7 @@ static int pipe_server_ioctl( struct fd *fd, ioctl_code_t code, struct async *as fd_queue_async( server->pipe_end.fd, async, ASYNC_TYPE_WAIT ); server->pipe_end.state = FILE_PIPE_LISTENING_STATE; set_server_state( server, ps_wait_open ); - async_wake_up( &server->pipe->waiters, STATUS_SUCCESS ); + async_wake_up( &server->pipe_end.pipe->waiters, STATUS_SUCCESS ); set_error( STATUS_PENDING ); return 1; case ps_connected_server: @@ -1097,7 +1094,6 @@ static struct pipe_server *create_pipe_server( struct named_pipe *pipe, unsigned if (!server) return NULL; - server->pipe = pipe; server->client = NULL; server->options = options; init_pipe_end( &server->pipe_end, pipe, pipe_flags, pipe->insize ); @@ -1105,7 +1101,6 @@ static struct pipe_server *create_pipe_server( struct named_pipe *pipe, unsigned server->pipe_end.server_pid = get_process_id( current->process ); list_add_head( &pipe->servers, &server->entry ); - grab_object( pipe ); if (!(server->pipe_end.fd = alloc_pseudo_fd( &pipe_server_fd_ops, &server->pipe_end.obj, options ))) { release_object( server ); @@ -1193,7 +1188,7 @@ static struct object *named_pipe_open_file( struct object *obj, unsigned int acc return NULL; } - pipe_sharing = server->pipe->sharing; + pipe_sharing = pipe->sharing; if (((access & GENERIC_READ) && !(pipe_sharing & FILE_SHARE_READ)) || ((access & GENERIC_WRITE) && !(pipe_sharing & FILE_SHARE_WRITE))) { @@ -1337,7 +1332,7 @@ DECL_HANDLER(create_named_pipe) if (server) { reply->handle = alloc_handle( current->process, server, req->access, objattr->attributes ); - server->pipe->instances++; + pipe->instances++; release_object( server ); }
1
0
0
0
Jacek Caban : server: Use pipe stored in pipe_end in set_named_pipe_info.
by Alexandre Julliard
16 Aug '18
16 Aug '18
Module: wine Branch: master Commit: 6498ea18d36e806ed80542df3d0501470080d7c3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6498ea18d36e806ed80542df…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Aug 16 15:11:32 2018 +0200 server: Use pipe stored in pipe_end in set_named_pipe_info. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- server/named_pipe.c | 40 ++++++++++------------------------------ 1 file changed, 10 insertions(+), 30 deletions(-) diff --git a/server/named_pipe.c b/server/named_pipe.c index e6e497b..7883a1d 100644 --- a/server/named_pipe.c +++ b/server/named_pipe.c @@ -1075,14 +1075,6 @@ static int pipe_client_ioctl( struct fd *fd, ioctl_code_t code, struct async *as } } -static struct pipe_server *get_pipe_server_obj( struct process *process, - obj_handle_t handle, unsigned int access ) -{ - struct object *obj; - obj = get_handle_obj( process, handle, access, &pipe_server_ops ); - return (struct pipe_server *) obj; -} - static void init_pipe_end( struct pipe_end *pipe_end, struct named_pipe *pipe, unsigned int pipe_flags, data_size_t buffer_size ) { @@ -1387,42 +1379,30 @@ DECL_HANDLER(get_named_pipe_info) DECL_HANDLER(set_named_pipe_info) { - struct pipe_server *server; - struct pipe_client *client = NULL; + struct pipe_end *pipe_end; - server = get_pipe_server_obj( current->process, req->handle, FILE_WRITE_ATTRIBUTES ); - if (!server) + pipe_end = (struct pipe_end *)get_handle_obj( current->process, req->handle, + FILE_WRITE_ATTRIBUTES, &pipe_server_ops ); + if (!pipe_end) { if (get_error() != STATUS_OBJECT_TYPE_MISMATCH) return; clear_error(); - client = (struct pipe_client *)get_handle_obj( current->process, req->handle, - 0, &pipe_client_ops ); - if (!client) return; - if (!(server = client->server)) - { - release_object( client ); - return; - } + pipe_end = (struct pipe_end *)get_handle_obj( current->process, req->handle, + 0, &pipe_client_ops ); + if (!pipe_end) return; } if ((req->flags & ~(NAMED_PIPE_MESSAGE_STREAM_READ | NAMED_PIPE_NONBLOCKING_MODE)) || - ((req->flags & NAMED_PIPE_MESSAGE_STREAM_READ) && !(server->pipe->flags & NAMED_PIPE_MESSAGE_STREAM_WRITE))) + ((req->flags & NAMED_PIPE_MESSAGE_STREAM_READ) && !(pipe_end->pipe->flags & NAMED_PIPE_MESSAGE_STREAM_WRITE))) { set_error( STATUS_INVALID_PARAMETER ); } - else if (client) - { - client->pipe_end.flags = server->pipe->flags | req->flags; - } else { - server->pipe_end.flags = server->pipe->flags | req->flags; + pipe_end->flags = pipe_end->pipe->flags | req->flags; } - if (client) - release_object(client); - else - release_object(server); + release_object( pipe_end ); }
1
0
0
0
Jacek Caban : server: Use pipe stored in pipe_end in get_named_pipe_info.
by Alexandre Julliard
16 Aug '18
16 Aug '18
Module: wine Branch: master Commit: 3375ccba2f76a29908c144dcca73787d4d9c569b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3375ccba2f76a29908c144dc…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Aug 16 15:11:22 2018 +0200 server: Use pipe stored in pipe_end in get_named_pipe_info. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/pipe.c | 11 ----------- server/named_pipe.c | 40 ++++++++++++++++++---------------------- 2 files changed, 18 insertions(+), 33 deletions(-) diff --git a/dlls/ntdll/tests/pipe.c b/dlls/ntdll/tests/pipe.c index 80037cb..94db1a2 100644 --- a/dlls/ntdll/tests/pipe.c +++ b/dlls/ntdll/tests/pipe.c @@ -1355,7 +1355,6 @@ static void test_pipe_with_data_state(HANDLE pipe, BOOL is_server, DWORD state) memset(&io, 0xcc, sizeof(io)); status = pNtQueryInformationFile(pipe, &io, &local_info, sizeof(local_info), FilePipeLocalInformation); if (!is_server && state == FILE_PIPE_DISCONNECTED_STATE) - todo_wine ok(status == STATUS_PIPE_DISCONNECTED, "NtQueryInformationFile(FilePipeLocalInformation) failed in %s state %u: %x\n", is_server ? "server" : "client", state, status); @@ -1370,7 +1369,6 @@ static void test_pipe_with_data_state(HANDLE pipe, BOOL is_server, DWORD state) status = pNtQueryInformationFile(pipe, &io, &pipe_info, sizeof(pipe_info), FilePipeInformation); if (!is_server && state == FILE_PIPE_DISCONNECTED_STATE) - todo_wine ok(status == STATUS_PIPE_DISCONNECTED, "NtQueryInformationFile(FilePipeInformation) failed in %s state %u: %x\n", is_server ? "server" : "client", state, status); @@ -1555,7 +1553,6 @@ static void test_pipe_local_info(HANDLE pipe, BOOL is_server, DWORD state) memset(&local_info, 0xcc, sizeof(local_info)); status = pNtQueryInformationFile(pipe, &iosb, &local_info, sizeof(local_info), FilePipeLocalInformation); if (!is_server && state == FILE_PIPE_DISCONNECTED_STATE) - todo_wine ok(status == STATUS_PIPE_DISCONNECTED, "NtQueryInformationFile(FilePipeLocalInformation) failed in %s state %u: %x\n", is_server ? "server" : "client", state, status); @@ -1566,23 +1563,18 @@ static void test_pipe_local_info(HANDLE pipe, BOOL is_server, DWORD state) if (!status) { ok(local_info.NamedPipeType == 1, "NamedPipeType = %u\n", local_info.NamedPipeType); - todo_wine_if(!is_server && (state == FILE_PIPE_CLOSING_STATE || state == FILE_PIPE_DISCONNECTED_STATE)) ok(local_info.NamedPipeConfiguration == 1, "NamedPipeConfiguration = %u\n", local_info.NamedPipeConfiguration); - todo_wine_if(!is_server && (state == FILE_PIPE_CLOSING_STATE || state == FILE_PIPE_DISCONNECTED_STATE)) ok(local_info.MaximumInstances == 1, "MaximumInstances = %u\n", local_info.MaximumInstances); if (!is_server && state == FILE_PIPE_CLOSING_STATE) ok(local_info.CurrentInstances == 0 || broken(local_info.CurrentInstances == 1 /* winxp */), "CurrentInstances = %u\n", local_info.CurrentInstances); else - todo_wine_if(!is_server && state == FILE_PIPE_DISCONNECTED_STATE) ok(local_info.CurrentInstances == 1, "CurrentInstances = %u\n", local_info.CurrentInstances); - todo_wine_if(!is_server && (state == FILE_PIPE_CLOSING_STATE || state == FILE_PIPE_DISCONNECTED_STATE)) ok(local_info.InboundQuota == 100, "InboundQuota = %u\n", local_info.InboundQuota); ok(local_info.ReadDataAvailable == 0, "ReadDataAvailable = %u\n", local_info.ReadDataAvailable); - todo_wine_if(!is_server && (state == FILE_PIPE_CLOSING_STATE || state == FILE_PIPE_DISCONNECTED_STATE)) ok(local_info.OutboundQuota == 200, "OutboundQuota = %u\n", local_info.OutboundQuota); todo_wine ok(local_info.WriteQuotaAvailable == (is_server ? 200 : 100), "WriteQuotaAvailable = %u\n", @@ -1608,7 +1600,6 @@ static void test_pipe_local_info(HANDLE pipe, BOOL is_server, DWORD state) &attr, &iosb, FILE_SHARE_WRITE, FILE_CREATE, 0, 0, 0, 0, 1, 100, 200, &timeout); if (!local_info.CurrentInstances) - todo_wine_if(status) /* FIXME */ ok(status == STATUS_SUCCESS, "NtCreateNamedPipeFile failed: %x\n", status); else ok(status == STATUS_INSTANCE_NOT_AVAILABLE, "NtCreateNamedPipeFile failed: %x\n", status); @@ -1625,7 +1616,6 @@ static void test_pipe_local_info(HANDLE pipe, BOOL is_server, DWORD state) ok(local_info.CurrentInstances == 0 || broken(local_info.CurrentInstances == 1 /* winxp */), "CurrentInstances = %u\n", local_info.CurrentInstances); else - todo_wine_if(!is_server && state == FILE_PIPE_DISCONNECTED_STATE) ok(local_info.CurrentInstances == 1, "CurrentInstances = %u\n", local_info.CurrentInstances); } @@ -1633,7 +1623,6 @@ static void test_pipe_local_info(HANDLE pipe, BOOL is_server, DWORD state) memset(&iosb, 0xcc, sizeof(iosb)); status = pNtQueryInformationFile(pipe, &iosb, &pipe_info, sizeof(pipe_info), FilePipeInformation); if (!is_server && state == FILE_PIPE_DISCONNECTED_STATE) - todo_wine ok(status == STATUS_PIPE_DISCONNECTED, "NtQueryInformationFile(FilePipeLocalInformation) failed in %s state %u: %x\n", is_server ? "server" : "client", state, status); diff --git a/server/named_pipe.c b/server/named_pipe.c index 95c2442..e6e497b 100644 --- a/server/named_pipe.c +++ b/server/named_pipe.c @@ -1354,39 +1354,35 @@ DECL_HANDLER(create_named_pipe) DECL_HANDLER(get_named_pipe_info) { - struct pipe_server *server; - struct pipe_client *client = NULL; + struct pipe_end *pipe_end; - server = get_pipe_server_obj( current->process, req->handle, FILE_READ_ATTRIBUTES ); - if (!server) + pipe_end = (struct pipe_end *)get_handle_obj( current->process, req->handle, + FILE_READ_ATTRIBUTES, &pipe_server_ops ); + if (!pipe_end) { if (get_error() != STATUS_OBJECT_TYPE_MISMATCH) return; clear_error(); - client = (struct pipe_client *)get_handle_obj( current->process, req->handle, - 0, &pipe_client_ops ); - if (!client) return; - server = client->server; + pipe_end = (struct pipe_end *)get_handle_obj( current->process, req->handle, + 0, &pipe_client_ops ); + if (!pipe_end) return; } - reply->flags = client ? client->pipe_end.flags : server->pipe_end.flags; - if (server) + if (pipe_end->pipe) { - reply->sharing = server->pipe->sharing; - reply->maxinstances = server->pipe->maxinstances; - reply->instances = server->pipe->instances; - reply->insize = server->pipe->insize; - reply->outsize = server->pipe->outsize; + reply->flags = pipe_end->flags; + reply->sharing = pipe_end->pipe->sharing; + reply->maxinstances = pipe_end->pipe->maxinstances; + reply->instances = pipe_end->pipe->instances; + reply->insize = pipe_end->pipe->insize; + reply->outsize = pipe_end->pipe->outsize; + + if (pipe_end->obj.ops == &pipe_server_ops) reply->flags |= NAMED_PIPE_SERVER_END; } + else set_error( STATUS_PIPE_DISCONNECTED ); - if (client) - release_object(client); - else - { - reply->flags |= NAMED_PIPE_SERVER_END; - release_object(server); - } + release_object( pipe_end ); } DECL_HANDLER(set_named_pipe_info)
1
0
0
0
Jacek Caban : server: Use common implementation for client and server get_file_info.
by Alexandre Julliard
16 Aug '18
16 Aug '18
Module: wine Branch: master Commit: 6f6f6e59243ab7e0a7e5f170b8f53d5b0ae4c96f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6f6f6e59243ab7e0a7e5f170…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Aug 16 15:11:08 2018 +0200 server: Use common implementation for client and server get_file_info. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- server/named_pipe.c | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/server/named_pipe.c b/server/named_pipe.c index 9ad1630..95c2442 100644 --- a/server/named_pipe.c +++ b/server/named_pipe.c @@ -155,12 +155,12 @@ static int pipe_end_write( struct fd *fd, struct async *async_data, file_pos_t p static int pipe_end_flush( struct fd *fd, struct async *async ); static void pipe_end_get_volume_info( struct fd *fd, unsigned int info_class ); static void pipe_end_reselect_async( struct fd *fd, struct async_queue *queue ); +static void pipe_end_get_file_info( struct fd *fd, unsigned int info_class ); /* server end functions */ static void pipe_server_dump( struct object *obj, int verbose ); static void pipe_server_destroy( struct object *obj); static int pipe_server_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ); -static void pipe_server_get_file_info( struct fd *fd, unsigned int info_class ); static const struct object_ops pipe_server_ops = { @@ -192,7 +192,7 @@ static const struct fd_ops pipe_server_fd_ops = pipe_end_read, /* read */ pipe_end_write, /* write */ pipe_end_flush, /* flush */ - pipe_server_get_file_info, /* get_file_info */ + pipe_end_get_file_info, /* get_file_info */ pipe_end_get_volume_info, /* get_volume_info */ pipe_server_ioctl, /* ioctl */ no_fd_queue_async, /* queue_async */ @@ -203,7 +203,6 @@ static const struct fd_ops pipe_server_fd_ops = static void pipe_client_dump( struct object *obj, int verbose ); static void pipe_client_destroy( struct object *obj ); static int pipe_client_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ); -static void pipe_client_get_file_info( struct fd *fd, unsigned int info_class ); static const struct object_ops pipe_client_ops = { @@ -235,7 +234,7 @@ static const struct fd_ops pipe_client_fd_ops = pipe_end_read, /* read */ pipe_end_write, /* write */ pipe_end_flush, /* flush */ - pipe_client_get_file_info, /* get_file_info */ + pipe_end_get_file_info, /* get_file_info */ pipe_end_get_volume_info, /* get_volume_info */ pipe_client_ioctl, /* ioctl */ no_fd_queue_async, /* queue_async */ @@ -556,8 +555,17 @@ static int pipe_end_flush( struct fd *fd, struct async *async ) return 1; } -static void pipe_end_get_file_info( struct fd *fd, struct named_pipe *pipe, unsigned int info_class ) +static void pipe_end_get_file_info( struct fd *fd, unsigned int info_class ) { + struct pipe_end *pipe_end = get_fd_user( fd ); + struct named_pipe *pipe = pipe_end->pipe; + + if (!pipe) + { + set_error( STATUS_PIPE_DISCONNECTED ); + return; + } + switch (info_class) { case FileNameInformation: @@ -615,19 +623,6 @@ static int pipe_end_set_sd( struct object *obj, const struct security_descriptor return 0; } -static void pipe_server_get_file_info( struct fd *fd, unsigned int info_class ) -{ - struct pipe_server *server = get_fd_user( fd ); - pipe_end_get_file_info( fd, server->pipe, info_class ); -} - -static void pipe_client_get_file_info( struct fd *fd, unsigned int info_class ) -{ - struct pipe_client *client = get_fd_user( fd ); - if (client->server) pipe_end_get_file_info( fd, client->server->pipe, info_class ); - else set_error( STATUS_PIPE_DISCONNECTED ); -} - static void pipe_end_get_volume_info( struct fd *fd, unsigned int info_class ) { switch (info_class)
1
0
0
0
Jacek Caban : server: Use common implementation for pipe client and server get_sd and set_sd.
by Alexandre Julliard
16 Aug '18
16 Aug '18
Module: wine Branch: master Commit: c0905e08da9c20219424732bfe1ae2c1daf1a70d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c0905e08da9c20219424732b…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Aug 16 15:10:55 2018 +0200 server: Use common implementation for pipe client and server get_sd and set_sd. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/pipe.c | 2 +- server/named_pipe.c | 44 ++++++++++++++------------------------------ 2 files changed, 15 insertions(+), 31 deletions(-) diff --git a/dlls/ntdll/tests/pipe.c b/dlls/ntdll/tests/pipe.c index e28628b..80037cb 100644 --- a/dlls/ntdll/tests/pipe.c +++ b/dlls/ntdll/tests/pipe.c @@ -1831,7 +1831,7 @@ static void test_security_info(void) CloseHandle(server); /* SD is preserved after closing server object */ - test_group(client, local_sid, TRUE); + test_group(client, local_sid, FALSE); CloseHandle(client); server = server2; diff --git a/server/named_pipe.c b/server/named_pipe.c index ab71f36..9ad1630 100644 --- a/server/named_pipe.c +++ b/server/named_pipe.c @@ -147,6 +147,9 @@ static const struct object_ops named_pipe_ops = /* common server and client pipe end functions */ static enum server_fd_type pipe_end_get_fd_type( struct fd *fd ); static struct fd *pipe_end_get_fd( struct object *obj ); +static struct security_descriptor *pipe_end_get_sd( struct object *obj ); +static int pipe_end_set_sd( struct object *obj, const struct security_descriptor *sd, + unsigned int set_info ); static int pipe_end_read( struct fd *fd, struct async *async, file_pos_t pos ); static int pipe_end_write( struct fd *fd, struct async *async_data, file_pos_t pos ); static int pipe_end_flush( struct fd *fd, struct async *async ); @@ -155,9 +158,6 @@ static void pipe_end_reselect_async( struct fd *fd, struct async_queue *queue ); /* server end functions */ static void pipe_server_dump( struct object *obj, int verbose ); -static struct security_descriptor *pipe_server_get_sd( struct object *obj ); -static int pipe_server_set_sd( struct object *obj, const struct security_descriptor *sd, - unsigned int set_info ); static void pipe_server_destroy( struct object *obj); static int pipe_server_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ); static void pipe_server_get_file_info( struct fd *fd, unsigned int info_class ); @@ -174,8 +174,8 @@ static const struct object_ops pipe_server_ops = no_signal, /* signal */ pipe_end_get_fd, /* get_fd */ default_fd_map_access, /* map_access */ - pipe_server_get_sd, /* get_sd */ - pipe_server_set_sd, /* set_sd */ + pipe_end_get_sd, /* get_sd */ + pipe_end_set_sd, /* set_sd */ no_lookup_name, /* lookup_name */ no_link_name, /* link_name */ NULL, /* unlink_name */ @@ -201,9 +201,6 @@ static const struct fd_ops pipe_server_fd_ops = /* client end functions */ static void pipe_client_dump( struct object *obj, int verbose ); -static struct security_descriptor *pipe_client_get_sd( struct object *obj ); -static int pipe_client_set_sd( struct object *obj, const struct security_descriptor *sd, - unsigned int set_info ); static void pipe_client_destroy( struct object *obj ); static int pipe_client_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ); static void pipe_client_get_file_info( struct fd *fd, unsigned int info_class ); @@ -220,8 +217,8 @@ static const struct object_ops pipe_client_ops = no_signal, /* signal */ pipe_end_get_fd, /* get_fd */ default_fd_map_access, /* map_access */ - pipe_client_get_sd, /* get_sd */ - pipe_client_set_sd, /* set_sd */ + pipe_end_get_sd, /* get_sd */ + pipe_end_set_sd, /* set_sd */ no_lookup_name, /* lookup_name */ no_link_name, /* link_name */ NULL, /* unlink_name */ @@ -601,32 +598,19 @@ static void pipe_end_get_file_info( struct fd *fd, struct named_pipe *pipe, unsi } } -static struct security_descriptor *pipe_server_get_sd( struct object *obj ) +static struct security_descriptor *pipe_end_get_sd( struct object *obj ) { - struct pipe_server *server = (struct pipe_server *) obj; - return default_get_sd( &server->pipe->obj ); -} - -static struct security_descriptor *pipe_client_get_sd( struct object *obj ) -{ - struct pipe_client *client = (struct pipe_client *) obj; - if (client->server) return default_get_sd( &client->server->pipe->obj ); + struct pipe_end *pipe_end = (struct pipe_end *) obj; + if (pipe_end->pipe) return default_get_sd( &pipe_end->pipe->obj ); set_error( STATUS_PIPE_DISCONNECTED ); return NULL; } -static int pipe_server_set_sd( struct object *obj, const struct security_descriptor *sd, - unsigned int set_info ) +static int pipe_end_set_sd( struct object *obj, const struct security_descriptor *sd, + unsigned int set_info ) { - struct pipe_server *server = (struct pipe_server *) obj; - return default_set_sd( &server->pipe->obj, sd, set_info ); -} - -static int pipe_client_set_sd( struct object *obj, const struct security_descriptor *sd, - unsigned int set_info ) -{ - struct pipe_client *client = (struct pipe_client *) obj; - if (client->server) return default_set_sd( &client->server->pipe->obj, sd, set_info ); + struct pipe_end *pipe_end = (struct pipe_end *) obj; + if (pipe_end->pipe) return default_set_sd( &pipe_end->pipe->obj, sd, set_info ); set_error( STATUS_PIPE_DISCONNECTED ); return 0; }
1
0
0
0
← Newer
1
...
45
46
47
48
49
50
51
...
62
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
Results per page:
10
25
50
100
200