summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Revert "wafsamba: Fail with error message if perl doesn't provide valid dirs."Michael Adam2014-09-091-39/+19
| | | | | | | | | | | | This reverts commit 2637890ef42a238093f0f3cbdda0d621d5f9b2e2. We are reverting buildtools/wafadmin/Tools/perl.py back to upstream state. Everything special is now in buildtools/wafsamba/samba_perl.py. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* pidl/wscript: remove --with-perl-* optionsStefan Metzmacher2014-09-091-1/+1
| | | | | | | | | These are not needed anymore as we have useful defaults now. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* torture: basic FSCTL_SET_ZERO_DATA testsDavid Disseldorp2014-09-081-0/+180
| | | | | | | | | | | | | | Attempt to punch holes in a file using FSCTL_SET_ZERO_DATA. Check that the resulting data is zeroed. Also confirm that when the file is marked sparse, the zeroed range is no longer allocated. Finally, check that removing the sparse flag causes any holes to be unsparsed. 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): Mon Sep 8 21:40:34 CEST 2014 on sn-devel-104
* torture: add file zero-range checkerDavid Disseldorp2014-09-081-0/+30
| | | | | Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: malformed FSCTL_QUERY_ALLOCATED_RANGES testsDavid Disseldorp2014-09-081-0/+78
| | | | | Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: basic FSCTL_QUERY_ALLOCATED_RANGES testDavid Disseldorp2014-09-081-0/+191
| | | | | | | | Add a test and helper function for FSCTL_QUERY_ALLOCATED_RANGES requests. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: split pattern write into helper functionDavid Disseldorp2014-09-081-17/+38
| | | | | | | | This allows for patterned writes after file creation, as needed for sparse file integrity testing. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: test oversize FSCTL_SET_SPARSE requestDavid Disseldorp2014-09-081-0/+76
| | | | | Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: Correctly initialize array sizeVolker Lendecke2014-09-081-2/+2
| | | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10800 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Sep 8 16:41:51 CEST 2014 on sn-devel-104
* samba-tool: fix reply when zero day pwd expiry is setBjörn Jacke2014-09-081-4/+4
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=10318 Signed-off-by: Bjoern Jacke <bj@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Björn Jacke <bj@sernet.de> Autobuild-Date(master): Mon Sep 8 14:15:51 CEST 2014 on sn-devel-104
* s3: smbd: smb2-sessionsetup. Fix use after free when the sessionsetup ↵Jeremy Allison2014-09-081-0/+6
| | | | | | | | | | request state is freed before struct smbXsrv_session struct. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Mon Sep 8 09:52:23 CEST 2014 on sn-devel-104
* winbindd: Do not use group_list->out.resume_index after freeAndrew Bartlett2014-09-081-2/+3
| | | | | | | | Found by AddressSanitizer Change-Id: I59009144b28c390ddb80b7b3fbb4007dfd16db0e Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
* winbindd: Do not use user_list->out.resume_index after freeAndrew Bartlett2014-09-081-2/+5
| | | | | | | | Found by AddressSanitizer Change-Id: I9f8b95b65de788994a7404fa8889fce45ccb3a30 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
* torture: allow us to correctly use sizeof(buf) in raw.open testsAndrew Bartlett2014-09-081-3/+3
| | | | | | | | | | | | This changes the sizeof(buf) from sizeof(void *), 8 on 64-bit machines, to sizeof("test") (eg 5). Found by AddressSanitizer Andrew Bartlett Change-Id: I01f18b35c041f3b16be9f6da8ae5d1917d7e24d9 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
* s3-lib: Do not walk past the end of the dos_to_ntstatus_map arrayAndrew Bartlett2014-09-081-1/+1
| | | | | | | | Found by AddressSanitizer Change-Id: Ic8b3e2599713c37b11324f9ec2d01891f0f287b9 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
* Use correct size for test string, sizeof() was of the pointerAndrew Bartlett2014-09-081-1/+1
| | | | | | | | Found by AddressSanitizer Change-Id: Ifc9883d958f253df903775544010c0228a102f0f Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
* passdb: Avoid use-after-free when setting a plaintext passwordAndrew Bartlett2014-09-081-2/+3
| | | | | | | | | | | | | | The issue here is that pdb_set_plaintext_passwd() re-used the memory from pdb_get_pw_history() as input We need to free this after we copy and set it. Found by AddressSanitizer Andrew Bartlett Change-Id: I4e148e23ccbbe5444c969ff8f91709791c7696bb Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
* s4-auth: Use sizeof() rather than a fixed constant in memcmp() callAndrew Bartlett2014-09-081-1/+2
| | | | | | Change-Id: I2807cf2af9e4c3282e6ff54a6dd8e90f34e9481f Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
* selftest: Show filename or script we had trouble readingAndrew Bartlett2014-09-081-1/+1
| | | | | | Change-Id: I12c26e807ab0d65031347bc3be609b2e87dcabb5 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
* torture: fix whitespace/tab mixup in internal_torture_run_test()Michael Adam2014-09-081-22/+22
| | | | | | | | | | No diff visible with "git show|diff -w". Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Mon Sep 8 04:21:52 CEST 2014 on sn-devel-104
* script/autobuild.py: remove explicit --with-perl-*-install-dir optionsStefan Metzmacher2014-09-051-6/+3
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Sep 5 22:09:47 CEST 2014 on sn-devel-104
* pidl: remove superfluous "use lib ...".Michael Adam2014-09-051-1/+0
| | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Signed-off-by: Michael Adam <obnox@samba.org>
* pidl: fix the perl module search path (use lib ...) when installing pidl.Michael Adam2014-09-051-1/+1
| | | | | | | | This way, pidl can also run with modules installed under the $prefix. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Signed-off-by: Michael Adam <obnox@samba.org>
* wafsamba: add perl_fixup parameter to INSTALL_FILESMichael Adam2014-09-051-4/+43
| | | | | | | | | | | | | | | | This fixes the search path for modules when installing a perl "binary" by replacing a line 'use lib "$RealBin/lib";' which works for the build directory with the appropriate "use lib" line. This is a step in allowing to install perl modules under the prefix directory again. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:build: don't detect perl in source3/wscript again.Michael Adam2014-09-051-1/+0
| | | | | | This is done in the top level now. Signed-off-by: Michael Adam <obnox@samba.org>
* pidl/wscript: don't check for perl again.Michael Adam2014-09-051-3/+0
| | | | | | | | | | This is done at the toplevel now. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* build: do full SAMBA_CHECK_PERL() check in configureMichael Adam2014-09-051-1/+1
| | | | | | | | | | | ...instead of only checking for the perl binary This autodetects PERL_LIB_INSTALL_DIR and removes the need of the --with-perl-lib-install-dir when using a --prefix!=/usr. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Signed-off-by: Michael Adam <obnox@samba.org>
* wafsamba: add samba_perl.py with SAMBA_CHECK_PERL() higher level check.Michael Adam2014-09-052-0/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This checks for the perl binary, sets PERL and PERL_SPECIFIED as well es the PERL_ARCH_INSTALL_DIR and PERL_LIB_INSTALL_DIR. We want to avoid installing the perl modules outside the prefix. I.e. generally,the perl modules should be installed under "$prefix/share/perl5". This improves the fixes for bug #10472. The new strategy for automatically setting the paths is this: - if the prefix equals perl's vendorprefix, then - PERL_LIB_INSTALL_DIR is set to perl's vendorlib dir - PERL_ARCH_INSTALL_DIR is set to perl's vendorarch dir - otherwise: - PERL_LIB_INSTALL_DIR is set to ${DATADIR}/perl5 (usually ${PREFIX}/share/perl5) - PERL_ARCH_INSTALL_DIR is set to ${LIBDIR}/perl5 (usually ${PREFIX}/lib/perl5) BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* dynconfig: implement PERL_ARCH_INSTALL_DIRMichael Adam2014-09-051-0/+5
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* dynconfig: implement PERL_LIB_INSTALL_DIR.Michael Adam2014-09-051-0/+5
| | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* lib/ldb/wscript: pass dep_vars=['LDB_VERSION'] to SAMBA_GENERATOR()Stefan Metzmacher2014-09-051-2/+1
| | | | | | | bld.add_manual_dependency() only works for files not for environment variables. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* docs-xml/wscript_build: pass dep_vars=bld.dynconfig_varnames() to ↵Stefan Metzmacher2014-09-051-1/+1
| | | | | | | | | SAMBA_GENERATOR() This avoids the use of always=True. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* dynconfig/wscript: add dynconfig_varnames()Stefan Metzmacher2014-09-051-0/+10
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb/wscript: pass dep_vars=['VERSION'] to SAMBA_GENERATOR()Stefan Metzmacher2014-09-051-8/+11
| | | | | | | This avoid the use of always=True. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* wafsamba: let SAMBA_BLDOPTIONS() use dep_vars=['defines'] instead of always=TrueStefan Metzmacher2014-09-051-2/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* wafsamba: fix dependencies on environment variables for python_fixupStefan Metzmacher2014-09-051-4/+1
| | | | | | | | We now checksum the sourcecode of copy_and_fix_python_path() and the env variables used by this function. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* wafsamba: allow an optional dep_vars list to be passed to SAMBA_GENERATOR()Stefan Metzmacher2014-09-051-1/+1
| | | | | | | This can be used to checksum variables used in the rule function. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* wafsamba: fix dependency for SAMBA_GENERATOR() when passing vars!=NoneStefan Metzmacher2014-09-051-4/+5
| | | | | | | | | | | | | | | vars can only be a dictionary as that's the only thing bld.EXPAND_VARIABLES() accepts. We need to checksum the whole vars dictionary into the dependencies. We set task.env.SAMBA_GENERATOR_VARS = vars and add SAMBA_GENERATOR_VARS to the dep_vars. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* wafsamba: fix dependency calculation for SAMBA_GENERATOR()Stefan Metzmacher2014-09-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | We need to checksum the rule as string command of the sourcecode of the python function. This is stored in the 'ruledeps' envariable on the waf Task. See exec_rule() in wafadmin/TaskGen.py. dep_vars = getattr(self, 'dep_vars', ['ruledeps']) if dep_vars: tsk.dep_vars = dep_vars if isinstance(self.rule, str): tsk.env.ruledeps = self.rule else: # only works if the function is in a global module such as a waf tool tsk.env.ruledeps = Utils.h_fun(self.rule) If there's no 'dep_vars' it defaults to ['ruledeps']. As we pass our own 'dep_vars' we need to explicitly add 'ruledeps'. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* wafsamba: improve wording in a commentMichael Adam2014-09-051-1/+1
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* wafsamba: remove unused variable from copy_and_fix_python_pathMichael Adam2014-09-051-2/+0
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* ctdb-call: Drop all deferred requests from older generationAmitay Isaacs2014-09-051-0/+15
| | | | | | | | | | | | Deferring packets has a nasty interaction with recovery. All deferred packets must be dropped when recovery happens, since those packets are tracked as pending requests and will be re-sent with new generation. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Fri Sep 5 09:30:50 CEST 2014 on sn-devel-104
* ctdb-locking: Do not reset real-time priority for lock helpersAmitay Isaacs2014-09-051-2/+0
| | | | | | | | | | When using TDB robust mutexes, the kernel wakes waiting processes one by one, in the priority list order. To ensure that ctdb lock helper processes do not starve, lock helper processes need to run at a higher priority than smbd. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-daemon: Defer all calls when processing dmaster packetsAmitay Isaacs2014-09-053-1/+136
| | | | | | | | | | | When CTDB receives DMASTER_REQUEST or DMASTER_REPLY packet, the specified record needs to be updated as soon as possible to avoid inconsistent dmaster information between nodes. During this time, queue up all calls for that record and process them only after dmaster request/reply has been processed. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-daemon: Remove duplicate code with refactored functionAmitay Isaacs2014-09-052-20/+5
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-common: Refactor code to convert TDB_DATA key to aligned uint32 arrayAmitay Isaacs2014-09-052-0/+20
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-include: Remove declaration of non-existent functionAmitay Isaacs2014-09-051-1/+0
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-locking: Remove unused function ctdb_free_lock_request_contextAmitay Isaacs2014-09-052-12/+0
| | | | | | | | | There is no need for a special function to free lock request and corresponding lock context. Freeing lock request will free lock context also. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-locking: Talloc lock request from client specified contextAmitay Isaacs2014-09-054-18/+34
| | | | | | | | | This makes sure that when the client context is destroyed, the lock request goes away. If the lock requests is already scheduled, then the lock child process will be terminated. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-locking: Run debug locks script only if the node is activeAmitay Isaacs2014-09-051-0/+4
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>