summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* dns: Fix a compile warning by casting explicitlyKai Blin2014-10-302-5/+5
| | | | | Signed-off-by: Kai Blin <kai@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* dbwrap: Avoid "includes.h" in dbwrap_cache.cVolker Lendecke2014-10-301-3/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* dbwrap: Add some required #includes to dbwrap.hVolker Lendecke2014-10-301-0/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: loadparm.h uses TALLOC_CTXVolker Lendecke2014-10-301-0/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* dbwrap: Avoid an unnecessary #includeVolker Lendecke2014-10-301-5/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture/spoolss: cleanup print_job_enum test jobsDavid Disseldorp2014-10-291-0/+10
| | | | | | | | | | | | Purge print queue on startup to ensure that the test is not affected by jobs queued for prior tests. Also, empty the queue at the end of the test to play nice with others. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Oct 29 14:31:52 CET 2014 on sn-devel-104
* 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>
* autobuild: check whether ctdbd has been installed in the samba-ctdb targetMichael Adam2014-10-281-0/+1
| | | | | | | | | | An intermediate test until we have full runtime-tests. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Tue Oct 28 08:05:40 CET 2014 on sn-devel-104
* 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>
* autobuild: adapt samba-ctdb target does not need a separate ctdb build any moreMichael Adam2014-10-281-6/+1
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb: Rename CTDB_VERSION to CTDB_PROTOCOLAmitay Isaacs2014-10-288-21/+19
| | | | | | | 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-282-22/+6
| | | | | 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-285-7/+7
| | | | | 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>
* ctdb-logging: Add logging via UDP logging using RFC5424Martin Schwenke2014-10-284-4/+82
| | | | | | | | Some implementations may not understand RC3164 format messages on the UDP socket, so add support for RFC5424 message format. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-logging: Add logging via UDP to 127.0.0.1:514 to syslog backendMartin Schwenke2014-10-285-8/+98
| | | | | | | | | This has most of the advantages of the old logd with none of the complexity of the extra process. There are several good syslog implementations that can listen on the UDP port. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-logging: Add non-blocking Unix domain logging to syslog backendMartin Schwenke2014-10-284-8/+193
| | | | | | | Format messages as per RFC3164. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-logging: New option CTDB_LOGGING, remove CTDB_LOGFILE, CTDB_SYSLOGMartin Schwenke2014-10-2815-75/+177
| | | | | | | | | | | | Remove --logfile and --syslog daemon options and replace with --logging. Modularise and clean up logging initialisation code. The initialisation API includes an app_name argument that is currently unused - this will be used in extensions to the syslog backend. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-logging: Replace logd code with a basic syslog(3) implementationMartin Schwenke2014-10-284-224/+10
| | | | | | | | | | | | | | It is much simpler for most cases to have a syslog backend that doesn't need a separate CTDB-specific logging daemon. This loses the lossy, non-blocking mode provided by logd. However, a corresponding feature with a completely different implemention (not requiring an extra daemon) will be re-added into the syslog backend. In an ideal world the new implementation would be added first but unfortunately that is hard to do because the logd code is hooked in at more than one place. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-logging: Simplify file logging timestamping with timeval_str_buf()Martin Schwenke2014-10-281-9/+7
| | | | | | | If nothing else, this is slightly more portable. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-logging: Separate out syslog and file logging backendsMartin Schwenke2014-10-287-294/+387
| | | | | | | | | This makes the code cleaner and allows the syslog backend to be easily modified without affecting other code. Also do some extra clean-up, including whitespace fixups. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-logging: Rework debug level parsingMartin Schwenke2014-10-285-49/+59
| | | | | | | | | | | | | Put declarations into ctdb_logging.h, factor out some common code, clean up #includes. Remove the check so see if the 1st character of the debug level is '-'. This is wrong, since it is trying to check for a negative numeric debug level (which is no longer supported) and would need to be handled in the else anyway. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-logging: Remove ctdb element from struct ctdb_log_stateMartin Schwenke2014-10-282-7/+3
| | | | | | | | This is set but otherwise not used. This allows the 1st argument to ctdb_set_logfile() to be generalised to a TALLOC_CTX. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-logging: Remove log member from struct ctdb_contextMartin Schwenke2014-10-282-13/+11
| | | | | | | | | This is only used by logging code and there is already a file-level variable for this. struct ctdb_context already contains too many things. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-logging: Rename ctdb_log_handler() to ctdb_child_log_handler()Martin Schwenke2014-10-281-4/+5
| | | | | | | Now it is obvious that it has something to do with child processes. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-logging: Remove debug levels DEBUG_ALERT and DEBUG_CRITMartin Schwenke2014-10-286-15/+7
| | | | | | | | | | | | | | Internally map them to DEBUG_ERR to limit code churn. This reduces the unwieldy number of debug levels used by CTDB. ALERT and CRIT aren't of much use as separate errors, since everything from ERR up should always be logged. In future just ERR can be used. This also improves compatibility with Samba's debug.c system priority mapping. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-logging: Remove DEBUG_EMERGMartin Schwenke2014-10-286-36/+16
| | | | | | | | | | It isn't used and shouldn't be. CTDB can't make the system unusable. Update associated test to ensure that EMERG isn't attempted. Actually test all remaining debug levels and modernise the test a bit. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-test: Remove unused function check_ctdb_logfile()Martin Schwenke2014-10-281-13/+0
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-logging: Add missing newline when logging to fileMartin Schwenke2014-10-281-1/+1
| | | | | | | This got lost with the transition to the new Samba debug code. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* 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
* torture/spoolss: test EnumJobs with an invalid levelDavid Disseldorp2014-10-281-0/+71
| | | | | | | | This test confirms that EnumJobs WERR_INVALID_LEVEL responses remain consistent with and without the presence of outstanding print jobs. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture/spoolss: add werr_expected arg to EnumJobs helperDavid Disseldorp2014-10-281-6/+12
| | | | | | | | This will allow for the future testing of specific EnumJobs failure cases. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4-dns: Add support for BIND 9.10Amitay Isaacs2014-10-254-2/+36
| | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Matthieu Patou <mat@matws.net> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Sat Oct 25 05:42:19 CEST 2014 on sn-devel-104
* s4-dns: Update dlz_minimal.h based on BIND release 9.10Amitay Isaacs2014-10-251-54/+153
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Matthieu Patou <mat@matws.net>
* s4-dns: Check DLZ_DLOPEN_VERSION for different BIND versionsAmitay Isaacs2014-10-252-14/+10
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Matthieu Patou <mat@matws.net>
* s4-dns: Update template variables, change BIND98 --> BIND9_8Amitay Isaacs2014-10-252-10/+10
| | | | | | | This makes it easier to add suport for BIND 9.10. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Matthieu Patou <mat@matws.net>
* s4-libnet: make it possible to join "off-site".Günther Deschner2014-10-241-1/+2
| | | | | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Fri Oct 24 13:50:30 CEST 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-242-2/+10
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* nbt: the DS_8 flag also shows up in netlogon cldap/mailslot replies.Günther Deschner2014-10-241-0/+1
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* netlogon: add new DS_SERVER_DS_8 flag.Günther Deschner2014-10-241-0/+1
| | | | | | | | | | | This flag indicates the DC runs Windows 2012 or above. See MS-NRPC 2.2.1.2.1 for details. 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>
* pidl-wireshark: SWITCH_TYPE is not always defined, SwitchType() will try to ↵Matthieu Patou2014-10-241-21/+38
| | | | | | | | | | | | find a fallback Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Matthieu Patou <mat@matws.net> Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Oct 24 01:39:16 CEST 2014 on sn-devel-104