summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* ctdb-tests: Change local daemon startup to use ctdbd_wrapperMartin Schwenke2016-03-011-8/+26
| | | | | | | | This uses a configuration file which can be more easily overridden that explicit command-line options. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Simplify handling of public addresses for local daemonsMartin Schwenke2016-03-011-9/+7
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-scripts: Allow configuration file to be overriddenMartin Schwenke2016-03-011-1/+1
| | | | | | | For testing only (so not documented), set CTDBD_CONF. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* lib/util: Add strv_util.[ch] containing new function strv_split()Martin Schwenke2016-03-016-2/+244
| | | | | | | | | strv_split() adds to a strv by splitting a string on separators. Tests included. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org>
* ctdb: Fix detection of gnukfreebsdSteven Chamberlain2016-03-011-1/+1
| | | | | | | | | | GNU/kFreeBSD's platform name is 'gnukfreebsd', not just 'kfreebsd'. Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Autobuild-User(master): Garming Sam <garming@samba.org> Autobuild-Date(master): Tue Mar 1 05:42:23 CET 2016 on sn-devel-144
* lib/util/util.c: move null-check before useAurelien Aptel2016-03-011-5/+1
| | | | | | | | | | | | | | | moves a null pointer check *before* the pointer is used in the strlen() call - still allocate the `fname` array on the stack - still compiles under C90 definition/code mixing rules Signed-off-by: Aurelien Aptel <aaptel@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <rb@sernet.de> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Mar 1 02:25:22 CET 2016 on sn-devel-144
* torture:smb2: fix skip message if share is not CAMichael Adam2016-02-291-1/+1
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture:smb2: skip replay5 test if server does not support persistent handlesMichael Adam2016-02-291-0/+8
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture:smb2: skip replay3 if server does not support Multi-ChannelMichael Adam2016-02-291-0/+8
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/util: Add tests for strv_addn()Martin Schwenke2016-02-291-2/+34
| | | | | | | | | | Also some other minor test cleanups. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Feb 29 15:18:17 CET 2016 on sn-devel-144
* lib/util: Add strv_addn()Volker Lendecke2016-02-292-0/+10
| | | | | | | | strv_addn() adds some number of characters from an existing string. This is useful for parsing. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* Revert "lib/util: Expose strv_addn() for adding string with specified length"Martin Schwenke2016-02-292-4/+4
| | | | | | | | | | | | | | This reverts commit 0c61dd15137b4603bd47b3d6ae18ded6bd18ffae. The intention of strv_addn() is to be able to add some number of characters from an existing string. This implementation carelessly assumes that the old _strv_append() added the trailing NUL to form a valid strv. That's not true. New implementation to follow. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org>
* smbd:smb2_creat: remove outdated TODO commentsMichael Adam2016-02-281-8/+0
| | | | | | | | | | | Leases have meanwhile been implemented and the TODO has been taken care of. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allson <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sun Feb 28 08:16:26 CET 2016 on sn-devel-144
* smbXsrv_client: factor fetch-locking of global record into functionMichael Adam2016-02-281-29/+33
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbXsrv_session: factor fetch-locking of local record into functionMichael Adam2016-02-281-29/+31
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbXsrv_session: factor fetch-locking of global record into functionMichael Adam2016-02-281-36/+33
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbXsrv_tcon: factor fetch-locking of local record into functionMichael Adam2016-02-281-29/+29
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbXsrv_tcon: factor fetch-locking of global record into functionMichael Adam2016-02-281-31/+30
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3/libsmb/clirap2.c: use actual buffer sizeAurelien Aptel2016-02-271-1/+1
| | | | | | | | | | | | data used to be a stack allocated array but was changed to a heap allocated buffer by commit 95a81a3. Update sizeof(data) to data_size. Signed-off-by: Aurelien Aptel <aaptel@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ira Cooper <ira@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Feb 27 05:25:40 CET 2016 on sn-devel-144
* smbXsrv_open: factor fetch-locking of local record into functionMichael Adam2016-02-261-22/+26
| | | | | | | | | | smbXsrv_open_local_fetch_locked() Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Feb 26 22:35:28 CET 2016 on sn-devel-144
* smbXsrv_open: factor fetch-locking of global record into functionMichael Adam2016-02-261-49/+36
| | | | | | | smbXsrv_open_global_fetch_locked() Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/util: Add tests for strvMartin Schwenke2016-02-263-0/+171
| | | | | | | | | | These are blackbox tests against most of the API. It would be possible to write tests that check the internals of the strv are as expected but that probably doesn't add much value. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/util/idtree.c: fix UB by using uint in left-shiftAurelien Aptel2016-02-261-1/+1
| | | | | | | | | Using negative values on the left-side of a left-shift operation is an Undefined Behaviour in C. Signed-off-by: Aurelien Aptel <aaptel@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* selftest: Add a blackbox test for smbgetChristian Ambach2016-02-263-1/+250
| | | | | | | | Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Christian Ambach <ambi@samba.org> Autobuild-Date(master): Fri Feb 26 14:40:55 CET 2016 on sn-devel-144
* selftest: add a helper for the smbget binaryChristian Ambach2016-02-261-0/+1
| | | | | Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* selftest: Reduce code duplicationChristian Ambach2016-02-261-23/+18
| | | | | | | Factor out a createuser sub. Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:utils/smbget fix option parsingChristian Ambach2016-02-261-9/+40
| | | | | | | | | * use proper values for val in poptOption * popt does not support bool, so set them via the switch statement * abort when option parsing reported errors Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* WHATSNEW: document removal of -P in smbgetChristian Ambach2016-02-261-0/+1
| | | | | Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:utils/smbget update manpage with -P option removalChristian Ambach2016-02-261-6/+0
| | | | | Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:utils/smbget remove -P optionChristian Ambach2016-02-261-32/+0
| | | | | | | | as agreed on samba-technical list. It does not really provide a useful function but can cause confusion Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:utils/smbget improve check of write() resultChristian Ambach2016-02-261-4/+6
| | | | | | | check that all bytes in the buffer have been written Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:utils/smbget abort recursive download on errorChristian Ambach2016-02-261-0/+6
| | | | | Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:utils/smbget another int -> bool conversionChristian Ambach2016-02-261-14/+12
| | | | | Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:libads: setup the msDS-SupportedEncryptionTypes attribute on ldap_addStefan Metzmacher2016-02-262-65/+26
| | | | | | | | | | | | | We may not have the permission to modify the object after creation. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11755 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Björn Jacke <bj@sernet.de> Reviewed-by: Günther Deschner <gd@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Feb 26 11:30:03 CET 2016 on sn-devel-144
* ctdb: Drop unnecessary defines of TEVENT_DEPRECATEDMartin Schwenke2016-02-263-7/+0
| | | | | | | | | | | | | These have been scattered around the code so that tevent_loop_allow_nesting() can be called. However, only the main daemon and some tests currently use nested event loops. TEVENT_DEPRECATED is already defined in the places where it is needed. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Fri Feb 26 07:11:29 CET 2016 on sn-devel-144
* vfs_gpfs: Fix compile after change in get_nt_acl_fnChristof Schmitt2016-02-261-9/+12
| | | | | | | | Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Feb 26 01:21:21 CET 2016 on sn-devel-144
* s3/lib/netapi/tests/netuser.c: fix wrong closing parenAurelien Aptel2016-02-251-1/+1
| | | | | | | Signed-off-by: Aurelien Aptel <aaptel@suse.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Revewied-by: Jeremy Allison <jra@samba.org>
* s3/vfs_btrfs.c: use sizeof() instead of ARRAY_SIZE()Aurelien Aptel2016-02-251-1/+1
| | | | | | | | | The `unused` member being set to zero is an uint64_t array. We want the byte size here. Signed-off-by: Aurelien Aptel <aaptel@suse.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: ignore SVHDX create contextUri Simchoni2016-02-251-16/+0
| | | | | | | | | | | | | | | | | | | | | | | According to discussions with dochelp@microsoft.com, an SMB server should ignore an SVHDX_OPEN_DEVICE_CONTEXT or SVHDX_OPEN_DEVICE_CONTEXT_V2 create context if it does not support the RSVD protocol. This is contrary to [MS-SMB2] rev 48.0 which states (3.3.5.9.14) that the open should fail in this case. Failing the create fails Windows backup if the SMB dialect is SMB3.0.2 or higher. Hopefully a new revision of MS-SMB2 will clear this up in the future. Meanwhile, this patch modifies smbd to ignore the SVHDX_OPEN_DEVICE_CONTEXT by default. This can be overriden by a VFS module if a VFS module adds support for RSVD. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11753 Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
* VFS: Modify rmdir to take a const struct smb_filename * instead of const char *Jeremy Allison2016-02-2528-112/+215
| | | | | | | | | | | | | | Preparing to reduce use of lp_posix_pathnames(). Uses the same techniques as commit 616d068f0cebb8e50a855b6e30f36fccb7f5a3c8 (synthetic_smb_fname()) to cope with modules that modify the incoming pathname. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Thu Feb 25 20:46:49 CET 2016 on sn-devel-144
* vfs:ceph: Fix mkdir_fn to take struct smb_filename * insted of char *Jeremy Allison2016-02-251-1/+4
| | | | | | Missed in previous VFS change. Signed-off-by: Jeremy Allison <jra@samba.org>
* vfs:glusterfs: Fix mkdir_fn to take struct smb_filename * instead of char *Jeremy Allison2016-02-251-2/+3
| | | | | | | Missed in previous VFS change. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* lib/util: Expose strv_addn() for adding string with specified lengthMartin Schwenke2016-02-252-4/+4
| | | | | | | | | | | | This is just a rename of previously static function _strv_append(). strv is now more useful for parsing. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Thu Feb 25 13:43:31 CET 2016 on sn-devel-144
* samba-tool: Support preloading multiple usersAndrew Bartlett2016-02-253-22/+133
| | | | | | | | | | Based on patches by Adrian Cochrane Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Feb 25 07:58:55 CET 2016 on sn-devel-144
* python: Allow optional multi-value arguements for samba-tool commandsAndrew Bartlett2016-02-251-2/+3
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* s3: VFS: Modify mkdir to take a const struct smb_filename * instead of const ↵Jeremy Allison2016-02-2422-88/+221
| | | | | | | | | | | | | | | | char * Preparing to reduce use of lp_posix_pathnames(). Uses the same techniques as commit 616d068f0cebb8e50a855b6e30f36fccb7f5a3c8 (synthetic_smb_fname()) to cope with modules that modify the incoming pathname. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org> Autobuild-User(master): Uri Simchoni <uri@samba.org> Autobuild-Date(master): Wed Feb 24 16:05:55 CET 2016 on sn-devel-144
* ctdb-client: Add missing initialisation of calldataAmitay Isaacs2016-02-241-0/+1
| | | | | | | | 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): Wed Feb 24 11:57:23 CET 2016 on sn-devel-144
* ctdb-client: Keep trying to migrate till record lock is obtainedAmitay Isaacs2016-02-241-1/+3
| | | | | | | | | If a record is not on a local node, then it is migrated from remote node. However, before the client can get a lock on the record, it's possible for the record to get migrated away. In that case, repeat migration. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-client: Remove TALLOC_CTX argument from sync functionsAmitay Isaacs2016-02-242-8/+18
| | | | | | | There is no allocated memory returned from these functions. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-client: Add async version of set/remove message handler functionsAmitay Isaacs2016-02-242-0/+197
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>