Skip to content
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

XML self closing tags #15

Closed
directionless opened this issue Jan 14, 2019 · 1 comment
Closed

XML self closing tags #15

directionless opened this issue Jan 14, 2019 · 1 comment

Comments

@directionless
Copy link
Contributor

Playing with https://github.com/kolide/launcher/ I'm getting reports that launchd seems to require self closing xml tags for booleans.

I notice that this library used support this (c271b43), but that it was reverted in 4dc2eea

The other plist library seems to have fixed this with a dedicated xml encoder -- DHowett/go-plist#34

There's an underlying go xml issue for this as well -- golang/go#21399

@groob
Copy link
Owner

groob commented Jan 14, 2019

I can repro with

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
	<dict>
		<key>Label</key>
		<string>co.kolide.runload</string>
		<key>Program</key>
		<string>/Users/victor/run.sh</string>
		<key>RunAtLoad</key>
		<true></true>
	</dict>
</plist>

launchd on mojave rejects the plist.

victor@kl ~> sudo launchctl load -w /Library/LaunchDaemons/co.kolide.runload.plist
/Library/LaunchDaemons/co.kolide.runload.plist: Invalid property list

directionless added a commit to directionless/plist that referenced this issue Jan 14, 2019
See discussion in groob#15

This re-introduces the self closing behavior for booleans, and updates the tests to support it.
groob pushed a commit that referenced this issue Jan 14, 2019
See discussion in #15

This re-introduces the self closing behavior for booleans, and updates the tests to support it.
@groob groob closed this as completed Jan 14, 2019
directionless added a commit to directionless/launcher that referenced this issue Jan 14, 2019
We should be setting this to RunAtLoad, add that.

launchd seems to require self closing tags. This is probably
a bug from apple, but we still need to work around it. See groob/plist#15
directionless added a commit to kolide/launcher that referenced this issue Jan 14, 2019
We should be setting this to RunAtLoad, add that.

launchd seems to require self closing tags. This is probably
a bug from apple, but we still need to work around it. See groob/plist#15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants