Comment 4 for bug 2046994

Revision history for this message
Dan Smith (dansmith) wrote :

Not sure if you're looking for the whole template from me or just a pre/post test case, so use whatever of this you think is worthwhile:

[ Impact ]

This bug causes users to receive no feedback (results or errors) when trying to search a Samba share from macOS Ventura or later with the Finder/Spotlight (OS-native) mechanism. Before Ventura, searching was possible because of Samba's elasticsearch integration. With the affected versions (which we expect will include all future versions from here on out) a user performs a search and just never gets results, nor any positive feedback that something has failed.

The patch to Samba accounts for a difference in the query parameter arrangement in newer macOS versions. Before the patch, Samba would not properly interpret a search query from the newer versions because it was nested in a more complicated structure than before.

[ Test Plan ]

To reproduce:

1. Browse to a Samba share
2. Type a search string in the box at the top of the Finder window
3. The default destination is "this mac", so change it to the option provided to search the current network share
4. Observe no results, errors, or other feedback

To confirm the fix:

Same as above, but in step 4, results should be provided.

[ Where problems could occur ]

The patch is very small and limited to the code that handles searches from (AFAIK) macOS only. I'm not a Samba expert, but I think the blast radius is very small in this case, and since searching from the supported versions of macOS currently doesn't work, it is probably a "can't make it worse" sort of situation.

[ Other Info ]

This is a feature that used to work fine before macOS Ventura, so users of 20.04 and 22.04 like myself had this capability working before the *client* upgrade broke it. I think it's just a bug in Samba's reverse-engineering of the queries they saw at the time, not fully implementing the query DSL semantics such that a completely-legit query in a later version just wasn't handled by Samba.