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
November 2020
----- 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
1 participants
851 discussions
Start a n
N
ew thread
Paul Gofman : ntdll/tests: Test noname named pipe uniqueness.
by Alexandre Julliard
26 Nov '20
26 Nov '20
Module: wine Branch: master Commit: 44e135a7bdb6fa9f881061529a5c825f68adabe2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=44e135a7bdb6fa9f88106152…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Wed Nov 25 21:42:46 2020 +0300 ntdll/tests: Test noname named pipe uniqueness. Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/pipe.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/tests/pipe.c b/dlls/ntdll/tests/pipe.c index 42bd825dc3c..662dc1d55cb 100644 --- a/dlls/ntdll/tests/pipe.c +++ b/dlls/ntdll/tests/pipe.c @@ -2408,7 +2408,7 @@ static void test_security_info(void) static void test_empty_name(void) { - HANDLE hdirectory, hpipe, hwrite, handle; + HANDLE hdirectory, hpipe, hpipe2, hwrite, hwrite2, handle; OBJECT_TYPE_INFORMATION *type_info; OBJECT_NAME_INFORMATION *name_info; OBJECT_ATTRIBUTES attr; @@ -2486,6 +2486,11 @@ static void test_empty_name(void) 0, 0, 0, 1, 4096, 4096, &timeout); todo_wine ok(status == STATUS_OBJECT_NAME_NOT_FOUND, "Got unexpected status %#x.\n", status); + status = pNtCreateNamedPipeFile(&hpipe2, GENERIC_READ | SYNCHRONIZE, &attr, + &io, FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_CREATE, FILE_SYNCHRONOUS_IO_NONALERT, + 0, 0, 0, 3, 4096, 4096, &timeout); + ok(!status, "Got unexpected status %#x.\n", status); + attr.RootDirectory = hpipe; pRtlInitUnicodeString(&name, L"a"); status = NtCreateFile(&hwrite, GENERIC_WRITE | FILE_WRITE_ATTRIBUTES | SYNCHRONIZE, &attr, &io, NULL, 0, @@ -2519,20 +2524,38 @@ static void test_empty_name(void) FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN, FILE_SYNCHRONOUS_IO_NONALERT, NULL, 0 ); ok(status == STATUS_PIPE_NOT_AVAILABLE, "Got unexpected status %#x.\n", status); + attr.RootDirectory = hpipe2; + status = NtCreateFile(&hwrite2, GENERIC_WRITE | FILE_WRITE_ATTRIBUTES | SYNCHRONIZE, &attr, &io, NULL, 0, + FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN, FILE_SYNCHRONOUS_IO_NONALERT, NULL, 0 ); + ok(!status, "Got unexpected status %#x.\n", status); + data = 0xdeadbeef; ret = WriteFile(hwrite, &data, sizeof(data), &length, NULL); ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); ok(length == sizeof(data), "Got unexpected length %#x.\n", length); + data = 0xfeedcafe; + ret = WriteFile(hwrite2, &data, sizeof(data), &length, NULL); + ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(length == sizeof(data), "Got unexpected length %#x.\n", length); + data = 0; ret = ReadFile(hpipe, &data, sizeof(data), &length, NULL); ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); ok(length == sizeof(data), "Got unexpected length %#x.\n", length); ok(data == 0xdeadbeef, "Got unexpected data %#x.\n", data); + data = 0; + ret = ReadFile(hpipe2, &data, sizeof(data), &length, NULL); + ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(length == sizeof(data), "Got unexpected length %#x.\n", length); + ok(data == 0xfeedcafe, "Got unexpected data %#x.\n", data); + CloseHandle(hwrite); CloseHandle(hpipe); CloseHandle(hdirectory); + CloseHandle(hpipe2); + CloseHandle(hwrite2); } START_TEST(pipe)
1
0
0
0
Paul Gofman : server: Allow client pipe creation with server pipe as root directory.
by Alexandre Julliard
26 Nov '20
26 Nov '20
Module: wine Branch: master Commit: 1f3064c5d5ac851c6fdfb85bc8ff5ea046f32acc URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1f3064c5d5ac851c6fdfb85b…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Wed Nov 25 21:42:45 2020 +0300 server: Allow client pipe creation with server pipe as root directory. Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/file.c | 13 +++++-------- dlls/ntdll/tests/pipe.c | 31 ++++++++++++++++++++----------- server/named_pipe.c | 25 +++++++++++++++++++++++-- 3 files changed, 48 insertions(+), 21 deletions(-) diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c index 9327d0319dd..2814ab194b2 100644 --- a/dlls/kernel32/tests/file.c +++ b/dlls/kernel32/tests/file.c @@ -4565,17 +4565,14 @@ static void test_ReOpenFile(void) ok(file != INVALID_HANDLE_VALUE, "failed to create pipe, error %u\n", GetLastError()); new = pReOpenFile(file, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, 0); - todo_wine ok(new != INVALID_HANDLE_VALUE, "got error %u\n", GetLastError()); + ok(new != INVALID_HANDLE_VALUE, "got error %u\n", GetLastError()); ret = WriteFile(file, "foo", 4, &size, NULL); - todo_wine ok(ret, "failed to write file, error %u\n", GetLastError()); + ok(ret, "failed to write file, error %u\n", GetLastError()); ret = ReadFile(new, buffer, sizeof(buffer), &size, NULL); - todo_wine ok(ret, "failed to read file, error %u\n", GetLastError()); - if (ret) - { - ok(size == 4, "got size %u\n", size); - ok(!strcmp(buffer, "foo"), "got wrong data\n"); - } + ok(ret, "failed to read file, error %u\n", GetLastError()); + ok(size == 4, "got size %u\n", size); + ok(!strcmp(buffer, "foo"), "got wrong data\n"); CloseHandle(new); CloseHandle(file); diff --git a/dlls/ntdll/tests/pipe.c b/dlls/ntdll/tests/pipe.c index 1230fecfda7..42bd825dc3c 100644 --- a/dlls/ntdll/tests/pipe.c +++ b/dlls/ntdll/tests/pipe.c @@ -2487,39 +2487,48 @@ static void test_empty_name(void) todo_wine ok(status == STATUS_OBJECT_NAME_NOT_FOUND, "Got unexpected status %#x.\n", status); attr.RootDirectory = hpipe; + pRtlInitUnicodeString(&name, L"a"); status = NtCreateFile(&hwrite, GENERIC_WRITE | FILE_WRITE_ATTRIBUTES | SYNCHRONIZE, &attr, &io, NULL, 0, FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN, FILE_SYNCHRONOUS_IO_NONALERT, NULL, 0 ); - todo_wine ok(!status, "Got unexpected status %#x.\n", status); + ok(status == STATUS_OBJECT_NAME_INVALID, "Got unexpected status %#x.\n", status); + + name.Buffer = NULL; + name.Length = 0; + name.MaximumLength = 0; + attr.RootDirectory = hpipe; + status = NtCreateFile(&hwrite, GENERIC_WRITE | FILE_WRITE_ATTRIBUTES | SYNCHRONIZE, &attr, &io, NULL, 0, + FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN, FILE_SYNCHRONOUS_IO_NONALERT, NULL, 0 ); + ok(!status, "Got unexpected status %#x.\n", status); type_info->TypeName.Buffer = NULL; status = pNtQueryObject(hwrite, ObjectTypeInformation, type_info, sizeof(buffer), NULL); - todo_wine ok(!status, "Got unexpected status %#x.\n", status); - todo_wine ok(type_info->TypeName.Buffer && !wcscmp(type_info->TypeName.Buffer, L"File"), + ok(!status, "Got unexpected status %#x.\n", status); + ok(type_info->TypeName.Buffer && !wcscmp(type_info->TypeName.Buffer, L"File"), "Got unexpected type %s.\n", debugstr_w(type_info->TypeName.Buffer)); status = pNtQueryObject(hwrite, ObjectNameInformation, name_info, sizeof(buffer), NULL); - todo_wine ok(status == STATUS_OBJECT_PATH_INVALID, "Got unexpected status %#x.\n", status); + ok(status == STATUS_OBJECT_PATH_INVALID, "Got unexpected status %#x.\n", status); attr.RootDirectory = hpipe; status = NtCreateFile(&handle, GENERIC_READ | SYNCHRONIZE, &attr, &io, NULL, 0, FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN, FILE_NON_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT, NULL, 0 ); - todo_wine ok(status == STATUS_PIPE_NOT_AVAILABLE, "Got unexpected status %#x.\n", status); + ok(status == STATUS_PIPE_NOT_AVAILABLE, "Got unexpected status %#x.\n", status); attr.RootDirectory = hpipe; status = NtCreateFile(&handle, GENERIC_WRITE | SYNCHRONIZE, &attr, &io, NULL, 0, FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN, FILE_SYNCHRONOUS_IO_NONALERT, NULL, 0 ); - todo_wine ok(status == STATUS_PIPE_NOT_AVAILABLE, "Got unexpected status %#x.\n", status); + ok(status == STATUS_PIPE_NOT_AVAILABLE, "Got unexpected status %#x.\n", status); data = 0xdeadbeef; ret = WriteFile(hwrite, &data, sizeof(data), &length, NULL); - todo_wine ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); - todo_wine ok(length == sizeof(data), "Got unexpected length %#x.\n", length); + ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(length == sizeof(data), "Got unexpected length %#x.\n", length); data = 0; ret = ReadFile(hpipe, &data, sizeof(data), &length, NULL); - todo_wine ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); - todo_wine ok(length == sizeof(data), "Got unexpected length %#x.\n", length); - todo_wine ok(data == 0xdeadbeef, "Got unexpected data %#x.\n", data); + ok(ret, "Got unexpected ret %#x, GetLastError() %u.\n", ret, GetLastError()); + ok(length == sizeof(data), "Got unexpected length %#x.\n", length); + ok(data == 0xdeadbeef, "Got unexpected data %#x.\n", data); CloseHandle(hwrite); CloseHandle(hpipe); diff --git a/server/named_pipe.c b/server/named_pipe.c index 5adfd444ada..ff1fdbe3f07 100644 --- a/server/named_pipe.c +++ b/server/named_pipe.c @@ -152,6 +152,10 @@ static void pipe_end_get_file_info( struct fd *fd, obj_handle_t handle, unsigned /* server end functions */ static void pipe_server_dump( struct object *obj, int verbose ); +static struct object *pipe_server_lookup_name( struct object *obj, struct unicode_str *name, + unsigned int attr, struct object *root ); +static struct object *pipe_server_open_file( struct object *obj, unsigned int access, + unsigned int sharing, unsigned int options ); static void pipe_server_destroy( struct object *obj); static int pipe_server_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ); @@ -170,10 +174,10 @@ static const struct object_ops pipe_server_ops = pipe_end_get_sd, /* get_sd */ pipe_end_set_sd, /* set_sd */ pipe_end_get_full_name, /* get_full_name */ - no_lookup_name, /* lookup_name */ + pipe_server_lookup_name, /* lookup_name */ no_link_name, /* link_name */ NULL, /* unlink_name */ - no_open_file, /* open_file */ + pipe_server_open_file, /* open_file */ no_kernel_obj_list, /* get_kernel_obj_list */ fd_close_handle, /* close_handle */ pipe_server_destroy /* destroy */ @@ -449,6 +453,23 @@ static void pipe_end_destroy( struct object *obj ) if (pipe_end->pipe) release_object( pipe_end->pipe ); } +static struct object *pipe_server_lookup_name( struct object *obj, struct unicode_str *name, + unsigned int attr, struct object *root ) +{ + if (name && name->len) + set_error( STATUS_OBJECT_NAME_INVALID ); + + return NULL; +} + +static struct object *pipe_server_open_file( struct object *obj, unsigned int access, + unsigned int sharing, unsigned int options ) +{ + struct pipe_server *server = (struct pipe_server *)obj; + + return server->pipe_end.pipe->obj.ops->open_file( &server->pipe_end.pipe->obj, access, sharing, options ); +} + static void pipe_server_destroy( struct object *obj ) { struct pipe_server *server = (struct pipe_server *)obj;
1
0
0
0
Paul Gofman : server: Return STATUS_OBJECT_PATH_INVALID for noname pipe name query.
by Alexandre Julliard
26 Nov '20
26 Nov '20
Module: wine Branch: master Commit: aa5c1e871b9a3f0521c1249e45d31d38c705ea60 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=aa5c1e871b9a3f0521c1249e…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Wed Nov 25 21:42:44 2020 +0300 server: Return STATUS_OBJECT_PATH_INVALID for noname pipe name query. Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/pipe.c | 2 +- server/named_pipe.c | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/tests/pipe.c b/dlls/ntdll/tests/pipe.c index bfc8dc0b3be..1230fecfda7 100644 --- a/dlls/ntdll/tests/pipe.c +++ b/dlls/ntdll/tests/pipe.c @@ -2479,7 +2479,7 @@ static void test_empty_name(void) ok(type_info->TypeName.Buffer && !wcscmp(type_info->TypeName.Buffer, L"File"), "Got unexpected type %s.\n", debugstr_w(type_info->TypeName.Buffer)); status = pNtQueryObject(hpipe, ObjectNameInformation, name_info, sizeof(buffer), NULL); - todo_wine ok(status == STATUS_OBJECT_PATH_INVALID, "Got unexpected status %#x.\n", status); + ok(status == STATUS_OBJECT_PATH_INVALID, "Got unexpected status %#x.\n", status); status = pNtCreateNamedPipeFile(&handle, GENERIC_READ | SYNCHRONIZE, &attr, &io, FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_OPEN, FILE_SYNCHRONOUS_IO_NONALERT, diff --git a/server/named_pipe.c b/server/named_pipe.c index 6e65f3e364a..5adfd444ada 100644 --- a/server/named_pipe.c +++ b/server/named_pipe.c @@ -105,6 +105,7 @@ struct named_pipe_device_file static void named_pipe_dump( struct object *obj, int verbose ); static unsigned int named_pipe_map_access( struct object *obj, unsigned int access ); +static WCHAR *named_pipe_get_full_name( struct object *obj, data_size_t *ret_len ); static int named_pipe_link_name( struct object *obj, struct object_name *name, struct object *parent ); static struct object *named_pipe_open_file( struct object *obj, unsigned int access, unsigned int sharing, unsigned int options ); @@ -124,7 +125,7 @@ static const struct object_ops named_pipe_ops = named_pipe_map_access, /* map_access */ default_get_sd, /* get_sd */ default_set_sd, /* set_sd */ - default_get_full_name, /* get_full_name */ + named_pipe_get_full_name, /* get_full_name */ no_lookup_name, /* lookup_name */ named_pipe_link_name, /* link_name */ default_unlink_name, /* unlink_name */ @@ -328,6 +329,15 @@ static unsigned int named_pipe_map_access( struct object *obj, unsigned int acce return access & ~(GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE | GENERIC_ALL); } +static WCHAR *named_pipe_get_full_name( struct object *obj, data_size_t *ret_len ) +{ + WCHAR *ret; + + if (!(ret = default_get_full_name( obj, ret_len ))) + set_error( STATUS_OBJECT_PATH_INVALID ); + return ret; +} + static void pipe_server_dump( struct object *obj, int verbose ) { struct pipe_server *server = (struct pipe_server *) obj;
1
0
0
0
Paul Gofman : server: Allow named pipes creation with device file as root directory.
by Alexandre Julliard
26 Nov '20
26 Nov '20
Module: wine Branch: master Commit: a2ffa8ef7e178a374b6ac6dc39b11f64952cf316 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a2ffa8ef7e178a374b6ac6dc…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Wed Nov 25 21:42:43 2020 +0300 server: Allow named pipes creation with device file as root directory. Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/pipe.c | 34 ++++++++++++++++++++++++++++++++-- server/named_pipe.c | 2 +- server/request.c | 3 ++- 3 files changed, 35 insertions(+), 4 deletions(-) diff --git a/dlls/ntdll/tests/pipe.c b/dlls/ntdll/tests/pipe.c index 9e8b623d75b..bfc8dc0b3be 100644 --- a/dlls/ntdll/tests/pipe.c +++ b/dlls/ntdll/tests/pipe.c @@ -65,6 +65,7 @@ typedef struct { #endif static NTSTATUS (WINAPI *pNtFsControlFile) (HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, PVOID apc_context, PIO_STATUS_BLOCK io, ULONG code, PVOID in_buffer, ULONG in_size, PVOID out_buffer, ULONG out_size); +static NTSTATUS (WINAPI *pNtCreateDirectoryObject)(HANDLE *, ACCESS_MASK, OBJECT_ATTRIBUTES *); static NTSTATUS (WINAPI *pNtCreateNamedPipeFile) (PHANDLE handle, ULONG access, POBJECT_ATTRIBUTES attr, PIO_STATUS_BLOCK iosb, ULONG sharing, ULONG dispo, ULONG options, @@ -73,6 +74,7 @@ static NTSTATUS (WINAPI *pNtCreateNamedPipeFile) (PHANDLE handle, ULONG access, ULONG inbound_quota, ULONG outbound_quota, PLARGE_INTEGER timeout); static NTSTATUS (WINAPI *pNtQueryInformationFile) (IN HANDLE FileHandle, OUT PIO_STATUS_BLOCK IoStatusBlock, OUT PVOID FileInformation, IN ULONG Length, IN FILE_INFORMATION_CLASS FileInformationClass); +static NTSTATUS (WINAPI *pNtQueryObject)(HANDLE, OBJECT_INFORMATION_CLASS, void *, ULONG, ULONG *); static NTSTATUS (WINAPI *pNtQueryVolumeInformationFile)(HANDLE handle, PIO_STATUS_BLOCK io, void *buffer, ULONG length, FS_INFORMATION_CLASS info_class); static NTSTATUS (WINAPI *pNtSetInformationFile) (HANDLE handle, PIO_STATUS_BLOCK io, PVOID ptr, ULONG len, FILE_INFORMATION_CLASS class); static NTSTATUS (WINAPI *pNtCancelIoFile) (HANDLE hFile, PIO_STATUS_BLOCK io_status); @@ -94,8 +96,10 @@ static BOOL init_func_ptrs(void) } loadfunc(NtFsControlFile) + loadfunc(NtCreateDirectoryObject) loadfunc(NtCreateNamedPipeFile) loadfunc(NtQueryInformationFile) + loadfunc(NtQueryObject) loadfunc(NtQueryVolumeInformationFile) loadfunc(NtSetInformationFile) loadfunc(NtCancelIoFile) @@ -2405,14 +2409,20 @@ static void test_security_info(void) static void test_empty_name(void) { HANDLE hdirectory, hpipe, hwrite, handle; + OBJECT_TYPE_INFORMATION *type_info; + OBJECT_NAME_INFORMATION *name_info; OBJECT_ATTRIBUTES attr; LARGE_INTEGER timeout; UNICODE_STRING name; IO_STATUS_BLOCK io; DWORD data, length; + char buffer[1024]; NTSTATUS status; BOOL ret; + type_info = (OBJECT_TYPE_INFORMATION *)buffer; + name_info = (OBJECT_NAME_INFORMATION *)buffer; + hpipe = hwrite = NULL; attr.Length = sizeof(attr); @@ -2438,13 +2448,17 @@ static void test_empty_name(void) &io, FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_CREATE, FILE_SYNCHRONOUS_IO_NONALERT, 0, 0, 0, 3, 4096, 4096, &timeout); todo_wine ok(status == STATUS_OBJECT_NAME_INVALID, "Got unexpected status %#x.\n", status); - + if (!status) + CloseHandle(hpipe); CloseHandle(hdirectory); pRtlInitUnicodeString(&name, L"\\Device\\NamedPipe\\"); attr.RootDirectory = 0; attr.ObjectName = &name; + status = pNtCreateDirectoryObject(&hdirectory, GENERIC_READ | SYNCHRONIZE, &attr); + todo_wine ok(status == STATUS_OBJECT_TYPE_MISMATCH, "Got unexpected status %#x.\n", status); + status = NtCreateFile(&hdirectory, GENERIC_READ | SYNCHRONIZE, &attr, &io, NULL, 0, FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN, 0, NULL, 0 ); ok(!status, "Got unexpected status %#x.\n", status); @@ -2454,10 +2468,18 @@ static void test_empty_name(void) name.MaximumLength = 0; attr.RootDirectory = hdirectory; + hpipe = NULL; status = pNtCreateNamedPipeFile(&hpipe, GENERIC_READ | SYNCHRONIZE, &attr, &io, FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_CREATE, FILE_SYNCHRONOUS_IO_NONALERT, 0, 0, 0, 3, 4096, 4096, &timeout); - todo_wine ok(!status, "Got unexpected status %#x.\n", status); + ok(!status, "Got unexpected status %#x.\n", status); + type_info->TypeName.Buffer = NULL; + status = pNtQueryObject(hpipe, ObjectTypeInformation, type_info, sizeof(buffer), NULL); + ok(!status, "Got unexpected status %#x.\n", status); + ok(type_info->TypeName.Buffer && !wcscmp(type_info->TypeName.Buffer, L"File"), + "Got unexpected type %s.\n", debugstr_w(type_info->TypeName.Buffer)); + status = pNtQueryObject(hpipe, ObjectNameInformation, name_info, sizeof(buffer), NULL); + todo_wine ok(status == STATUS_OBJECT_PATH_INVALID, "Got unexpected status %#x.\n", status); status = pNtCreateNamedPipeFile(&handle, GENERIC_READ | SYNCHRONIZE, &attr, &io, FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_OPEN, FILE_SYNCHRONOUS_IO_NONALERT, @@ -2469,6 +2491,14 @@ static void test_empty_name(void) FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN, FILE_SYNCHRONOUS_IO_NONALERT, NULL, 0 ); todo_wine ok(!status, "Got unexpected status %#x.\n", status); + type_info->TypeName.Buffer = NULL; + status = pNtQueryObject(hwrite, ObjectTypeInformation, type_info, sizeof(buffer), NULL); + todo_wine ok(!status, "Got unexpected status %#x.\n", status); + todo_wine ok(type_info->TypeName.Buffer && !wcscmp(type_info->TypeName.Buffer, L"File"), + "Got unexpected type %s.\n", debugstr_w(type_info->TypeName.Buffer)); + status = pNtQueryObject(hwrite, ObjectNameInformation, name_info, sizeof(buffer), NULL); + todo_wine ok(status == STATUS_OBJECT_PATH_INVALID, "Got unexpected status %#x.\n", status); + attr.RootDirectory = hpipe; status = NtCreateFile(&handle, GENERIC_READ | SYNCHRONIZE, &attr, &io, NULL, 0, FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN, diff --git a/server/named_pipe.c b/server/named_pipe.c index 14868fad63a..6e65f3e364a 100644 --- a/server/named_pipe.c +++ b/server/named_pipe.c @@ -1371,7 +1371,7 @@ DECL_HANDLER(create_named_pipe) set_error( STATUS_OBJECT_PATH_SYNTAX_BAD ); return; } - if (!(root = get_directory_obj( current->process, objattr->rootdir ))) return; + if (!(root = get_handle_obj( current->process, objattr->rootdir, 0, NULL ))) return; } pipe = create_named_object( root, &named_pipe_ops, &name, objattr->attributes | OBJ_OPENIF, NULL ); diff --git a/server/request.c b/server/request.c index 97bf1a746d2..24cfda26110 100644 --- a/server/request.c +++ b/server/request.c @@ -66,6 +66,7 @@ #include "process.h" #include "thread.h" #include "security.h" +#include "handle.h" #define WANT_REQUEST_HANDLERS #include "request.h" @@ -205,7 +206,7 @@ const struct object_attributes *get_req_object_attributes( const struct security } if (root && attr->rootdir && attr->name_len) { - if (!(*root = get_directory_obj( current->process, attr->rootdir ))) return NULL; + if (!(*root = get_handle_obj( current->process, attr->rootdir, 0, NULL ))) return NULL; } *sd = attr->sd_len ? (const struct security_descriptor *)(attr + 1) : NULL; name->len = attr->name_len;
1
0
0
0
Paul Gofman : server: Do not dereference symlinks specified as root directory.
by Alexandre Julliard
26 Nov '20
26 Nov '20
Module: wine Branch: master Commit: ae106feed2878a6eed144a4d08d082863569a669 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ae106feed2878a6eed144a4d…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Wed Nov 25 21:42:42 2020 +0300 server: Do not dereference symlinks specified as root directory. Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/om.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++- server/console.c | 24 ++++++++++++------- server/directory.c | 4 ++-- server/file.c | 6 +++-- server/mailslot.c | 4 ++-- server/named_pipe.c | 4 ++-- server/object.c | 6 ++--- server/object.h | 5 ++-- server/sock.c | 6 +++-- server/symlink.c | 5 ++-- server/winstation.c | 4 ++-- 11 files changed, 104 insertions(+), 28 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=ae106feed2878a6eed14…
1
0
0
0
Alexandre Julliard : winemenubuilder: Silence out of bounds compiler warning.
by Alexandre Julliard
26 Nov '20
26 Nov '20
Module: wine Branch: master Commit: 981d69ada607848b34917b947971c16489856fe4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=981d69ada607848b34917b94…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Nov 26 20:45:02 2020 +0100 winemenubuilder: Silence out of bounds compiler warning. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/winemenubuilder/winemenubuilder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/winemenubuilder/winemenubuilder.c b/programs/winemenubuilder/winemenubuilder.c index 0ae1383d4bf..fe4998fb373 100644 --- a/programs/winemenubuilder/winemenubuilder.c +++ b/programs/winemenubuilder/winemenubuilder.c @@ -2902,7 +2902,7 @@ static BOOL InvokeShellLinker( IShellLinkW *sl, LPCWSTR link, BOOL bWait ) szArgs[0] = '"'; lstrcpyW(szArgs + 1, szPath); - p[-1] = '"'; + szArgs[lstrlenW(szArgs)] = '"'; GetWindowsDirectoryW(szPath, MAX_PATH); lstrcatW(szPath, startW);
1
0
0
0
Alexandre Julliard : shell32: Silence buffer overflow compiler warnings.
by Alexandre Julliard
26 Nov '20
26 Nov '20
Module: wine Branch: master Commit: 6624cabbb7cfe33c179a02238b4c9b91d3c3297e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6624cabbb7cfe33c179a0223…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Nov 26 17:31:53 2020 +0100 shell32: Silence buffer overflow compiler warnings. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shell32/cpanelfolder.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/shell32/cpanelfolder.c b/dlls/shell32/cpanelfolder.c index ea5e9e2c3b6..114eb6babd3 100644 --- a/dlls/shell32/cpanelfolder.c +++ b/dlls/shell32/cpanelfolder.c @@ -259,9 +259,9 @@ static LPITEMIDLIST _ILCreateCPanelApplet(LPCSTR name, LPCSTR displayName, memcpy(pidl->mkid.abID, &tmp, 2+size0); p = &((PIDLDATA*)pidl->mkid.abID)->u.cpanel; - strcpy(p->szName, name); - strcpy(p->szName+tmp.u.cpanel.offsDispName, displayName); - strcpy(p->szName+tmp.u.cpanel.offsComment, comment); + memcpy(p->szName, name, strlen(name) + 1); + memcpy(p->szName+tmp.u.cpanel.offsDispName, displayName, strlen(displayName) + 1); + memcpy(p->szName+tmp.u.cpanel.offsComment, comment, strlen(comment) + 1); *(WORD*)((char*)pidl+(size+2)) = 0; @@ -1077,7 +1077,7 @@ static HRESULT WINAPI IShellExecuteHookA_fnExecute(IShellExecuteHookA *iface, return E_INVALIDARG; path[0] = '\"'; - lstrcpyA(path+1, pcpanel->szName); + memcpy(path+1, pcpanel->szName, strlen(pcpanel->szName) + 1); /* pass applet name to Control_RunDLL to distinguish between applets in one .cpl file */ lstrcatA(path, "\" ");
1
0
0
0
Alexandre Julliard : winebuild: Initialize entry point to avoid a compiler warning.
by Alexandre Julliard
26 Nov '20
26 Nov '20
Module: wine Branch: master Commit: b3a38fef26915e0cdc77de14f059b0ee2b0751f1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b3a38fef26915e0cdc77de14…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Nov 26 18:12:55 2020 +0100 winebuild: Initialize entry point to avoid a compiler warning. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winebuild/import.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c index 53d4fb2869b..fb5c26da07f 100644 --- a/tools/winebuild/import.c +++ b/tools/winebuild/import.c @@ -215,8 +215,7 @@ static inline ORDDEF *find_export( const char *name, ORDDEF **table, int size ) { ORDDEF func, *odp, **res = NULL; - func.name = xstrdup(name); - func.ordinal = -1; + func.name = func.export_name = xstrdup(name); odp = &func; if (table) res = bsearch( &odp, table, size, sizeof(*table), func_cmp ); free( func.name );
1
0
0
0
Alexandre Julliard : ntdll/tests: Fix a trace format on ARM64.
by Alexandre Julliard
26 Nov '20
26 Nov '20
Module: wine Branch: master Commit: ce5e1c12c37cffd403c6f2b0042a9239d07d6af8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ce5e1c12c37cffd403c6f2b0…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Nov 26 17:12:08 2020 +0100 ntdll/tests: Fix a trace format on ARM64. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/exception.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c index b2331b739ac..3451a7d6465 100644 --- a/dlls/ntdll/tests/exception.c +++ b/dlls/ntdll/tests/exception.c @@ -5360,7 +5360,7 @@ static void test_thread_context(void) /* Pc is somewhere close to the NtGetContextThread implementation */ ok( (char *)context.Pc >= (char *)pNtGetContextThread - 0x40000 && (char *)context.Pc <= (char *)pNtGetContextThread + 0x40000, - "wrong Pc %08x/%08x\n", context.Pc, (DWORD)pNtGetContextThread ); + "wrong Pc %p/%p\n", (void *)context.Pc, pNtGetContextThread ); #undef COMPARE }
1
0
0
0
Alexandre Julliard : kernel32/tests: Fix floating-point status register size on ARM64.
by Alexandre Julliard
26 Nov '20
26 Nov '20
Module: wine Branch: master Commit: c36f580cc49c2acb2f86b6d321d3aa88342ae68d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c36f580cc49c2acb2f86b6d3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Nov 26 23:16:41 2020 +0100 kernel32/tests: Fix floating-point status register size on ARM64. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/kernel32/tests/thread.c b/dlls/kernel32/tests/thread.c index a6c923dc063..b69f69fadaa 100644 --- a/dlls/kernel32/tests/thread.c +++ b/dlls/kernel32/tests/thread.c @@ -1840,7 +1840,7 @@ static inline unsigned long get_fpu_cw(void) #endif return MAKELONG( cw, sse ); #elif defined(__aarch64__) - unsigned long cw; + ULONG_PTR cw; __asm__ __volatile__( "mrs %0, fpcr" : "=r" (cw) ); return cw; #else
1
0
0
0
← Newer
1
...
10
11
12
13
14
15
16
...
86
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
Results per page:
10
25
50
100
200