Closed 1dustindavis closed 5 years ago
At least on 10.14.4 with XProtect version 2102
, this command works:
defaults read /System/Library/CoreServices/XProtect.bundle/Contents/version.plist CFBundleShortVersionString
I can submit a PR, but I have no idea if this is reliable on older OS or XProtect versions. (Testing old XProtext versions sounds real annoying)
I'm fine with a split in the logic for 10.13 and 10.14. All we really need to know is if the old method works on 10.13. If so, I'm happy to make the assumption that the fruit co just changed it for 10.14.
Dustin, spin up an old OS without network access and run that command. If it works and is accurate I'd say there's a pretty high chance it will always work.
Good catch btw.
Thanks, Erik Gomez
From: Graham Gilbert notifications@github.com Sent: Wednesday, May 1, 2019 12:33:00 PM To: salopensource/sal Cc: Subscribed Subject: Re: [salopensource/sal] Latest XProtect Version is not detected by default plugin (#317)
I'm fine with a split in the logic for 10.13 and 10.14. All we really need to know is if the old method works on 10.13. If so, I'm happy to make the assumption that the fruit co just changed it for 10.14.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/salopensource/sal/issues/317#issuecomment-488351937, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABLL6GFKFLXXTK5P7OY4KSDPTHH4ZANCNFSM4HJRHF2Q.
A new XProtect version was released today and actually has the correct version number in XProtect.meta.plist
, so I am closing this since it was likely just a one-time mistake on Apple's side.
Describe the bug The latest XProtect version shipped by Apple (
2102
) does not updateVersion
in/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/XProtect.meta.plist
.The current plugin that ships with Sal uses that plist to determine the machines current XProtect Version, but an up-to-date machine with
2102
still returns2101
.You can check if a machine has
2102
by checking for the pkg receipt:pkgutil --pkg-info com.apple.pkg.XProtectPlistConfigData.16U4051
. Sadly, that command is specific to each XProtect release, so it can not be used generically without additional processing.To Reproduce Steps to reproduce the behavior:
2102
by runningpkgutil --pkg-info com.apple.pkg.XProtectPlistConfigData.16U4051
2101.0
is displayedExpected behavior The plugin should display
2102
for all machines with2102
installed.Server (please complete the following information):
Client (please complete the following information):
Additional context The issue is fairly straight forward, but since Apple does not document XProtect, it is not clear if the issue will be resolved in a future XProtect version, or if this is the way it will be forever.
One potential solution would be to use the pkg receipt to determine the current version, but as I mentioned above, that will require additional logic to determine the latest version.
This bash one-liner (stolen from Rich Trouton with slight modifications) shows one method: