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

download osqueryd when missing on startup #1788

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

zackattack01
Copy link
Contributor

resolves #1776, where we discovered that installing an MSI with an older version of osqueryd over a newer version leaves the launcher installation with no osqueryd.exe on windows.

There are several potential approaches here (e.g. via WiX configuration changes, path versioning etc.) but we already have all of the logic we need to download osqueryd (via autoupdates) so lets do that.

There are also several different ways to integrate/repurpose the autoupdate logic for this and I'd love to hear any alternative suggestions- this was the cleanest approach I could find that didn't require excessive refactoring of that code.

Tested by building a custom 1.9.3 MSI with these changes + an older osqueryd binary. Installing removes the osqueryd.exe on disk (as expected), but the download is triggered immediately and launcher keeps going happily once that process finishes

Copy link
Contributor

@RebeccaMahany RebeccaMahany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! This is a really tidy solution.

ee/tuf/autoupdate.go Show resolved Hide resolved
@zackattack01 zackattack01 added this pull request to the merge queue Jul 23, 2024
Merged via the queue into main with commit 3fd2b2d Jul 23, 2024
32 checks passed
@zackattack01 zackattack01 deleted the zack/fix_osquery_rollbacks branch July 23, 2024 21:06
]
}`)

if err = tufAutoupdater.Do(actionReader); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very elegant. I might suggest exposing tufAutoupdater.DoNow or something, because hardcoding the wireprotocol here will totally come back to bite us. But this is very tidy.

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

Successfully merging this pull request may close these issues.

Something unclear about MSI re-installs and a missing osqueryd
3 participants