summaryrefslogtreecommitdiffstats
path: root/source3
Commit message (Collapse)AuthorAgeFilesLines
...
* s3:locking: allow early return for share_entry_forall()Volker Lendecke2014-10-314-36/+49
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:locking: Introduce share_mode_forallVolker Lendecke2014-10-312-28/+68
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:locking: Rename share_mode_forall->share_entry_forallVolker Lendecke2014-10-314-9/+9
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3-libsmb: Make sure the stat structure is initialized.Andreas Schneider2014-10-311-1/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-rpcclient: Make sure current_nt_hash is initialized.Andreas Schneider2014-10-311-1/+3
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:loadparm: fix a comment typoMichael Adam2014-10-301-1/+1
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* Don't drop any error codes just because we think there cannot be any errors ↵root2014-10-301-0/+3
| | | | | | | | | | we didn't think of if the user asked for a level 10 log. Signed-off-by: Richard Sharpe <rsharpe@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Oct 30 09:14:51 CET 2014 on sn-devel-104
* spoolss: remove unused fill_job_info3()David Disseldorp2014-10-301-21/+0
| | | | | | | | | This logic has been moved into the previous EnumJobs(level=3) caller. The info3 structure only contains two fields that are used, so it doesn't make sense to have a separate helper for it. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* spoolss: fix jobid in level 3 EnumJobs responseDavid Disseldorp2014-10-301-23/+33
| | | | | | | | | | | | Until now, these responses have incorrectly carried the printing backend job identifier (sysjob), rather than the one allocated and returned by Samba on job submission. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10905 Reported-by: Franz Pförtsch <franz.pfoertsch@brose.com> Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* spoolss: fix jobid in level 2 GetJob and EnumJobs responsesDavid Disseldorp2014-10-301-14/+36
| | | | | | | | | | | | Until now, these responses have incorrectly carried the printing backend job identifier (sysjob), rather than the one allocated and returned by Samba on job submission. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10905 Reported-by: Franz Pförtsch <franz.pfoertsch@brose.com> Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* spoolss: fix jobid in level 1 GetJob and EnumJobs responsesDavid Disseldorp2014-10-301-12/+36
| | | | | | | | | | | | Until now, these responses have incorrectly carried the printing backend job identifier (sysjob), rather than the one allocated and returned by Samba on job submission. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10905 Reported-by: Franz Pförtsch <franz.pfoertsch@brose.com> Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* spoolss: fix GetJob jobid lookupsDavid Disseldorp2014-10-301-5/+32
| | | | | | | | | | | | Clients issue GetJob requests using the jobid assigned by the spoolss server. The corresponding printing backend (sysjob) identifier needs to be resolved to locate the correct print queue entry. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10905 Reported-by: Franz Pförtsch <franz.pfoertsch@brose.com> Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* printing: add jobid_to_sysjob helper functionDavid Disseldorp2014-10-302-18/+53
| | | | | | | | | | | | Samba needs to deal with two types of print job identifiers, those allocated by the printing backend (sysjob ids), and those allocated by Samba's spoolss server (jobids). This change adds a helper function to map spoolss jobids to sysjob ids, to go alongside the corresponding sysjob to jobid mapping function. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-nmbd: Fix netbios name truncation.Jeremy Allison2014-10-291-8/+68
| | | | | | | | | Try and cope with truncation more intelligently. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10896 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* build: adapt comments for the clustering choiceMichael Adam2014-10-281-3/+1
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* build: further simplify --with-cluster-support case in configureMichael Adam2014-10-281-16/+1
| | | | | | | | includes were only built for the ctdb checks and they are now gone because we are building against included ctdb. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb: Rename CTDB_VERSION to CTDB_PROTOCOLAmitay Isaacs2014-10-283-12/+10
| | | | | | | CTDB_VERSION really is the ctdb protocol version. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org>
* build: Simplify check for building with ctdbAmitay Isaacs2014-10-281-20/+5
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org>
* build: Remove configure checks for ctdb headersAmitay Isaacs2014-10-284-106/+2
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb: Rename ctdb socket variable from CTDB_PATH to CTDB_SOCKETAmitay Isaacs2014-10-282-3/+3
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org>
* build: Remove configure option --with-ctdb-dirAmitay Isaacs2014-10-281-8/+1
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org>
* build: Remove checks for ctdb featuresAmitay Isaacs2014-10-284-209/+0
| | | | | | | | Since we are always building with integrated CTDB, there is no need for these checks. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org>
* build: Remove configure option --enable-old-ctdbAmitay Isaacs2014-10-281-18/+6
| | | | | | | | CTDB source is now part of Samba tree and to enable clustering smbd should be built against included CTDB. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org>
* spoolss: fix handling of bad EnumJobs levelsDavid Disseldorp2014-10-281-1/+6
| | | | | | | | | | | | | | | | | Currently Samba is inconsistent when returning WERR_UNKNOWN_LEVEL errors for spoolss EnumJobs requests - if no print jobs are present, then WERR_OK will be returned, regardless of whether the EnumJobs level is supported or not. This change fixes this behaviour, by catching invalid or unsupported levels prior to the no-jobs response fast-path. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10898 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): Tue Oct 28 03:05:35 CET 2014 on sn-devel-104
* s3-netapi: add DS_8 and WS flags to libnetapi and nltest.Günther Deschner2014-10-243-2/+9
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* nbt-cli: display all known NBT_SERVER flags.Günther Deschner2014-10-241-2/+6
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* messaging3: Fix running down a messaging_contextVolker Lendecke2014-10-241-0/+16
| | | | | | | | | | | | When you do a talloc_free(msg_ctx), existing waiters can't and don't have to clean up behind themselves properly anymore. The msg_ctx the cleanup function refers to is just gone. 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): Fri Oct 24 04:01:32 CEST 2014 on sn-devel-104
* poll_funcs_tevent: Fix a valgrind errorVolker Lendecke2014-10-241-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The valgrind error happened in poll_funcs_tevent_handle_destructor in if (handle->ctx->refcount == 0) handle->ctx was already gone at the time this destructor was called. It happened because during messaging_init the messaging_dgm subsystem was free'ed. The unix_msg context and the poll_funcs_tevent_context are children of messaging_dgm_context. How was poll_funcs_tevent_handle_destructor still called? While working on the new notify subsystem I've added some messaging_read_send tevent_reqs, which register themselves with the dgm_context via messaging_dgm_register_tevent_context. They were not gone yet. When later these were also run down due to another talloc_free somewhere else, this destructor referenced dead memory. This code now protects the poll_funcs_tevent_handle against the poll_funcs_tevent_context going away first with the loop for (h = ctx->handles; h != NULL; h = h->next) { h->ctx = NULL; } in poll_funcs_tevent_context_destructor together with if (handle->ctx == NULL) { return 0; } in poll_funcs_tevent_handle_destructor. A side-effect of this code is that messaging_read_send request won't be satisfied anymore after a reinit_after_fork kicked in. But I think this is the right thing anyway: Every process should register its own message handlers explicitly. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:vfs:aio_pthread: use smbXsrv_connection for ↵Michael Adam2014-10-231-1/+9
| | | | | | | | | | | | | | | | | | | schedule_deferred_open_message_smb This fixes an incompatible pointer warning which uncovered a real bug. This caller was missed when converting the function. This fix is only temporary, since we use fsp->sconn->client->connections which is supposed to be the start of the list of transport connections by a given client treated by this smbd process. Currently there is only one such connection, but with multi-channel there might be more. So we will need to improve this in the future. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Thu Oct 23 23:10:35 CEST 2014 on sn-devel-104
* s3: libsmbclient - smb2. MacOSX 10 SMB2 server doesn't set ↵Jeremy Allison2014-10-231-0/+14
| | | | | | | | | | | STATUS_NO_MORE_FILES when handed a non-wildcard path. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Steve French <smfrench@gmail.com> Tested-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Steve French <sfrench@samba.org> Autobuild-Date(master): Thu Oct 23 20:44:31 CEST 2014 on sn-devel-104
* vfs: fix a typoVolker Lendecke2014-10-211-1/+1
| | | | | | | | 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): Tue Oct 21 04:58:44 CEST 2014 on sn-devel-104
* build: lib/util/string_wrappers.h: fix optimisation check for clangRalph Boehme2014-10-201-5/+21
| | | | | | | | | | | | | | Building with clang resulted in an error with undefined symbols ___unsafe_string_function_usage_here_size_t__ etc. Turns out the existing check whether the compiler optimizes out functions doesn't match the use case, ie the check said yes, but the functions were not optimized out. 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): Mon Oct 20 14:41:09 CEST 2014 on sn-devel-104
* ntlm_auth: Allow the --option parameter to work against ntlm_authAndrew Bartlett2014-10-171-0/+1
| | | | | | | | | Change-Id: Iee386624359c2bf8437719f286e306cdfbb628c6 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri Oct 17 15:20:59 CEST 2014 on sn-devel-104
* ntlm_auth: Allow us to use kerberos when we are an AD DCAndrew Bartlett2014-10-171-1/+1
| | | | | | Change-Id: I88caff9ded915d914cb7fda8829ccbcd3ad64af1 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:libsmb: remove unused cli_set_username() functionStefan Metzmacher2014-10-173-18/+0
| | | | | | Change-Id: Ib432b4ff66f966de9e733e01de6de2f486c0c728 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:libsmb: avoid calling cli_set_username() cliconnect.cStefan Metzmacher2014-10-171-33/+1
| | | | | | Change-Id: I45e44405ea51ecb1aa38c72f4fc6243a1d3d531a Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:libsmb: avoid calling cli_set_username() in clidfsStefan Metzmacher2014-10-171-3/+0
| | | | | | Change-Id: I8b32be8a10d2bff33bb468cc68c98e555b220bde Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:libsmb: avoid cli_set_username() in SMBC_server_internal()Stefan Metzmacher2014-10-171-7/+0
| | | | | | Change-Id: I32e19078a4d4948e405f39dc2a479ff925ad3684 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:lib/netapi: avoid calling cli_set_username()Stefan Metzmacher2014-10-171-3/+1
| | | | | | Change-Id: I3ab768d2df06749187555a16d7b930f7cc8f8b9f Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:torture: avoid unused cli_set_username()Stefan Metzmacher2014-10-171-6/+0
| | | | | | Change-Id: Ia774b256093aff5f2b3338e7827e2d798fb06a96 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:libsmb: Remove unused domain copy stored in cli_stateStefan Metzmacher2014-10-1710-83/+10
| | | | | | Change-Id: I7333140906bb3a487205b5760396dcc00a9f49b0 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:libsmb: Remove unused password copy stored in cli_stateAndrew Bartlett2014-10-179-36/+13
| | | | | | Change-Id: Ia6b33a25628ae08be8a8c6baeb71ce390315cb45 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3-winbindd: use cli_rpc_pipe_open_with_creds()Andrew Bartlett2014-10-171-39/+22
| | | | | | | Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3-librpc: Add cli_rpc_pipe_open_with_creds()Andrew Bartlett2014-10-174-0/+141
| | | | | | | | | | | This provides a credentials-based interface. In the long term, we will want to change this not to reference the credentials, but for now this suits the caller in winbindd_cm.c Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3-winbindd: Use own machine account to connect to trusted domains as wellAndrew Bartlett2014-10-171-6/+11
| | | | | | | | | | | | | This relies on a two-way trust, which we may not have, but is the only secure way to do this. To do this correctly we need to split NETLOGON from normal authentication, as we need to use the machine account for the SMB level, but the inter-domain trust account for the NETLOGON level. Change-Id: Ib93eb6a4d704ef26df8234be7cb71c47ad519c8a Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3-winbindd: use a cli_credentials structure to hold the trust credentialsStefan Metzmacher2014-10-171-207/+395
| | | | | | | | | | | | Later we can pass this down directly and have a much more sane handling of credentials and the spnego handshake. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Change-Id: If12ef0b105d8c7af60190d4eed3c8c07849da2ca Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* libsmb: Print the principal name that we failed to kinit for.Andrew Bartlett2014-10-171-6/+7
| | | | | | | | | | This should aid debugging when this is called from an automated process. Andrew Bartlett Change-Id: I2c7291ab3f67f9f7462d7c52c8c9a4b042f7ec5a Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* passdb: Use common code in cli_credentials_set_machine_account_db_ctx()Andrew Bartlett2014-10-171-16/+50
| | | | | | | | | | | | | | | | | | This avoids some duplication in setting the machine account passsword for the domain member and DC case. This does not yet remove the duplication, that requires a bigger restructure of the various routines used here to obtain the machine and domain trust secrets. Also no longer used is the timeout/2 code to not set the previous password. It is now always passed to the caller. Andrew Bartlett Change-Id: Idd5bafedf4cbac30b174955d743ec4128a6902ee Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:smb2_server: pass xconn->smb2.server.cipher to ↵Stefan Metzmacher2014-10-161-5/+5
| | | | | | | smb2_signing_[de|en]ncrypt_pdu() Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smb2_server: check xconn->smb2.server.cipher instead of ↵Stefan Metzmacher2014-10-163-3/+3
| | | | | | | | | | | xconn->smb2.server.capabilities SMB 3.10 and later won't have SMB2_CAP_ENCRYPTION anymore. xconn->smb2.server.cipher == 0 is the indication that we don't support encryption on the connection. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>