[PATCH] s3/rpc_server: Character Encode Spotlight Queries

Andrew Bartlett abartlet at samba.org
Sat Jul 7 21:37:34 UTC 2018


On Sat, 2018-07-07 at 22:16 +0200, Ralph Böhme wrote:
> On Sun, Jul 08, 2018 at 07:59:57AM +1200, Andrew Bartlett wrote:
> > OK.  Ouch. 
> 
> yeah, guilty as charged. But to my excuse, back then I had spent more then a 
> year reverse engineering the protocol and probably another one implementing a 
> PoC. Remember, the Spotlight RPC service is not documented by Apple and it uses 
> a custom marshalling not based or DCE/RPC. The PoC back then was part of 
> Netatalk and this was then ported with small effort to Samba. 
> 
> I'm happy to provide patches to remove it, as said it didn't really take off, 
> there's only one vendor I know of that uses it in a product and they have a 
> *heavily* patched version (that uses Elasticsearch, not Gnome Tracker as indexer 
> and db). They don't have a client as well which means no tests there as well. :)

Perhaps just add some cmocka tests that cover the core parts?

Start small, but some smoke tests will make a big difference to
ensuring unrelated changes don't bust this totally. 

In terms of some unit test ideas to start with, you could start with
one for this URL transform for example, and eg tracker_to_unix_path
(does that need an unescape?), and then build out.  

I'm not going to ask you remove it, we all have our heart and soul in
this project, and so I try not to be so emotionally crushing.  But it
would give me comfort when making broader changes across the codebase
if this had some tests running.

Thanks,

Andrew Bartlett

-- 
Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba




More information about the samba-technical mailing list