Ralf Habacker (@rhabacker) commented about server/sock.c:
> if (errno == EADDRINUSE && sock->reuseaddr)
> errno = EACCES;
>
> - set_error( sock_get_ntstatus( errno ) );
> - return;
> + /* Windows' AF_UNIX implementation has an edge case allowing for a socket to bind to
> + * an empty path. Linux doesn't, so it throws EINVAL. We check for this situation
> + * here and avoid early-exiting if it's the case. */
> + if (!(errno == EINVAL && sock->family == WS_AF_UNIX && !*params->addr.sa_data))
> + {
> + set_error( sock_get_ntstatus( errno ) );
> + if (sock->family == WS_AF_UNIX && *params->addr.sa_data)
> + fchdir(server_dir_fd);
This should be changed.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7650#note_102241
Ralf Habacker (@rhabacker) commented about server/sock.c:
> return;
> }
>
> + if (sock->family == WS_AF_UNIX && *addr->sa_data)
> + fchdir(server_dir_fd);
Here the working directory is also changed, which needs to be reviewed.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7650#note_102239
Ralf Habacker (@rhabacker) commented about server/sock.c:
> + if (!(unix_path = mem_alloc( unix_path_len + 1 )))
> + return;
> +
> + memcpy( unix_path, (char *)(params + 1) + params->addr_len, unix_path_len );
> + unix_path[unix_path_len] = '\0';
> +
> + base_name = strrchr(unix_path, '/');
> + if (base_name)
> + {
> + if (base_name != unix_path)
> + (++base_name)[-1] = '\0';
> + }
> + else
> + base_name = unix_path;
> +
> + if (chdir( unix_path ) == -1)
At https://gitlab.winehq.org/wine/wine/-/merge_requests/7519 it is pointed out that changing the working directory may not be a good idea, so it should be checked whether this can be avoided.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7650#note_102237
This implements setting `ThreadPriorityBoost`, `ProcessPriorityBoost`, `ProcessBasePriority` and getting `ThreadPriorityBoost`, `ProcessPriorityBoost` NT info classes and adds tests where appropriate.
The actual boosting mechanism will be in part 2 to keep the size of this MR manageable.
--
v3: kernel32/tests: Add tests for GetProcessPriorityBoost/SetProcessPriorityBoost.
kernelbase: Implement SetProcessPriorityBoost.
kernelbase: Implement GetProcessPriorityBoost.
ntdll: Implement ProcessPriorityBoost class in NtSetInformationProcess.
ntdll: Implement ProcessPriorityBoost class in NtQueryInformationProcess.
ntdll: Implement ThreadPriorityBoost class in NtSetInformationThread.
ntdll: Properly implement ThreadPriorityBoost class in NtQueryInformationThread.
ntdll/tests: Add tests for setting process base priority.
ntdll: Implement ProcessBasePriority class in NtSetInformationProcess.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7869