Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown policy: '4' error under Mojave 10.14.6 (18G5033) #8

Open
natpicone opened this issue Jul 20, 2020 · 1 comment
Open

Unknown policy: '4' error under Mojave 10.14.6 (18G5033) #8

natpicone opened this issue Jul 20, 2020 · 1 comment

Comments

@natpicone
Copy link

Hi,
Using Mojave 10.14.6 (18G5033) built without issues but now every time I try to sudo I got

*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff3c2cb9a9 __exceptionPreprocess + 256
	1   libobjc.A.dylib                     0x00007fff669d3a17 objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff3c2cb7db +[NSException raise:format:] + 201
	3   SharedUtils                         0x00007fff403ee1a1 +[LAErrorHelper raiseExceptionOnError:] + 182
	4   LocalAuthentication                 0x00007fff4040aade -[LAClient evaluatePolicy:options:uiDelegate:reply:] + 479
	5   LocalAuthentication                 0x00007fff4040ad86 -[LAClient evaluatePolicy:options:reply:] + 99
	6   LocalAuthentication                 0x00007fff4040f065 __42-[LAContext evaluatePolicy:options:reply:]_block_invoke + 131
	7   libdispatch.dylib                   0x00007fff6815563d _dispatch_client_callout + 8
	8   libdispatch.dylib                   0x00007fff68158374 _dispatch_block_invoke_direct + 256
	9   libdispatch.dylib                   0x00007fff68158254 dispatch_block_perform + 124
	10  LocalAuthentication                 0x00007fff4040ef3e -[LAContext evaluatePolicy:options:reply:] + 226
	11  LocalAuthentication                 0x00007fff4040f567 -[LAContext evaluatePolicy:options:error:] + 244
	12  LocalAuthentication                 0x00007fff40410a10 __37-[LAContext canEvaluatePolicy:error:]_block_invoke + 425
	13  LocalAuthentication                 0x00007fff40410b8d __37-[LAContext canEvaluatePolicy:error:]_block_invoke.103 + 16
	14  libsystem_trace.dylib               0x00007fff683b4714 _os_activity_initiate_impl + 53
	15  LocalAuthentication                 0x00007fff404107c6 -[LAContext canEvaluatePolicy:error:] + 264
	16  pam_watchid.so.2                    0x000000010e111d1e pam_sm_authenticate + 1438
	17  libpam.2.dylib                      0x00007fff67157d64 openpam_dispatch + 500
	18  libpam.2.dylib                      0x00007fff671590ba pam_authenticate + 35
	19  sudo                                0x000000010e02b4af sudo + 62639
	20  sudo                                0x000000010e032704 sudo + 91908
	21  sudo                                0x000000010e0337c7 sudo + 96199
	22  sudo                                0x000000010e01e66e sudo + 9838
	23  sudo                                0x000000010e042c98 sudo + 158872
	24  sudo                                0x000000010e0230ea sudo + 28906
	25  libdyld.dylib                       0x00007fff681a23d5 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

Build using

Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
Target: x86_64-apple-darwin18.7.0
@natpicone
Copy link
Author

Ok, just found that deviceOwnerAuthenticationWithBiometricsOr requires MacOS 10.15+.
https://developer.apple.com/documentation/localauthentication/lapolicy/deviceownerauthenticationwithbiometricsorwatch

Maybe a check can help avoid breaking the authentication layer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant