summaryrefslogtreecommitdiff
path: root/source3/rpc_server/mdssvc
AgeCommit message (Collapse)AuthorFilesLines
2018-12-11rpc_server3: Use dom_sid_str_bufVolker Lendecke1-2/+4
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2018-09-14mdssvc: Move a variable declaration closer to its useVolker Lendecke1-3/+4
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Fri Sep 14 10:48:47 CEST 2018 on sn-devel-144
2018-09-14mdssvc: Move a variable declaration closer to its useVolker Lendecke1-1/+2
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2018-09-14mdssvc: Move a variable declaration closer to its useVolker Lendecke1-2/+5
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2018-09-14mdssvc: Simplify sl_unpack_loopVolker Lendecke1-3/+4
Move a variable declaration closer to its use, avoid a redundant ?true:false; Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2018-09-07s3: Rename server_event_context() to global_event_context()Christof Schmitt1-3/+3
This reflects that the event context is also used outside of the server processes. The command used for the rename: find . -name '*.[hc]' -print0 | xargs -0 sed -i 's/server_event_context/global_event_context/' Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2018-07-10s3/rpc_server: Character Encode Spotlight QueriesRalph Boehme1-3/+13
Fix path escaping in Spotlight so paths with spaces or special characters can be properly matched to tracker paths. Bug: https://bugzilla.samba.org/show_bug.cgi?id=12688 Based-on-a-patch-from: Mike M Pestorich <mmpestorich@gmail.com> (similar to github.com/netatalk/netatalk/commit/90aa43d) Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Jul 10 23:17:20 CEST 2018 on sn-devel-144
2017-08-29s3/mdssvc: missing assignment in sl_pack_floatRalph Boehme1-0/+2
Spotted by -Werror=maybe-uninitialized: ../source3/rpc_server/mdssvc/marshalling.c: In function ‘sl_pack_float’: ../source3/rpc_server/mdssvc/marshalling.c:171:11: error: ‘ieee_fp_union.w’ may be used uninitialized in this function [-Werror=maybe-uninitialized] offset = sl_push_uint64_val(buf, offset, bufsize, ieee_fp_union.w); Bug: https://bugzilla.samba.org/show_bug.cgi?id=12991 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2017-04-22lib: modules: Change XXX_init interface from XXX_init(void) to ↵Jeremy Allison1-1/+1
XXX_init(TALLOC_CTX *) Not currently used - no logic changes inside. This will make it possible to pass down a long-lived talloc context from the loading function for modules to use instead of having them internally all use talloc_autofree_context() which is a hidden global. Updated all known module interface numbers, and added a WHATSNEW. Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Ralph Böhme <slow@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Apr 22 01:17:00 CEST 2017 on sn-devel-144
2017-02-22Correct "errror" typos.Chris Lamb1-1/+1
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2017-02-15s3/rpc_server/mdssvc: add attribute "kMDItemContentType"Ralph Boehme1-0/+5
Bug: https://bugzilla.samba.org/show_bug.cgi?id=12545 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Feb 15 06:20:52 CET 2017 on sn-devel-144
2017-01-28s3/rpc_server/mdssvc: Generate flex/bison files in buildNoel Power8-3972/+7
Build the generated files at build time instead of using a committed version generated at some point in the past. Bug: https://bugzilla.samba.org/show_bug.cgi?id=12528 Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Sat Jan 28 13:26:01 CET 2017 on sn-devel-144
2017-01-21s3/rpc_server/mdssvc: prefix public flex and bison global symbolsRalph Boehme5-288/+322
This fixes a clash with a parser in Heimdal when building with --nonshared-binary=smbd/smbd: ... [3139/3620] Linking default/source3/smbd/smbd ... default/source4/heimdal/lib/hx509/sel-lex_116.o: In function `yy_get_previous_state': /usr/build/packages/samba-4.5/bin/../source4/heimdal/lib/hx509/sel-lex.c:1122:multiple definition of `yyin' default/source3/rpc_server/mdssvc/sparql_lexer_28.o:/usr/build/packages/samba-4.5/bin/sparql_lexer.c:1149:first defined here ... The fix is to use namespace prefixes in the parser and the lexer as described here: <https://www.gnu.org/software/bison/manual/html_node/Multiple-Parsers.html> Bug: https://bugzilla.samba.org/show_bug.cgi?id=12528 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Sat Jan 21 13:13:19 CET 2017 on sn-devel-144
2017-01-21s3/rpc_server/mdssvc: use flex noyyalloc noyyreallocRalph Boehme3-97/+112
Redefine the symbols used for malloc and realloc in the flex source instead of running sed over the generated one. Bug: https://bugzilla.samba.org/show_bug.cgi?id=12528 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
2016-07-14rpc_server: add mssing '#pragma GCC diagnostic push'Michael Adam1-0/+1
for completeness for later pop. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Ira Cooper <ira@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Thu Jul 14 02:02:33 CEST 2016 on sn-devel-144
2016-04-26s3/rpc_server: mdssvc: suppress compiler warnings from glib headersRalph Boehme1-0/+3
Several glib headers produce cast-qual warnings, eg: /usr/include/glib-2.0/gio/gliststore.h: In function ‘G_LIST_STORE’: /usr/include/glib-2.0/gio/gliststore.h:36:382: error: cast discards ‘const’ qualifier from pointer target type [-Werror=cast-qual] /usr/include/glib-2.0/gio/gliststore.h: In function ‘G_IS_LIST_STORE’: /usr/include/glib-2.0/gio/gliststore.h:36:550: error: cast discards ‘const’ qualifier from pointer target type [-Werror=cast-qual] cc1: all warnings being treated as errors This break compiling with --picky-developer, so lets suppress the warning for glibs in order to see our own --picky-developer compiler diagnostics. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Apr 26 04:44:44 CEST 2016 on sn-devel-144
2016-03-24mdssvc/sparql_parser.c: use HAVE___ATTRIBUTE__ instead of __GNUC__Douglas Bagnall1-3/+1
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
2016-03-18s3:mdssvc: older glib2 versions require g_type_init()Ralph Boehme1-1/+4
Older glib2 versions will crash if g_type_init is not called: (process:6712): GLib-GObject-CRITICAL **: ... ./gobject/gtype.c:2722: You forgot to call g_type_init() Bug: https://bugzilla.samba.org/show_bug.cgi?id=11801 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Mar 18 03:52:55 CET 2016 on sn-devel-144
2016-02-21s3:rpc_server: make it possible to build mdssvc as a shared moduleRalph Boehme1-0/+66
Allow building mdssvc RPC service as shared module: --with-shared-modules=rpc_mdssvc_module The default is to build it static. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Sun Feb 21 22:28:41 CET 2016 on sn-devel-144
2015-07-10rpc_server: Fix CID 1311342 Null pointer dereferences (REVERSE_INULL)Volker Lendecke1-3/+1
elem was dereferenced already a few lines above Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Fri Jul 10 01:01:36 CEST 2015 on sn-devel-104
2015-07-09rpc_server: Fix CID 1311341 Integer handling issues (OVERFLOW_BEFORE_WIDEN)Volker Lendecke1-2/+2
Quoting the full message: Potentially overflowing expression "total_octets * 8U" with type "unsigned int" (32 bits, unsigned) is evaluated using 32-bit arithmetic, and then used in a context that expects an expression of type "uint64_t" (64 bits, unsigned). Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2015-07-09rpc_server: Fix CID 1311340 Null pointer dereferences (NULL_RETURNS)Volker Lendecke1-0/+3
In practice this might not be relevant, but better be safe. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2015-07-09rpc_server: Fix CID 1311339 Error handling issues (CHECKED_RETURN)Volker Lendecke1-1/+4
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2015-07-09dalloc: Fix CID 1097369 API usage errors (VARARGS)Volker Lendecke1-1/+3
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2015-07-09dalloc: Fix a typoVolker Lendecke1-1/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2015-07-07s3-mdssvc: lexer and parser for Spotlight queriesRalph Boehme10-6/+4529
Add a lexer and parser for translating Spotlight query strings to SPARQL. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-07-07s3-mdssvc: main Spotlight codeRalph Boehme4-13/+2323
Implement all Spotlight RPC commands with the Tracker SPARQL async query API. Tracker uses glib for implemeting async tasks, we thus have to use a glib mainloop for processing sheduled tasks in threads. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-07-07s3-mdssvc: Spotlight attribute mappingsRalph Boehme2-0/+431
Add mappings for metadata attribute between Spotlight and NEPOMUK for use with Tracker. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-07-07s3-mdssvc: (un)marshalling Spotlight RPC blobRalph Boehme3-0/+1432
Add code for marshalling and unmarshalling Spotlight RPC blobs from/into a dalloc object store. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-07-07s3-mdssvc: dalloc: dynamic object store based on tallocRalph Boehme2-0/+393
dalloc is a hack with a bizarre API, but it does its job: it's a simple object store that allows for storing simple and complex data types. We'll use it for storing Spotlight query data. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-07-07s3-mdssvc: add Spotlight RPC stubsRalph Boehme3-0/+109
'mdssvc' aka 'Metadata Search Service' is an RPC service used by Apple for passing marshalled Spotlight search queries and results between client to server. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>