summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* s4:librpc/rpc: optionally return the local address from ↵Stefan Metzmacher2014-05-261-5/+23
| | | | | | | | | | dcerpc_pipe_open_socket_recv() The caller should be able to remember the local address that was used for the connection. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:librpc/rpc: avoid using dcerpc_unix_socket_path()Stefan Metzmacher2014-05-261-6/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We use information stored in the dcerpc_binding in order to open a secondary connection. The goals are: - dcerpc_secondary_connection_* should just use the dcerpc_binding information for the first connection and just call dcerpc_pipe_connect_* - Get rid of dcerpc_pipe->transport.* and just use a tstream_context. All other details should be maintained only by the higher levels. - Hide dcerpc_pipe and dcecli_connection behind dcerpc_binding_handle. - Have just one entry point to create a new connection. For source4/librpc this will be dcerpc_pipe_connect_*. For source3/rpc_client we need a similar function. - We'll have a new dcerpc_connection layer, with also just one entry point to create a new connection. - Replace dcerpc_pipe and dcecli_connection with the new dcerpc_connection layer. - Replace rpc_pipe_client with the new dcerpc_connection layer. - When the client side is unified we can change the server as it needs to act as a client in order to register the endpoint mappings. - Then the core of the server will be changed to use the new dcerpc_connection layer. As dcerpc_unix_socket_path() uses p->transport.private_data as 'struct sock_private', we should avoid it. We can then remove dcerpc_unix_socket_path() and 'struct sock_private'. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* torture3: Add a little gencache_parse load testVolker Lendecke2014-05-241-0/+24
| | | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Sat May 24 16:16:43 CEST 2014 on sn-devel-104
* Exit with ctdb_fatal if serverids_exist failsVolker Lendecke2014-05-241-4/+4
| | | | | | | | | | | The only reason why this could fail is a severe ctdb communications problem. The normal way to deal with this is ctdb_fatal. This avoids a confusing panic in get_share_mode_lock when ctdb is shutdown while this call happens. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* dbwrap_ctdb: open locally with TDB_VOLATILE if requestedVolker Lendecke2014-05-241-1/+1
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd: let default_sys_recvfile() and sys_recvfile() cope with ↵Jeremy Allison2014-05-241-2/+44
| | | | | | | | | | | | | | | | | non-blocking sockets. default_sys_recvfile() and splice() recvfile were not written to cope with non-blocking sockets. When either the socket read() or splice() return -1 with errno EWOULDBLOCK or EAGAIN, if no bytes have been processed yet, return -1 and let the caller set blocking and retry. If bytes have been processed, just return them as a short read and let the caller retry with the remaining needed reads. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* unix_msg: Simplify unix_msg_send a bitVolker Lendecke2014-05-241-3/+2
| | | | | | | | | | Now that we settled on variable arrays, remove a fixed one Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat May 24 02:56:31 CEST 2014 on sn-devel-104
* torture/smb2/dir: check create time match findDavid Disseldorp2014-05-231-4/+16
| | | | | | | | | | | This adds a check to ensure that the create time returned in the SMB2 create response matches the value found in the find response. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri May 23 22:42:24 CEST 2014 on sn-devel-104
* s3: smb2: Move from using SBVAL to put NTTIMEs on the wire to ↵Jeremy Allison2014-05-231-42/+43
| | | | | | | | | | | | | | | | | | | | put_long_date_timespec. put_long_date_timespec() correctly calls round_timespec() on the time parameters, and is the correct function to use when writing *any* file-based NTTIME on the wire. Move from using NTTIME variables internally in the server to struct timespec variables, which is what all the other server code uses. Only map to NTTIME as the last step of marshalling the output data. The previous SMB2 create code missed the round_timespec() call before marshalling. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3: smb2: Move from using SBVAL to put NTTIMEs on the wire to ↵Jeremy Allison2014-05-231-70/+57
| | | | | | | | | | | | | | | | | | | | | | | | | put_long_date_timespec. put_long_date_timespec() correctly calls round_timespec() on the time parameters, and is the correct function to use when writing *any* file-based NTTIME on the wire. The smb2_close() code being modified already did this by hand, and so this doesn't change any of the functionality, only makes the SMB2 code match all of the other server code in Samba. Move from using NTTIME variables internally in the server to struct timespec variables, which is what all the other server code uses. Only map to NTTIME as the last step of marshalling the output data. Not following the put_long_date_timespec() convention in the SMB2 create code caused the round_timespec() step to have been missed in that code. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* tests: Add doc exception for spoolss: OSVERSION.Andreas Schneider2014-05-231-1/+2
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri May 23 20:10:49 CEST 2014 on sn-devel-104
* doc-xml: Add documentation for 'spoolss: os_[major|minor|build]' options.Andreas Schneider2014-05-231-0/+47
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* smbd: add missing newline to debug message in daemon_ready()Michael Adam2014-05-231-1/+2
| | | | | | | | | | | Wrap overly long line while touching it anyways. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Fri May 23 04:03:43 CEST 2014 on sn-devel-104
* lib/util: s/daemon/nameStefan Metzmacher2014-05-231-5/+5
| | | | | | | | daemon() is a public function... Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* selftest: use dbwrap_tdb_mutexes:* = yes for "plugin_s4_dc" and "member"Stefan Metzmacher2014-05-222-0/+3
| | | | | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu May 22 23:33:41 CEST 2014 on sn-devel-104
* dbwrap_tdb: Use mutexes on demandVolker Lendecke2014-05-221-0/+19
| | | | | | | | Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* tdb/tools: Allow tdbtool to r/o open mutexed tdbsVolker Lendecke2014-05-221-1/+45
| | | | | | | Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* tdb/tools: add -m option to tdbtortureVolker Lendecke2014-05-221-4/+25
| | | | | | | | This allows tdbtorture to run with mutexes. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* tdb/test: add marklock deadlock testVolker Lendecke2014-05-222-0/+279
| | | | | | | | | Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* tdb/test: add mutex related testsVolker Lendecke2014-05-228-1/+1004
| | | | | | | | | Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* tdb: add TDB_MUTEX_LOCKING supportVolker Lendecke2014-05-2234-21/+1601
| | | | | | | | | | | | | | | | | | | | | | | | This adds optional support for locking based on shared robust mutexes. The caller can use the TDB_MUTEX_LOCKING flag together with TDB_CLEAR_IF_FIRST after verifying with tdb_runtime_check_for_robust_mutexes() that it's supported by the current system. The caller should be aware that using TDB_MUTEX_LOCKING implies some limitations, e.g. it's not possible to have multiple read chainlocks on a given hash chain from multiple processes. Note: that this doesn't make tdb thread safe! Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* tdb: introduce tdb->hdr_ofsVolker Lendecke2014-05-225-39/+146
| | | | | | | | | | | | | | This makes it possible to have some extra headers before the real tdb content starts in the file. This will be used used e.g. to implement locking based on robust mutexes. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* tdb: introduce TDB_SUPPORTED_FEATURE_FLAGSStefan Metzmacher2014-05-224-2/+39
| | | | | | | | | | | | | This will allow to store a feature mask in the tdb header on disk, so that openers can check if they can handle the features other openers are using. Pair-Programmed-With: Volker Lendecke <vl@samba.org> Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* tdb: use asprintf() to simplify tdb_summary()Stefan Metzmacher2014-05-221-7/+6
| | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libreplace: Define PTHREAD_MUTEX_ROBUST along with pthread_mutexattr_setrobustVolker Lendecke2014-05-221-0/+8
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libreplace-waf: Only check for _np functions if standard functions are not ↵Volker Lendecke2014-05-221-8/+14
| | | | | | | | available Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libreplace: Add support for pthread_mutex_consistentVolker Lendecke2014-05-222-2/+17
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libreplace: Add support for pthread_mutexattr_setrobustVolker Lendecke2014-05-222-0/+49
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libreplace: only add PTHREAD CFLAGS and LDFLAGS globally if asked forStefan Metzmacher2014-05-221-2/+3
| | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libreplace: Move thread checks from source3/wscriptVolker Lendecke2014-05-222-32/+32
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* wscript: set conf.env.replace_add_global_pthread = TrueStefan Metzmacher2014-05-221-0/+1
| | | | | | | | | | In Samba we currently add PTHREAD CFLAGS/LDFLAGS globally. The following changes will move the configure checks to lib/replace and the the default of adding the flags globally will change there. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* tdb/test: add UNMAP command to external-agent.cVolker Lendecke2014-05-222-0/+8
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* tdb/test: add PING command to external-agent.cVolker Lendecke2014-05-222-0/+5
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* tdb/test: add shutdown_agent() helper functionVolker Lendecke2014-05-222-6/+21
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* tdb/test: add a "skip()" macro.Stefan Metzmacher2014-05-221-0/+1
| | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* tdb/test: correctly use stderr, not stdout, in fail()Stefan Metzmacher2014-05-221-1/+1
| | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* tdb/tools: explicitly use TDB_NOLOCK in tdbdumpVolker Lendecke2014-05-221-1/+9
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* tdb/tools: add -l option to tdbtoolVolker Lendecke2014-05-222-2/+37
| | | | | | | | This opens the tdb with TDB_NOLOCK. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* tdb/tools: add -l option to tdbbackupVolker Lendecke2014-05-222-5/+25
| | | | | | | | This opens the tdb with TDB_NOLOCK. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Add protocol version to smbstatus outputMathias Dietz2014-05-223-4/+33
| | | | | | | | | Signed-off-by: Mathias Dietz <mdietz@de.ibm.com> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu May 22 18:37:27 CEST 2014 on sn-devel-104
* s4-torture: add print_test_purgeDavid Disseldorp2014-05-221-0/+84
| | | | | | | | | | | This change adds a regression test for print job purging via SetPrinter(SPOOLSS_PRINTER_CONTROL_PURGE). Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu May 22 01:55:39 CEST 2014 on sn-devel-104
* printing: fix purge of all print jobsDavid Disseldorp2014-05-211-4/+19
| | | | | | | | | | | The incorrect (system) jobid is currently passed to the job deletion function. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10612 Reported-by: Franz Pförtsch <franz.pfoertsch@brose.com> Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* provision: Correctly provision the SOA record minimum TTLKai Blin2014-05-212-0/+2
| | | | | | | | | | This fixes bug #10466 Signed-off-by: Kai Blin <kai@samba.org> Reviewed-by: Guenter Kukkukk <kukks@samba.org> Autobuild-User(master): Kai Blin <kai@samba.org> Autobuild-Date(master): Wed May 21 10:55:00 CEST 2014 on sn-devel-104
* bug #10609: CVE-2014-0239 Don't reply to repliesKai Blin2014-05-202-0/+35
| | | | | | | | | | | | | | | | Due to insufficient input checking, the DNS server will reply to a packet that has the "reply" bit set. Over UDP, this allows to send a packet with a spoofed sender address and have two servers DOS each other with circular replies. This patch fixes bug #10609 and adds a test to make sure we don't regress. CVE-2014-2039 has been assigned to this issue. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10609 Signed-off-by: Kai Blin <kai@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Kai Blin <kai@samba.org> Autobuild-Date(master): Tue May 20 04:15:44 CEST 2014 on sn-devel-104
* smbd: fix creation of BUILTIN\{Administrators,Users} when "tdbsam:map ↵Michael Adam2014-05-191-3/+13
| | | | | | | | | | | | | | | | builtin = false" In this case, passdb/group mapping is not responsible for the id mapping of the builtins, so the check whether the SID maps to a unix ID is not valid for checking whether the builtin has been created as a proper group. So this patch changes the check to whether we find the builtin in the group mapping database. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon May 19 16:41:41 CEST 2014 on sn-devel-104
* s4-torture: fix some build warnings in rpc samr test.Günther Deschner2014-05-161-11/+10
| | | | | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Fri May 16 23:48:35 CEST 2014 on sn-devel-104
* s4-torture: fix test_openprinter_wrap fake test result.Günther Deschner2014-05-161-1/+1
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* talloc: version 2.1.1Stefan Metzmacher2014-05-163-1/+71
| | | | | | | | | | | | | | Changes: - documentation updates - a fix for pytalloc-util.pc - performance improvements here and there - fixed compiler warnings Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri May 16 19:51:26 CEST 2014 on sn-devel-104
* talloc/tests: avoid some unused variable warningsStefan Metzmacher2014-05-161-0/+13
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* talloc: fix compiler warningStefan Metzmacher2014-05-161-1/+4
| | | | | | | | | | | | | This avoids the following warning when using: CFLAGS="-O3 -g -fstrict-overflow -Wstrict-overflow=5" ../talloc.c: In Funktion »talloc_is_parent«: ../talloc.c:2658:21: Warnung: assuming signed overflow does not occur when changing X +- C1 cmp C2 to X cmp C1 +- C2 [-Wstrict-overflow] Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>