mirror of
https://github.com/usnistgov/macos_security.git
synced 2026-02-03 05:53:24 +00:00
Directory services integration test returns multiple values #269
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @grismemj on GitHub.
Summary
The test for integrate system into a directory services infrastructure returns multiple items
Steps to reproduce
Run the current test on a system joined to OpenDirectory
Operating System version
macOS 11.6.2
What is the current bug behavior?
The test returns multiple items, which causes the integer check for 0 to fail
Here is the output on my system of the check code:
% /usr/bin/dscl localhost -list . | /usr/bin/grep -vE '(Contact|Search|Local|^
)'; /bin/echo?LDAPv3
0
What is the expected correct behavior?
The check should only return 0
Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's tough to read otherwise.)
Output of checks
% /usr/bin/dscl localhost -list . | /usr/bin/grep -vE '(Contact|Search|Local|^
)'; /bin/echo?LDAPv3
0
Possible fixes
Make the grep quiet by adding -q
% /usr/bin/dscl localhost -list . | /usr/bin/grep -vqE '(Contact|Search|Local|^
)'|echo?0