summaryrefslogtreecommitdiff
path: root/source3/rpc_server/wscript_build
AgeCommit message (Collapse)AuthorFilesLines
2026-03-01rpc_server: Move dfs helper routines to srv_dfs_nt.cVolker Lendecke1-1/+1
This makes it clear that these callers of create_conn_struct_tos_cwd() don't really need to chdir() back to whatever cwd the process was in before. RPC servers don't really have a concept of "implicit" current working directory that is assumed to be the root dir of the current share. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2025-11-14s3:mdssvc: Remove support for tracker sparql supportAndreas Schneider1-9/+0
This only support v2 of tracker sparql which is only avilable on the Ubuntu 20.04 runner. All newer distributions provide only tracker sparql v3. Also the tevent glib stopped working on Fedora 43. Time to remove it. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2024-01-26s3:rpc_server: add basic rpcd_witness templateStefan Metzmacher1-0/+15
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
2023-10-13s3-iremotewinspool: add PAR->RPRN mapping tableGünther Deschner1-0/+1
There is no 1:1 mapping between the opcodes but between the functions (including _Ex and _2 naming extensions): e.g. winspool_AsyncOpenPrinter (0x00) -> spoolss_OpenPrinterEx (0x45) winspool_AsyncClosePrinter (0x14) -> spoolss_ClosePrinter (0x1d) Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-10-10CVE-2023-42669 s3-rpc_server: Disable rpcecho for consistency with the AD DCAndrew Bartlett1-0/+1
The rpcecho server in source3 does have samba the sleep() feature that the s4 version has, but the task architecture is different, so there is not the same impact. Hoever equally this is not something that should be enabled on production builds of Samba, so restrict to selftest builds. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15474 Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2023-01-09CVE-2022-38023 s3:rpc_server/netlogon: Use dcesrv_netr_creds_server_step_check()Samuel Cabrero1-1/+1
After s3 and s4 rpc servers merge we can avoid duplicated code. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15240 Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2022-01-28s3/rpc_server: install elasticsearch_mappings.jsonRalph Boehme1-0/+3
This was removed accidentally remvoed by a7c65958a15149918415b7456d6f20ee8c9669d2 because the original code only installed the json file if the mdssvc was built as module: if bld.SAMBA3_IS_ENABLED_MODULE('rpc_mdssvc_module'): bld.INSTALL_FILES(bld.env.SAMBA_DATADIR, 'mdssvc/elasticsearch_mappings.json') Installing the json file should just depend on Elasticsearch support being enabled, regardless of the removed module support. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14961 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Noel Power <npower@samba.org> Autobuild-User(master): Noel Power <npower@samba.org> Autobuild-Date(master): Fri Jan 28 10:22:31 UTC 2022 on sn-devel-184
2021-12-20s3/rpc_server: Remove duplicate dependency listing for RPC_SERVICEAnoop C S1-1/+0
Signed-off-by: Anoop C S <anoopcs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Anoop C S <anoopcs@samba.org> Autobuild-Date(master): Mon Dec 20 10:14:53 UTC 2021 on sn-devel-184
2021-12-10s3:rpc_server: Activate samba-dcerpcdVolker Lendecke1-50/+16
This is the big switch to use samba-dcerpcd for the RPC services in source3/. It is a pretty big and unordered patch, but I don't see a good way to split this up into more manageable pieces without sacrificing bisectability even more. Probably I could cut out a few small ones, but a major architechtural switch like this will always be messy. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2021-12-10s3:rpc_server: Add samba-dcerpcd helper programsVolker Lendecke1-0/+82
These are rpcd_* binaries. rpcd_classic collects everything that's not specific Changes the epmapper to read the epmdb.tdb, which will make the epmapper tests non-bisectable until the switch is done. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2021-12-10s3:rpc_server: Implement the rpcd_* helper-end of the samba-dcerpc protocolVolker Lendecke1-0/+14
This is the generic code that becomes the template that all rpcd_* instances that serve DCERPC can use to provide services to samba-dcerpcd. The external entry point is: rpc_worker_main() which takes an argc/argv list and two functions: get_interfaces() - List all interfaces that this server provides get_servers() - Provide the RPC server implementations Each rpcd_* service needs only to provide the implementations of get_interfaces() and get_servers() and call rpc_worker_main() from their main() function to provide services that can be connected to from samba-dcerpcd. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2021-12-10s3:rpc_server: Add samba-dcerpcdVolker Lendecke1-0/+14
Central dispatcher for incoming RPC requests, supported by helpers that implement RPC services. Upon startup, it asks all helpers which interfaces and endpoints to listen on so it doesn't interfere with the samba binary when we're configured as an Active Directory Domain Controller, then samba-dcerpcd opens the relevant sockets. Once clients connect, start required helpers and tell them to shut down once idle for a while. Can be started as a full standalone daemon without smbd involved or as a helper daemon started on demand by smbd or winbind or other local processes trying to connect to a named pipe based RPC service. NB. To start as a standalone daemon the smb.conf [global] option "rpc start on demand helpers = false" must be set. By default "rpc start on demand helpers = true" in order to allow upgrades without needing an smb.conf change. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2021-01-14s3/rpc_server: add deps of rpc_mdssvc_moduleRalph Boehme1-2/+1
This allows removing allow_undefined_symbols=True. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Thu Jan 14 16:05:10 UTC 2021 on sn-devel-184
2020-10-29s3:rpc_server: Allow to use RC4 for setting passwordsAndreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
2020-08-07Revert "build: fix the coverage build"Andrew Bartlett1-26/+2
This reverts commit 3e072b3fb78f0d3132b1d3ce719b8f3706e8491a. This is no longer required now that --noline is set globally and that is a much nicer solution. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2020-05-24s3: rpc_server: Remove dead codeSamuel Cabrero1-1/+1
Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2020-03-20s3:rpc_server: Remove dead codeSamuel Cabrero1-6/+2
Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Samuel Cabrero <scabrero@samba.org> Autobuild-Date(master): Fri Mar 20 17:11:28 UTC 2020 on sn-devel-184
2020-03-20s3:rpc_server: Do not generate and build s3 RPC server codeSamuel Cabrero1-31/+15
Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2020-03-20s3:rpc_server: Remove s3 rpc server loopSamuel Cabrero1-5/+0
Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2020-03-20s3:rpc_server: Include generated boilerplate codeSamuel Cabrero1-0/+1
Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2020-02-27build: fix the coverage buildGary Lockyer1-2/+26
"make lcov" was failing with: Processing file bin/default/<stdout> genhtml: ERROR: cannot read ... <stdout> Flex adds "#line nnn <stdout>" to the generated source, which then causes issues with lcov. This commit adds a SAMBA_GENERATOR for es_lexer.l and sparql_lexer.l that strips out the offending lines. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-12-10smbdes: add des_crypt56_gnutls() using DES-CBC with zeroed IVIsaac Boukris1-1/+2
Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-10-09s3:mdssvc: add Elasticsearch backendRalph Boehme1-0/+12
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Noel Power <noel.power@suse.com>
2019-08-08s3:mdssvc: add noindex backendRalph Boehme1-0/+1
Add a new default backend that, while allowing mdsvc RPC and search queries from clients, always returns no results. Shares using this backend will behave the same way as shares on a macOS SMB server where indexing is disabled. This change will later also allow us to compile the Spotlight RPC service by default which is a big step in the direction of adding tests to CI. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2019-08-08s3:mdssvc: move some code to a subsystemRalph Boehme1-3/+7
We need this in a later patchset when adding a mdssvc client library and for unit tests. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2019-08-08s3:mdssvc: new option "spotlight backend"Ralph Boehme1-6/+10
Currently there's only the tracker backend, but subsequent commits will add other backends. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2019-08-08s3-mdssvc: factor out Tracker backend logicRalph Boehme1-0/+3
This moves all Tracker backend logic into a modularized component. This should not result in any change in behaviour, it just paves the way for adding additional backends. Currently the only available backend is Gnome Tracker. slq_destroy_send/recv is not needed anymore as the problem is solved now by correctly checking if an async Tracker request was cancelled and we got G_IO_ERROR_CANCELLED in tracker_con_cb() or tracker_query_cb() and avoid using user_data in that the case. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2019-08-08s3:rpc_server: factor out rpc_mdssvc_sourcesRalph Boehme1-8/+12
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2019-06-27s4:rpc_server: Use GnuTLS RC4 in lsa endpointAndreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-04-24s3-mdssvc: use tevent_glib_glue in mdssvc RPC serviceRalph Boehme1-2/+2
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Noel Power <npower@samba.org>
2019-04-08CVE-2019-3880 s3: rpc: winreg: Remove implementations of SaveKey/RestoreKey.Jeremy Allison1-1/+1
Remove the now unused code implementations of registry file io. As reported by Michael Hanselmann. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13851 Signed-off-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Karolin Seeger <kseeger@samba.org> Autobuild-Date(master): Mon Apr 8 11:43:31 UTC 2019 on sn-devel-144
2017-03-29auth: Generate a human readable Authentication log message.Gary Lockyer1-1/+1
Add a human readable authentication log line, to allow verification that all required details are being passed. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Pair-Programmed-by: Gary Lockyer <gary@catalyst.net.nz> Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
2017-01-28s3/rpc_server/mdssvc: Generate flex/bison files in buildNoel Power1-2/+2
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-20s3/rpc_server: move rpc_modules.c to its own subsystemRalph Boehme1-3/+8
The source file rpc_modules.c was used in two places which lead to the following build error when configuring with '--nonshared-binary=smbd/smbd': ERROR: source source3/rpc_server/rpc_modules.c is in more than one subsystem of target 'smbd/smbd': ['RPC_SERVICE', 'MDSSD'] Bug: https://bugzilla.samba.org/show_bug.cgi?id=12524 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Noel Power <nopower@suse.com> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri Jan 20 15:00:45 CET 2017 on sn-devel-144
2017-01-11wscript: remove executable bits for all wscript* filesStefan Metzmacher1-0/+0
These files should not be executable. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Wed Jan 11 20:21:01 CET 2017 on sn-devel-144
2017-01-06s3-iremotewinspool: update api struct map so we only end up implementing 8 callsGünther Deschner1-1/+0
In the end, these calls are the only ones we need to implement: 3.1.4.2. Printer Driver Management Methods * AsyncInstallPrinterDriverFromPackage * AsyncUploadPrinterDriverPackage * AsyncCorePrinterDriverInstalled * AsyncDeletePrinterDriverPackage 3.1.4.9. Printing Related Notification Methods * SyncRegisterForRemoteNotifications * SyncUnRegisterForRemoteNotifications * SyncRefreshRemoteNotifications * AsyncGetRemoteNotifications All other calls are 1:1 mapped to spoolss calls. Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2017-01-06s3-iremotewinspool: add generated server stubs and no longer compile ↵Günther Deschner1-1/+1
autogenerated ones Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2017-01-06s3-iremotewinspool: add generated srv_iremotewinspool_nt.c fileGünther Deschner1-0/+8
Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2016-02-21s3:rpc_server: make it possible to build mdssvc as a shared moduleRalph Boehme1-13/+16
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
2016-02-21s3:rpc_server: allow building RPC services as shared modulesRalph Boehme1-1/+2
This is the general RPC subsystem change, existing modules must be tweaked to support being loaded as a module. The next commit shows how to do this for the Spotlight RPC service. The general syntax is: --with-shared-modules=rpc_NAME_module Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2015-07-07s3-mdssvc: add mdssd RPC service daemon for mdssvcRalph Boehme1-0/+5
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-07-07s3-mdssvc: lexer and parser for Spotlight queriesRalph Boehme1-0/+2
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: Spotlight attribute mappingsRalph Boehme1-0/+1
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 Boehme1-0/+1
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 Boehme1-0/+1
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 Boehme1-0/+8
'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>
2015-03-31fsrvp: add remote snapshot RPC serverDavid Disseldorp1-0/+10
The Samba fss_agent RPC server is an implementation of the File Server Remote VSS (Volume Shadow Copy Service) Protocol, or FSRVP for short. FSRVP is new with Windows Server 2012, and allows authenticated clients to remotely request the creation, exposure and deletion of share snapshots. The fss_agent RPC server processes requests on the FssAgentRpc named pipe, and dispatches relevant snapshot creation and deletion requests through to the VFS. The registry smb.conf back-end is used to expose snapshot shares, with configuration parameters and share ACLs cloned from the base share. There are three FSRVP client implementations that I'm aware of: - Samba rpcclient includes fss_X commands. - Windows Server 2012 includes diskshadow.exe. - System Center 2012. FSRVP operations are only processed for users with: - Built-in Administrators group membership, or - Built-in Backup Operators group membership, or - Backup Operator privileges, or - Security token matches the initial process UID MS-FSRVP specifies that server state should be stored persistently during operation and retrieved on startup. Use the existing fss_srv.tdb FSRVP state storage back-end to satisfy this requirement. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2015-03-31fsrvp: add server state storage back-endDavid Disseldorp1-0/+4
MS-FSRVP specifies: the server MUST persist all state information into an implementation- specific configuration store. This change adds a fss_srv TDB database to preserve FSRVP server state, with the following keys used to track shadow copy state and hierarchy: - sc_set/<shadow copy set GUID> A shadow copy set tracks a collection of zero or more shadow copies, as initiated by a StartShadowCopySet FSRVP client request. - sc_set/<shadow copy set GUID>/sc/<shadow copy GUID> A shadow copy defines information about a snapshot base volume, the snapshot path, and a collection of share maps. It is initiated by an AddToShadowCopySet client request. - sc_set/<shadow copy set GUID>/sc/<shadow copy GUID>/smap/<smap GUID> A share map tracks new shares that are created to expose shadow copies. All structures are marshalled into on-disk format using the previously added fsrvp_state IDL library. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2015-03-20s3:rpc_server/wscript_build: remove allow_warnings=True from RPC_SPOOLSSStefan Metzmacher1-1/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2014-09-29s3: Move init_lsa_ref_domain_list to libChristof Schmitt1-1/+1
This will be used in the next patch in winbind. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>