Repository navigation
CON-6833 Jamf Log Grabber: collect Login log from /var/log - #31
Draft
Camden Webster (camdenwebster) wants to merge 1 commit into
Draft
Camden Webster (camdenwebster) wants to merge 1 commit into
Camden Webster (camdenwebster) wants to merge 1 commit into
Conversation
Root cause: Jamf Connect Login (jamf/JamfConnectLogin#3447) moves its plugin log from world-writable /tmp/jamf_login.log to /var/log/jamf_login.log (root:_securityagent, 0660) as temp-file hardening. The grabber only looked in /tmp, so newer installs would silently yield no Login plugin log. Collect the new path (reporting missing/unreadable in the existing results style instead of aborting) and keep collecting the old /tmp file for older Login versions. Co-Authored-By: Claude <noreply@anthropic.com>
Author
|
I'll keep this in draft for now until the new Login version where this change is introduced is at least in RC/has a release date. Probably won't be until after the new year I'm guessing. If you guys want to simplify your script here and also avoid issues with the new logs path, you could use the Self Service+ has a similar CLI now with 2.34.0: The SSP one is supposed to include the Connect logs bundle as well, but that appears to be broken in the first version and should be fixed soon. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Jamf Connect Login is moving its plugin log from
/tmp/jamf_login.logto/var/log/jamf_login.log(temp-file hardening). This makes Jamf Log Grabber collect the new path while still collecting the old one for older Login versions.Jira: CON-6833
Must merge together with jamf/JamfConnectLogin#3447 and jamf/JCPyAutomation#95.
Support script owners per CODEOWNERS: klngbl nickander. The Script Expectations template asks for the Confluence release checklist to be reviewed first; please advise if anything further is needed from our side.
What changed
support/Jamf-Log-Grabber/Jamf Log Grabber(Connect function only): copy/var/log/jamf_login.logtoConnect/jamf_login_var_log.log, reporting success, "not found" (orange, same wording style) or "exists but could not be read" (red) in Results.html. Never aborts./tmp/jamf_login.logcollection is kept unchanged except the not-found text now says "older Login versions". Both files may be present or absent (the new Login postinstall removes the old one).root:_securityagent, mode 0660, so it needs root. The script already assumes root-style execution (Jamf policy / Self Service,sudofor other files), so no privilege change was made; the unreadable message tells the operator to run as root.How did I prove it works?
bash -npasses;shellcheck -S errorreports nothing. No test suite exists for this script.Where to focus your review
Connect()(about lines 294-307); filenamejamf_login_var_log.logchosen so it cannot collide with the oldjamf_login_tmp.log.🤖 Generated with Claude Code