On Tue Jul 9 18:18:30 2024 +0000, Dmitry Timoshkov wrote:
> Hans is correct. I have a computer that is part of the AD domain, and
> before logging into the domain GetUserNameEx(3) returns error 1332
> (ERROR_NONE_MAPPED). After entering the domain GetUserNameEx(3) returns
> name that is equal to the displayName field in the LDAP database.
> Behaviour is the same for Windows 7 and Windows 10.
Hm, interesting. I'll experiment with this and make changes to my branch accordingly. Thank you.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6002#note_75599
The handles returned by libproc (namely struct socket_info's soi_pcb)
use all 64 bits, but the ones from the pcblist sysctl are truncated
to 32. That makes find_owning_pid fail. The pcblist64 sysctl was
added in macOS 10.6 and returns handles that match those from
libproc.
--
There does not seem to be a MIB constant for pcblist64, so I had to fetch it with sysctlbyname.
--
v2: nsiproxy.sys: Use net.inet.tcp.pcblist64 to enumerate connections on macOS.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6021
On Tue Jul 9 16:44:32 2024 +0000, Tim Clem wrote:
> Whoa, whoops. Thanks, missed that when I was cleaning up the patch. I'm
> now caching the mib, which cleans things up a bit as well.
Also added the UDP version while I'm at it.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6021#note_75586
This MR adds a very minimal support for new MSHTML objects bindings that will ultimately allow implementing IE9+ behavior. The plan is to have something testable that we can increment on. It's enabled only for the `Screen` object for now (which is an example of an object without custom properties with no functions). The next step is to work incrementally on enabling it for all MSHTML objects.
A few comments on the approach:
- The object and its jscript representation share reference counter. This may not be optimal, but it essentially preserves the current behavior where MSHTML is responsible for tracking it. I expect that we will want to revisit that when integrating cycle collector with jscript.
- Deleting properties is not yet supported; this will need another function in the interface, but it's not yet needed as we currently don't allow deleting builtin properties anyway (and custom properties are skipped in this MR as they are not needed for the `Screen` object).
- Functions are not yet supported, only old-style properties (not accessor properties yet). They are straightforward to support on top of it by extending `property_info` struct to pass iid and implementing them as jscript function.
- This does not yet allow host properties to appear and disappear without notifications. This is a limitation of jscript's `dispex.c` (not the interface), which will need to be tweaked before we use new bindings for objects that require it.
--
v2: mshtml: Use IWineJSDispatch for screen object script bindings.
mshtml: Support using IWineJSDispatch for DispatchEx implementation.
mshtml: Pass an optional script global window to init_dispatch.
mshtml: Implement jscript IWineJSDispatchHost.
jscript: Use jsdisp_t internally for host objects that support it.
jscript: Support host objects in disp_cmp.
jscript: Support converting host objects to string.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6029
This MR adds a very minimal support for new MSHTML objects bindings that will ultimately allow implementing IE9+ behavior. The plan is to have something testable that we can increment on. It's enabled only for the `Screen` object for now (which is an example of an object without custom properties with no functions). The next step is to work incrementally on enabling it for all MSHTML objects.
A few comments on the approach:
- The object and its jscript representation share reference counter. This may not be optimal, but it essentially preserves the current behavior where MSHTML is responsible for tracking it. I expect that we will want to revisit that when integrating cycle collector with jscript.
- Deleting properties is not yet supported; this will need another function in the interface, but it's not yet needed as we currently don't allow deleting builtin properties anyway (and custom properties are skipped in this MR as they are not needed for the `Screen` object).
- Functions are not yet supported, only old-style properties (not accessor properties yet). They are straightforward to support on top of it by extending `property_info` struct to pass iid and implementing them as jscript function.
- This does not yet allow host properties to appear and disappear without notifications. This is a limitation of jscript's `dispex.c` (not the interface), which will need to be tweaked before we use new bindings for objects that require it.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6029
This MR adds support for creating file mapping objects backed by large pages on Linux, by making the following changes:
## wineserver
* On Linux, `create_temp_file` will first attempt to use memfds as the backing fd. If it fails, it'll return to the current codepath, creating a temporary file in either the server or config directory.
* The created memfd will be sealed against writes, if the caller requesting the appropriate page protection flags.
* This removes the requirement that FDs be only created on filesystems/directories that aren't `noexec`.
* In the server method `create_mapping` , if large pages have been requested by the caller, hold that the calling thread's token holds `SeLockMemoryPrivilege` .
* Additionally, add `SeLockMemoryPrivilege` to the list of privileges enabled for the Administrator.
## `ntdll`
* Add `virtual_get_min_large_page_size` and its exported wrapper `wine_unix_get_min_large_page_size`.
* On Linux, the minimum page size is determined by going through `/sys/kernel/mm/hugepages`. If hugepage support was not detected, `STATUS_NOT_SUPPORTED` is returned instead. On other platforms, the older hard-coded value of 2\*1024\*1024 is returned instead.
* `NtCreateSection` will validate certain parameters if large pages are requested. Specifically, it will return STATUS_INVALID_PARAMETER if the requested mapping is not anonymous/unnamed, or the size is not a multiple of the minimum supported page size.
## `kernelbase`
* `GetLargePageMinimum` will use `wine_unix_get_min_large_page_size`.
## `kernel32/tests`
* Add new test test_large_page_file_mapping, which validates privilege enforcements and parameter validation while creating large pages backed file mapping obejcts. The tests are skipped if `GetLargePageMinimum` returns 0.
--
v36: advapi32: Fake the SeLockMemoryPrivilege right in LsaEnumerateAccountRights.
psapi: Add tests for querying information for large pages.
ntdll: Use PAGEMAP_SCAN ioctl to implement get_working_set_ex, if available.
kernel32: Add tests for large pages support.
ntdll: Support allocating virtual memory, creating and mapping files backed by large/huge pages.
server: Use memfd to back anonymous mappings on Linux.
kernelbase: Implement GetLargePageMinimum by returning the value of LargePageMinimum in _KUSER_SHARED_DATA.
server: Set LargePageMinimum in _KUSER_SHARED_DATA on Linux.
server: Require SeLockMemoryPrivilege to create large page mappings.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5769
Hans is correct. I have a computer that is part of the AD domain, and before logging into the domain GetUserNameEx(3) returns error 1332 (ERROR_NONE_MAPPED). After entering the domain GetUserNameEx(3) returns name that is equal to the displayName field in the LDAP database. Behaviour is the same for Windows 7 and Windows 10.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6002#note_75556