mUU sends malformed hubcli command when more than one point update is available for a major macOS version
lechlerjr opened this issue · 2 comments
Describe the bug
Have a Mac running macOS 13.6. It is missing macOS 13.6.1 and macOS 13.6.2.
:PublicAssetSets:macOS in /private/var/macOSUpdater/OS.plist has entries for both macOS 13.6.1 and macOS 13.6.2.
Line 1076 of macOSUpdater.sh greps "ProductVersion = $currentMajor" in which the return value is:
ProductVersion = 13.6.1
ProductVersion = 13.6.2
Once macOSUpdater.sh trims "ProductVersion =" out, it is left with
13.6.1
13.6.2
macOSUpdater then tries to send the following MDM command (as confirmed with Crescendo):
/usr/local/bin/hubcli mdmcommand --osupdate --productversion 13.6.1\n13.6.2 --installaction DownloadOnly
This causes hubcli to return the man page for hubcli mdmcommand.
Reproduction steps
- Have a Mac that is running a version of macOS that is at least 2 point versions older than the latest version of macOS available. For example, current version of macOS Ventura as of this writing is macOS 13.6.2. So grab a Mac that is running macOS 13.6 (missing macOS 13.6.1 and macOS 13.6.2).
- Ensure mUU is configured to install "latest" version of macOS available and execute macOSUpdater.sh (either manually or as a WSONE script).
Expected behavior
When macOSUpdater.sh matches more than one major OS version in /private/var/macOSUpdater/OS.plist, it should pick the highest version number returned by the command in line 1076 of macOSUpdater.sh.
Additional context
No response
Attaching sanitized copy of macOSupdater.log
Copy of /private/var/macOSUpdater/OS.plist