Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix 50227 malformed plists #50228
What does this PR do?
This PR updates the tests for the mac_utils module to not incorrectly pass malformed binary plists and then fixes the handling of that situation in the mac_utils module itself.
What issues does this PR fix or reference?
Skips the poorly formed plist file by
Commits signed with GPG?
Please review Salt's Contributing Guide for best practices.
See GitHub's page on GPG signing for more information about signing commits with GPG.
@cachedout and anybody else, this is a little more involved than I thought, and I need some guidance.
Two main questions:
Hi-wondering if I can get some clarification on the following point. Currently the mac_utils services list includes services which can't actually start due to invalid plist files. The code handles this by falling back to just using the filename to populate the list of services (rather than the ID property from inside the file).
This seems wrong to me, and I'd be fine with updating the code to exclude services which can't start from the list of available services. This involves rewriting some tests as well.
OR, if the goal is still to include those services, I can revert back mac_utils and just fix the exception handling for malformed XML cases and update the tests to pass with the existing behavior.