Alfred Agrell (@Alcaro) commented about dlls/ntdll/unix/system.c:
- if (fd >= 0)
close(fd);
- return STATUS_UNSUCCESSFUL;
+#elif defined(__APPLE__)
- if(!name || !vendor || (name && vendor && !retlen && !attrib))
- {
return STATUS_INVALID_PARAMETER;
- }
- /*
* Since 2006, Mac computers use Extensible Firmware Interface (EFI).
* Apple requires a developer account and mandatory code signing,
* and the entire system boot process is verified, we can return SecureBoot enabled.
* Reference: https://support.apple.com/guide/security/uefi-firmware-security-in-an-intel-based-mac-seced055bcf6/web
*/
- if(vendor->Data1 == 0x8be4df61 && vendor->Data2 == 0x93ca && vendor->Data3 == 0x11d2 && wcscmp(name->Buffer, L"SecureBoot")
I'd memcmp the guid instead. And you forgot the ! on the wcscmp. And do L strings do the right thing in Unix side code?
Is this piece even tested?