mirror of
https://github.com/usnistgov/macos_security.git
synced 2026-02-03 14:03:24 +00:00
custom rule that sets mobileconfig: false still ends up creating a .mobileprofile file
#279
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 @bernstei on GitHub.
Summary
The logic that searches for default and custom rules when generating .mobileconfig files in
generate_profilesfinds both, because of these linesAs a result, even if a custom rule is created with
mobileconfig: false, a mobileconfig file is still created inbuild/baseline_name/mobileconfigs/unsigned, even though setting a custom rule would make me expect that it would not. As a result, it's not correct to install all the created mobileconfig files in the build subdirectory.Steps to reproduce
Define a custom rule that has
mobileconfig: falseinstead of true and generate guidance with-pto generate profiles.Operating System version
OS X 11.5.1
What is the current bug behavior?
A mobileconfig payload is created
What is the expected correct behavior?
no mobileconfig payload is created
Possible fixes
Make the custom rule override, rather than just be parsed along with, the default rule, similar to the logic used in
generate_scriptsormain(e.g. around line 1590), which overrides the default rule with any custom rule that is found.@robertgendler commented on GitHub:
Fixed with commit
dff6c6f2efin Big_Sur, Catalina, and Monterey@bernstei commented on GitHub:
Thanks for the clarification. I appreciate all the work you've been doing.
@robertgendler commented on GitHub:
@bernstei
Copied the wrong commit. This is the right commit
0f84f7029e@bernstei commented on GitHub:
@robertgendler Can you please explain how this commit fixes the issue? The commit (
dff6c6f) seems to only modify the logic for creating PDF files, not mobileconfig payloads.