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
mac_utils `_available_services` will fail with malformed launchd plists present #50227
Description of Issue/Question
The current implementation of the salt/utils/mac_utils.py module uses exception handling during plist reading primarily as a means for dealing with binary encoded plists. However, it doesn't correctly handle plists which are invalid, leading to an unhandled exception blowing up the
Obviously, you shouldn't have any broken launchd plists sitting around, but I found one on a machine in our environment.
I have a fix for this incoming as a PR.
Any Mac client.
Steps to Reproduce Issue
Also, this can be replicated trying to manage other services too:
(Provided by running