summaryrefslogtreecommitdiff
path: root/source4/wrepl_server
AgeCommit message (Collapse)AuthorFilesLines
2023-10-25libcli/util: add struct tstream_context to tstream_read_pdu_blob_full_fn_tRalph Boehme1-5/+5
Add struct tstream_context to tstream_read_pdu_blob_full_fn_t and update all callers of tstream_read_pdu_blob_send() to use the correct callback. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-10-24s4:wrepl_server: make use of tstream_bsd_fail_readv_first_error(true)Stefan Metzmacher1-0/+5
This avoids doing useless work in case the client connection is already broken. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-09-14s4:wrepl_server: Correctly read ‘type’ elementJoseph Sutton1-1/+39
winsdb_message() stores this element as hexadecimal, which format ldb_msg_find_attr_as_uint() cannot cope with. Permit this element to be in either decimal or hexadecimal format. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-09-11s4:wrepl_server: Fix code spellingJoseph Sutton2-3/+3
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-08-14s4:wrepl_server: Fix code spellingAndreas Schneider2-3/+3
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-08-14s4:wrepl_server: Remove trailing white spacesAndreas Schneider1-19/+19
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2020-11-27s4: rename source4/smbd/ to source4/samba/Ralph Boehme7-14/+14
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Fri Nov 27 10:07:18 UTC 2020 on sn-devel-184
2018-11-01source4 smdb: Add a post fork hook to the service APIGary Lockyer1-10/+13
Add a post fork hook to the service API this will be called: - standard process model immediately after the task_init. - single process model immediately after the task_init - prefork process model, inhibit_pre_fork = true immediately after the task_init - prefork process model, inhibit_pre_fork = false after each service worker has forked. It is not run on the service master process. The post fork hook is not called in the standard model if a new process is forked on a new connection. It is instead called immediately after the task_init. The task_init hook has been changed to return an error code. This ensures the post_fork code is only run if the task_init code completed successfully. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
2018-11-01source4 smbd: Make the service_details structure constant.Gary Lockyer1-1/+1
Make the service_details structure a static const. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
2017-10-19source4/smbd: Do not overstamp the process model with "single"Gary Lockyer1-30/+14
Instead, except in RPC which is a special SNOWFLAKE, we rely on the struct service_details in the init function. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2017-10-19 source4/smbd: refactor the process model for preforkGary Lockyer3-6/+15
Refactor the process model code to allow the addition of a prefork process model. - Add a process context to contain process model specific state - Add a service details structure to allow service to indicate which process model options they can support. In the new code the services advertise the features they support to the process model. The process model context is plumbed through to allow the process model to keep track of the supported options, and any state the process model may require. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2017-05-11s4: Add TALLOC_CTX * to register_server_service().Jeremy Allison1-1/+1
Use the passed in context from callers. Remove one talloc_autofree_context(). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@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
2016-02-06dlist: remove unneeded type argument from DLIST_ADD_END()Michael Adam1-2/+2
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-05Remove all uses of the NT_STATUS_NOT_OK_RETURN_AND_FREE macro from the codebase.Garming Sam1-1/+4
Following the current coding guidelines, it is considered bad practice to return from within a macro and change control flow as they look like normal function calls. Change-Id: I421e169275fe323e2b019c6cc5d386289aec07f7 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2014-03-05Remove NT_STATUS_IS_ERR_RETURN macro from the codebase.Garming Sam1-1/+3
Following the current coding guidelines, it is considered bad practice to return from within a macro and change control flow as they look like normal function calls. Change-Id: I39b07b3a799331a5faa968629aa95b836cb78600 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2014-03-05Remove a number of NT_STATUS_HAVE_NO_MEMORY_AND_FREE macros from the codebase.Garming Sam1-1/+4
Following the current coding guidelines, it is considered bad practice to return from within a macro and change control flow as they look like normal function calls. Change-Id: I133eb5a699757ae57b87d3bd3ebbcf5b556b0268 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2014-02-13s4:wrepl_server: avoid some compiler warningsStefan Metzmacher1-0/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
2013-08-12s4:wrepl_out_helpers.c: avoid talloc_reference() in most casesStefan Metzmacher1-3/+18
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2012-07-27lib/param: Remove use of lp{cfg,}_socket_address outside the NBT client and ↵Andrew Bartlett1-4/+1
server In these other cases, control of the sockets to bind to can be obtained using "bind interfaces only = yes" and "interfaces = ". Andrew Bartlett
2012-06-01Revert "waf-mitkrb5: enable dcerpc_server library to support OpenChange ↵Alexander Bokovoy1-2/+1
client code" This reverts commit f8c447b1a48eaf12dcf70b92fd7525c4ad26c246. After discussing with Julien (Openchange) and Metze, I decided to revert this code. Instead I made a patch to Openchange which allows to build client side only. Openchange server code requires working s4 member DC and --without-ad-dc build does not provide working provisioning even if we enable dcerpc_server and end point mapper. Autobuild-User: Alexander Bokovoy <ab@samba.org> Autobuild-Date: Fri Jun 1 16:46:08 CEST 2012 on sn-devel-104
2012-06-01waf-mitkrb5: enable dcerpc_server library to support OpenChange client codeAlexander Bokovoy1-1/+2
Signed-off-by: Andreas Schneider <asn@samba.org>
2011-10-18lib/param: Remove parameters for wins and spoolss databasesAndrew Bartlett1-1/+1
This removes the smb.conf parameters per-database, replacing these with hard-coded database names in well known (and configurable) directories. The wins.ldb is now always in the "state dir", rather than being in both state and lock dir (ie, a bug). Less smb.conf parameters means less parameters to try and sync up between the loadparm subsystems. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Tue Oct 18 05:39:54 CEST 2011 on sn-devel-104
2011-09-14s4:wrepl_server: return NT_STATUS_CONNECTION_DISCONNECTEDStefan Metzmacher1-1/+1
We should return the same in all places. metze
2011-08-14s4:misc: remove last usage of legacy event_ fn namesSimo Sorce1-1/+1
Autobuild-User: Simo Sorce <idra@samba.org> Autobuild-Date: Sun Aug 14 00:38:13 CEST 2011 on sn-devel-104
2011-07-02param: Finish conversion from lp_wins_support() -> lp_we_are_a_wins_server()Andrew Bartlett1-1/+1
Jermey started this in 1997 with 0aa493cc0303aa4177f289b9e4c797c8fa180672 (avoiding the duplicate function makes it easier to generate the struct loadparm_globals). Andrew Bartlett
2011-06-06s4-ipv6: ensure wrepl server does not use ipv6Andrew Tridgell2-1/+4
WINS only does IPv4
2011-06-06s4-ipv6: update callers to load_interface_list()Andrew Tridgell2-2/+2
2011-06-06s4-ipv6: the wins replication server can only handle IPv4Andrew Tridgell1-0/+3
2011-05-08s4-interfaces Rename interfaces code so not to conflict with source3/Andrew Bartlett2-5/+5
The iface_count, iface_n_bcast, and load_interfaces functions conflicted with functions of the same name in source3, so the source4 functions were renamed. Hopefully we can actually wrap one around the other in future. Andrew Bartlett
2011-05-03s4-messaging Rename messaging -> imessagingAndrew Bartlett1-1/+1
This avoid symbol and structure conflicts between Samba3 and Samba4, and chooses a less generic name. Andrew Bartlett
2011-04-29s4-param Rename private_path() -> lpcfg_private_path()Andrew Bartlett1-1/+1
This is consistent with lock_path() Andrew Bartlett
2011-02-10ldb: use #include <ldb.h> for ldbAndrew Tridgell3-6/+6
thi ensures we are using the header corresponding to the version of ldb we're linking against. Otherwise we could use the system ldb for link and the in-tree one for include Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-11-29s4:wrepl_server - add a cast on "iov_base"Matthias Dieter Wallnöfer1-1/+1
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Mon Nov 29 15:34:32 CET 2010 on sn-devel-104
2010-11-29s4:wrepl_server - remove unreachable statementMatthias Dieter Wallnöfer1-2/+0
2010-11-15s4-server: make server sockets a child of the task contextAndrew Tridgell1-2/+2
We previously allocated sockets as direct children of the event context. That led to crashes if a service called task_server_terminate(), as it left the socket open and handling events for a dead protocol. Making them a child of the task allows the task to terminate and take all its sockets with it. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-11-14Build wrepl server as service by default.Jelmer Vernooij1-1/+2
2010-10-31s4: Remove the old perl/m4/make/mk-based build system.Jelmer Vernooij1-24/+0
The new waf-based build system now has all the same functionality, and the old build system has been broken for quite some time. Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sun Oct 31 02:01:44 UTC 2010 on sn-devel-104
2010-10-30s4-smbd: don't initialise process models more than onceAndrew Tridgell1-2/+2
this also removes the event_context parameter from process model initialisation. It isn't needed, and is confusing when a process model init can be called from more than one place, possibly with different event contexts. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-28s4:wrepl_server: use SOCKET_FLAG_NOCLOSE instead of a dup()Stefan Metzmacher1-18/+3
The key thing is that we might have to turn the incomming connection into a outgoing connection. This change makes sense anyway, because we donate the fd to tstream. metze
2010-09-03s4:wrepl_server: use irpc_binding_handle_by_name() in ↵Stefan Metzmacher1-18/+23
wreplsrv_scavenging_replica_active_records() metze
2010-09-03s4:wrepl_server: use irpc_binding_handle_by_name() in r_do_release_demand()Stefan Metzmacher1-16/+20
metze
2010-09-03s4:wrepl_server: use irpc_binding_handle_by_name() in r_do_challenge()Stefan Metzmacher2-42/+45
metze
2010-07-16s4-loadparm: 2nd half of lp_ to lpcfg_ conversionAndrew Tridgell4-21/+21
this converts all callers that use the Samba4 loadparm lp_ calling convention to use the lpcfg_ prefix. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-05-18Finish removal of iconv_convenience in public API's.Jelmer Vernooij3-5/+3
2010-04-27s4:wrepl_server: use tsocket_address functions to get the peer ipStefan Metzmacher1-5/+16
metze
2010-04-27s4:wrepl_server: use tsocket_address functions to get the peer ipStefan Metzmacher1-4/+15
metze
2010-04-06s4-waf: removed the AUTOGENERATED markersAndrew Tridgell1-4/+0
we won't be using the mk -> wscript generator again
2010-04-06s4-waf: mark the wscript files as python so vim/emacs knows how to highlight ↵Andrew Tridgell1-0/+2
them
2010-04-06build: commit all the waf build files in the treeAndrew Tridgell1-0/+12