-
Notifications
You must be signed in to change notification settings - Fork 491
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
CIS Update - macOS 14, CIS v1.1.0 #21478
Conversation
SELECT 1 FROM managed_policies WHERE | ||
domain='com.apple.Safari' AND | ||
name='ShowOverlayStatusBar' AND | ||
(value = 1 OR value = 'true') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lucasmrod, when checking the list of users in managed_policies
I find username = NULL
for which the field ShowOverlayStatusBar = 1
is not deployed by the profile.
Thus this will not work.
SELECT 1 WHERE NOT EXISTS (
SELECT 1 FROM users AS u
LEFT JOIN (
SELECT username FROM managed_policies WHERE
domain=‘com.apple.Safari’ AND
name=‘ShowOverlayStatusBar’ AND
(value != 1 OR value != ‘true’)
) AS p
ON p.username = u.username OR p.username IS NULL
);
The problem remains that the profile only deploys the desired outcome to one username.
The query as it is now (I removed AND username=''
) does work here.
TMWYT
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran the following steps:
- Installed https://github.com/fleetdm/fleet/blob/main/it-and-security/lib/configuration-profiles/macos-ensure-show-status-bar-is-enabled.mobileconfig on a macOS 14 VM with one user account "lucas".
managed_policies
returns the applied setting as expected and withusername="lucas"
- I then created another user "gandalf".
managed_policies
still returns the same results as (2).- I log out as "lucas" and log in as "gandalf".
managed_policies
now returns two rows withdomain='com.apple.Safari', name='ShowOverlayStatusBar'
(one withusername='lucas'
and one withusername='gandalf'
).
This means the domain='com.apple.Safari', name='ShowOverlayStatusBar'
setting is system wide and, once applied, macOS makes sure all users have such setting applied (IOW, we don't care about username
). Thus, knowing this, the query that we need is now actually simpler:
SELECT 1 FROM managed_policies WHERE domain='com.apple.Safari' AND name='ShowOverlayStatusBar' AND (value = 1 OR value = 'true');
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lucasmrod, In that case the existing query is G2G.
I will merge soon.
Changelog
ADD:
REMOVE:
UPDATE: