mdssvc: fix kMDScopeArray parsing
authorRalph Boehme <slow@samba.org>
Wed, 18 Jan 2023 15:21:16 +0000 (16:21 +0100)
committerJule Anger <janger@samba.org>
Fri, 10 Feb 2023 10:52:15 +0000 (10:52 +0000)
commit8816c1b6e315f499afa66610a999ca82b38cb28d
tree1fc9752465cd57abbc49a86f6eff8197f34d1097
parent3a5190b80b878443d9d541f4d42ec414e2442eed
mdssvc: fix kMDScopeArray parsing

In macOS Ventura marshalling of kMDScopeArray in the "openQueryWithParams"
request has changed from

  string: kMDScopeArray
  sl_array_t(#1): {
    string: /foo/bar
  }

to:

  string: kMDScopeArray
  sl_array_t(#1): {
    sl_array_t(#1): {
      string: /foo/bar
    }
  }

With this patch we check both encodings. Bug fixed according to user feedback.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15299
RN: Spotlight doesn't work with latest macOS Ventura

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 1dd0cd2f4e644ad43b0e7ee2aaae19799e859585)
source3/rpc_server/mdssvc/mdssvc.c