]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
5 years agoctdb-recoverd: Drop unnecessary code
Martin Schwenke [Fri, 19 Jan 2018 03:55:21 +0000 (14:55 +1100)] 
ctdb-recoverd: Drop unnecessary code

This has already been done in update_flags().

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14513
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agothird_party: Update gpfs.h to 5.0.5.3 version
Christof Schmitt [Fri, 2 Oct 2020 20:07:37 +0000 (13:07 -0700)] 
third_party: Update gpfs.h to 5.0.5.3 version

4.2.3 went out of support, so update the header file to the oldest
currently supported GPFS version. Going forward, this will allow usage
of newer API calls.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Christof Schmitt <cs@samba.org>
Autobuild-Date(master): Mon Oct  5 20:06:04 UTC 2020 on sn-devel-184

5 years agoRevert "vfs_ceph: drop fdopendir handler"
David Disseldorp [Mon, 5 Oct 2020 10:28:27 +0000 (12:28 +0200)] 
Revert "vfs_ceph: drop fdopendir handler"

This reverts commit 76d7d05b1da6c0703b1c2bade0c4467c7cc1adec.
OpenDir_fsp() no longer falls back to regular open, so this hook is
required.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=14519

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Samuel Cabrero <scabrero@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Mon Oct  5 12:38:34 UTC 2020 on sn-devel-184

5 years agolibcli: Use GUID_to_ndr_buf() in smb2cli_validate_negotiate_info_send()
Volker Lendecke [Tue, 29 Sep 2020 08:55:07 +0000 (10:55 +0200)] 
libcli: Use GUID_to_ndr_buf() in smb2cli_validate_negotiate_info_send()

Avoid a talloc/free

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  2 22:50:43 UTC 2020 on sn-devel-184

5 years agolibcli: Use GUID_to_ndr_buf() in smbXcli_negprot_smb2_subreq()
Volker Lendecke [Tue, 29 Sep 2020 08:53:42 +0000 (10:53 +0200)] 
libcli: Use GUID_to_ndr_buf() in smbXcli_negprot_smb2_subreq()

Avoid a talloc/free

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibcli: Use GUID_to_ndr_buf() in smb2_create_send()
Volker Lendecke [Tue, 29 Sep 2020 08:45:52 +0000 (10:45 +0200)] 
libcli: Use GUID_to_ndr_buf() in smb2_create_send()

Avoid talloc/free

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibcli: Use GUID_to_ndr_buf() in smbcli_push_guid()
Volker Lendecke [Tue, 29 Sep 2020 08:43:29 +0000 (10:43 +0200)] 
libcli: Use GUID_to_ndr_buf() in smbcli_push_guid()

Avoid two talloc/free

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: Use GUID_to_ndr_buf() in fsctl_validate_neg_info()
Volker Lendecke [Tue, 29 Sep 2020 08:20:41 +0000 (10:20 +0200)] 
smbd: Use GUID_to_ndr_buf() in fsctl_validate_neg_info()

Avoid a talloc/free

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: Use GUID_to_ndr_buf() in smbXsrv_client_global_id_to_key()
Volker Lendecke [Tue, 29 Sep 2020 08:17:29 +0000 (10:17 +0200)] 
smbd: Use GUID_to_ndr_buf() in smbXsrv_client_global_id_to_key()

Avoid a talloc/free

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibcli: Use GUID_to_ndr_buf() in ldap_encode_ndr_GUID()
Volker Lendecke [Tue, 29 Sep 2020 08:13:20 +0000 (10:13 +0200)] 
libcli: Use GUID_to_ndr_buf() in ldap_encode_ndr_GUID()

Avoid a talloc/free

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibrpc: Use GUID_to_ndr_buf() in GUID_to_ndr_blob()
Volker Lendecke [Tue, 29 Sep 2020 08:09:48 +0000 (10:09 +0200)] 
librpc: Use GUID_to_ndr_buf() in GUID_to_ndr_blob()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibrpc: Add GUID_to_ndr_buf()
Volker Lendecke [Tue, 29 Sep 2020 07:59:29 +0000 (09:59 +0200)] 
librpc: Add GUID_to_ndr_buf()

Avoids talloc

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agomdssvc: Slightly simplify dalloc_size()
Volker Lendecke [Tue, 29 Sep 2020 10:06:34 +0000 (12:06 +0200)] 
mdssvc: Slightly simplify dalloc_size()

talloc_get_size() and thus talloc_array_length() deals fine with a
NULL pointer

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibcli: Align some integer types
Volker Lendecke [Tue, 29 Sep 2020 07:55:22 +0000 (09:55 +0200)] 
libcli: Align some integer types

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib: Avoid a use of includes.h
Volker Lendecke [Tue, 29 Sep 2020 07:51:48 +0000 (09:51 +0200)] 
lib: Avoid a use of includes.h

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agovfs_fruit: Fix typos
Volker Lendecke [Tue, 29 Sep 2020 15:35:19 +0000 (17:35 +0200)] 
vfs_fruit: Fix typos

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: Use ISDOT/ISDOTDOT instead of strcmp
Volker Lendecke [Tue, 29 Sep 2020 11:04:28 +0000 (13:04 +0200)] 
smbd: Use ISDOT/ISDOTDOT instead of strcmp

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agovfs: Fix a typo
Volker Lendecke [Tue, 29 Sep 2020 10:56:26 +0000 (12:56 +0200)] 
vfs: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotorture3: Fix a cut&paste error in a printf message
Volker Lendecke [Tue, 15 Sep 2020 08:30:37 +0000 (10:30 +0200)] 
torture3: Fix a cut&paste error in a printf message

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agovfs: Fix a typo
Volker Lendecke [Wed, 26 Aug 2020 06:55:30 +0000 (08:55 +0200)] 
vfs: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibcli: Don't leave a pointer uninitialized
Volker Lendecke [Mon, 24 Aug 2020 20:31:01 +0000 (22:31 +0200)] 
libcli: Don't leave a pointer uninitialized

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibcli: Remove a pointless if-expression
Volker Lendecke [Mon, 24 Aug 2020 20:29:19 +0000 (22:29 +0200)] 
libcli: Remove a pointless if-expression

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibads: Improve a debug message
Volker Lendecke [Tue, 18 Aug 2020 07:16:22 +0000 (09:16 +0200)] 
libads: Improve a debug message

"kdc_ip_string" is a multi-line string starting with a tab. It looks
better in the debug message when starting in a new line.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibads: Improve a debug message
Volker Lendecke [Tue, 18 Aug 2020 07:16:22 +0000 (09:16 +0200)] 
libads: Improve a debug message

"kdc_str" is a multi-line string starting with a tab. It looks
better in the debug message when starting in a new line.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agovfs: remove dirfsp arg from SMB_VFS_CREATE_FILE()
Ralph Boehme [Fri, 2 Oct 2020 15:29:58 +0000 (17:29 +0200)] 
vfs: remove dirfsp arg from SMB_VFS_CREATE_FILE()

This was supposed to be a shortcut to avoid passing dirfsp around as an explicit
function argument throughout the whole codebase when the new VFS design idea was
based on using *AT functions throughout the VFS.

Now that we've opted for basing the VFS on handles and *AT functions will only
be used in a much more limitted extent, it makes sense to remove this internal
dirfsp reference, otherwise the combination of internal fsp->dirfsp and
smb_fname->fsp is going to be a tough to wrap your head around.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Oct  2 21:00:05 UTC 2020 on sn-devel-184

5 years agosmbd: remove fsp->dirfsp
Ralph Boehme [Fri, 2 Oct 2020 14:51:16 +0000 (16:51 +0200)] 
smbd: remove fsp->dirfsp

This was supposed to be a shortcut to avoid passing dirfsp around as an explicit
function argument throughout the whole codebase when the new VFS design idea was
based on using *AT functions throughout the VFS.

Now that we've opted for basing the VFS on handles and *AT functions will only
be used in a much more limitted extent, it makes sense to remove this internal
dirfsp reference, otherwise the combination of internal fsp->dirfsp and
smb_fname->fsp is going to be a tough to wrap your head around.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: avoid using dirfsp arg in create_file_default()
Ralph Boehme [Fri, 2 Oct 2020 15:25:33 +0000 (17:25 +0200)] 
smbd: avoid using dirfsp arg in create_file_default()

This is not used anymore in the callees.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agovfs_fruit: avoid using fsp->dirsp
Ralph Boehme [Mon, 22 Jun 2020 13:04:18 +0000 (15:04 +0200)] 
vfs_fruit: avoid using fsp->dirsp

fsp->dirfsp will eventually go away again.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: remove dirfsp arg from create_file_unixpath()
Ralph Boehme [Fri, 2 Oct 2020 14:41:27 +0000 (16:41 +0200)] 
smbd: remove dirfsp arg from create_file_unixpath()

Prepares for removing the dirfsp arg from SMB_VFS_CREATE_FILE() again. In the
future dirfsp has to opened as needed within create_file_unixpath() and below.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: remove dirsp arg from open_directory()
Ralph Boehme [Fri, 2 Oct 2020 14:30:03 +0000 (16:30 +0200)] 
smbd: remove dirsp arg from open_directory()

Prepares for removing the dirfsp arg from SMB_VFS_CREATE_FILE() again. In the
future open_directory() will open the dirfsp itself.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: remove dirfsp arg from mkdir_internal()
Ralph Boehme [Tue, 23 Jun 2020 12:10:21 +0000 (14:10 +0200)] 
smbd: remove dirfsp arg from mkdir_internal()

Prepares for removing the dirfsp arg from SMB_VFS_CREATE_FILE() again. In the
future mkdir_internal() will open the dirfsp itself as needed.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agovfs_fruit: use VFS ftruncate function in fruit_ftruncate_rsrc_adouble()
Ralph Boehme [Tue, 29 Sep 2020 09:15:10 +0000 (11:15 +0200)] 
vfs_fruit: use VFS ftruncate function in fruit_ftruncate_rsrc_adouble()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: switch caller of fd_openat() to fd_open()
Ralph Boehme [Wed, 30 Sep 2020 14:26:29 +0000 (16:26 +0200)] 
smbd: switch caller of fd_openat() to fd_open()

fd_openat() was added to be used with real dirfsp, but after adding pathref fd
support we will never use this.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agovfs_fruit: ensure the buffer passed to file_lines_parse() is 0-terminated
Ralph Boehme [Thu, 6 Aug 2020 10:55:33 +0000 (12:55 +0200)] 
vfs_fruit: ensure the buffer passed to file_lines_parse() is 0-terminated

Otherwise valgrind complains...

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4/torture: use unique filename for torture_samba3_hide() test
Ralph Boehme [Wed, 16 Sep 2020 13:40:36 +0000 (15:40 +0200)] 
s4/torture: use unique filename for torture_samba3_hide() test

The filename "test.txt" is also used by other tests and without O_PATH the file
can't be removed at the end of this tests: open_smb_fname_fsp() fails with
ACCESS_DENIED because the POSIX mode of the file is 0000 and become_root() used
in the #ifndef O_PATH fallback case doesn't work in CI.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agovfs_default: realign vfswrap_fgetxattr() args
Ralph Boehme [Wed, 10 Jun 2020 14:01:18 +0000 (16:01 +0200)] 
vfs_default: realign vfswrap_fgetxattr() args

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agovfs: add and use vfs_fake_fd()
Ralph Boehme [Thu, 23 Jul 2020 05:32:11 +0000 (07:32 +0200)] 
vfs: add and use vfs_fake_fd()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agobuild: remove smbd_conn private library
Ralph Boehme [Sun, 27 Sep 2020 06:52:58 +0000 (08:52 +0200)] 
build: remove smbd_conn private library

This is not needed anymore since 6822baa2920f30374ec84363497d97e24f359fab.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agopython2 reduction: Merge remaining compat code into common
David Mulder [Fri, 11 Sep 2020 20:29:46 +0000 (14:29 -0600)] 
python2 reduction: Merge remaining compat code into common

The remaining compat code (get_string, get_bytes,
cmp) are useful helper routines which we should
simply merge into common (especially since there
is some duplication here).

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): David Mulder <dmulder@samba.org>
Autobuild-Date(master): Fri Oct  2 14:49:36 UTC 2020 on sn-devel-184

5 years agopython: Move dsdb_Dn to samdb
David Mulder [Mon, 14 Sep 2020 17:12:37 +0000 (11:12 -0600)] 
python: Move dsdb_Dn to samdb

The import dsdb needed for dsdb_Dn causes import
errors when trying to import get_bytes/get_string
in some places.

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agoFix build after removal of an extra safe_string.h
Alexander Bokovoy [Thu, 1 Oct 2020 12:22:12 +0000 (15:22 +0300)] 
Fix build after removal of an extra safe_string.h

Move of strcasecmp redefine to lib/util/safe_string.h in
https://gitlab.com/samba-team/samba/-/merge_requests/1507 broke build on
Fedora 33 with GCC 10.2.1 for those compilation units that use
ldb_att_cmp().

The reason for that is that ldb_attr_cmp() defined as

   #define ldb_attr_cmp(a, b) strcasecmp(a, b)

because attribute names restricted to be ASCII by RFC2251 (LDAPv3 spec).

A solution is to add

   #undef strcasecmp

to all source code files which use ldb_attr_cmp().

Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Oct  1 22:45:29 UTC 2020 on sn-devel-184

5 years agos3: smbd: Remove the ignored last parameter 'bool *p_last_component_contains_wcard...
Jeremy Allison [Wed, 30 Sep 2020 00:22:10 +0000 (17:22 -0700)] 
s3: smbd: Remove the ignored last parameter 'bool *p_last_component_contains_wcard' from check_path_syntax_internal().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
5 years agosamba-tool tests: rename 'contact create' to 'contact add'
Jule Anger [Thu, 27 Aug 2020 07:20:11 +0000 (09:20 +0200)] 
samba-tool tests: rename 'contact create' to 'contact add'

Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Thu Oct  1 02:44:09 UTC 2020 on sn-devel-184

5 years agodoc: rename 'contact create' to 'contact add'
Jule Anger [Wed, 26 Aug 2020 13:10:11 +0000 (15:10 +0200)] 
doc: rename 'contact create' to 'contact add'

And add 'contact create' as synonym for 'contact add'.

Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agosamba-tool contact: rename 'contact create' to 'contact add'
Jule Anger [Wed, 26 Aug 2020 13:07:40 +0000 (15:07 +0200)] 
samba-tool contact: rename 'contact create' to 'contact add'

Keep 'contact create' for compatibility reasons.

Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agosamba-tool tests: rename 'group create' to 'group add'
Jule Anger [Thu, 27 Aug 2020 07:27:12 +0000 (09:27 +0200)] 
samba-tool tests: rename 'group create' to 'group add'

Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agodoc: add 'group create' as synonym for 'group add'
Jule Anger [Wed, 26 Aug 2020 13:11:16 +0000 (15:11 +0200)] 
doc: add 'group create' as synonym for 'group add'

Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agosamba-tool group: add 'group create' as synonym for 'group add'
Jule Anger [Wed, 26 Aug 2020 13:07:16 +0000 (15:07 +0200)] 
samba-tool group: add 'group create' as synonym for 'group add'

Add 'group create' command for a symmetric set of
samba-tool subcommands

Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agosamba-tool tests: rename 'computer create' to 'computer add'
Jule Anger [Thu, 27 Aug 2020 07:29:51 +0000 (09:29 +0200)] 
samba-tool tests: rename 'computer create' to 'computer add'

Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agodoc: rename 'computer create' to 'computer add'
Jule Anger [Wed, 26 Aug 2020 13:08:58 +0000 (15:08 +0200)] 
doc: rename 'computer create' to 'computer add'

And add 'computer create' as synonym for 'computer add'.

Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agosamba-tool computer: rename 'computer create' to 'computer add'
Jule Anger [Wed, 26 Aug 2020 13:06:47 +0000 (15:06 +0200)] 
samba-tool computer: rename 'computer create' to 'computer add'

Keep 'computer create' for compatibility reasons.

Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agosamba-tool tests: rename 'user create' to 'user add'
Jule Anger [Thu, 27 Aug 2020 07:19:37 +0000 (09:19 +0200)] 
samba-tool tests: rename 'user create' to 'user add'

Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agodoc: rename 'user create' to 'user add'
Jule Anger [Wed, 26 Aug 2020 13:13:12 +0000 (15:13 +0200)] 
doc: rename 'user create' to 'user add'

And add 'user create' as synonym for 'user add'.

Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agosamba-tool user: rename 'user create' to 'user add'
Jule Anger [Wed, 26 Aug 2020 13:03:58 +0000 (15:03 +0200)] 
samba-tool user: rename 'user create' to 'user add'

Keep 'user create' for compatibility reasons.

Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agosamba-tool tests: rename 'ou create' to 'ou add'
Jule Anger [Thu, 27 Aug 2020 07:25:44 +0000 (09:25 +0200)] 
samba-tool tests: rename 'ou create' to 'ou add'

Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agodoc: rename 'ou create' to 'ou add'
Jule Anger [Wed, 26 Aug 2020 13:12:02 +0000 (15:12 +0200)] 
doc: rename 'ou create' to 'ou add'

And add 'ou create' as synonym for 'ou add'.

Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agosamba-tool ou: rename 'ou create' to 'ou add'
Jule Anger [Wed, 26 Aug 2020 13:08:21 +0000 (15:08 +0200)] 
samba-tool ou: rename 'ou create' to 'ou add'

Keep 'ou create' for compatibility reasons.

Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agosamba-tool tests: add test-cases for 'contact rename'
Jule Anger [Fri, 14 Aug 2020 10:26:11 +0000 (12:26 +0200)] 
samba-tool tests: add test-cases for 'contact rename'

Tests the following options:
 --surname
 --given-name
 --initials
 --force-new-cn
 --reset-cn
 --display-name
 --mail-address

Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agodoc: add samba-tool contact rename command to samba-tool man page
Jule Anger [Fri, 14 Aug 2020 10:25:45 +0000 (12:25 +0200)] 
doc: add samba-tool contact rename command to samba-tool man page

Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agosamba-tool contact: add new contact 'rename' command
Jule Anger [Fri, 14 Aug 2020 10:25:10 +0000 (12:25 +0200)] 
samba-tool contact: add new contact 'rename' command

Usage: samba-tool contact rename <contactname> [options]

Rename a contact and related attributes.

This command allows to set the contact's name related attributes.

Use an empty attribute value to remove the specified attribute.

The contactname specified on the command is the CN.

Example1:
samba-tool contact rename "John Doe" --surname=Bloggs \\
    --force-new-cn=John

Example1 shows how to change the surname ('sn' attribute) of a contact
'John Doe' to 'Bloggs' and change the CN to 'John' on the local server.

Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agosamba-tool tests: add test-cases for 'group rename'
Jule Anger [Thu, 6 Aug 2020 13:41:11 +0000 (15:41 +0200)] 
samba-tool tests: add test-cases for 'group rename'

Tests the following options:
 --samaccountname
 --force-new-cn
 --reset-cn
 --mail-address

Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agodoc: add samba-tool group rename command to samba-tool man page
Jule Anger [Thu, 6 Aug 2020 13:40:43 +0000 (15:40 +0200)] 
doc: add samba-tool group rename command to samba-tool man page

Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agosamba-tool group: add new group 'rename' command
Jule Anger [Thu, 6 Aug 2020 13:39:54 +0000 (15:39 +0200)] 
samba-tool group: add new group 'rename' command

Usage: samba-tool group rename <groupname> [options]

Rename a group and related attributes.

This command allows to set the group's name related attributes.

Use an empty attribute value to remove the specified attribute.

The groupname specified on the command is the sAMAccountName.

Example1:
samba-tool group rename employees --samaccountname=staff

Example1 shows how to change the sAMAaccountName of a group 'employees' to
'staff' on the local server.

Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agosamba-tool tests: add test-cases for 'user rename'
Jule Anger [Thu, 6 Aug 2020 13:26:13 +0000 (15:26 +0200)] 
samba-tool tests: add test-cases for 'user rename'

Tests the following options:
--surname
--given-name
--initials
--force-new-cn
--reset-cn
--display-name
--mail-address
--samaccountname
--upn

Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agodoc: add samba-tool user rename command to samba-tool man page
Jule Anger [Thu, 6 Aug 2020 13:25:13 +0000 (15:25 +0200)] 
doc: add samba-tool user rename command to samba-tool man page

Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agosamba-tool user: add new user 'rename' command
Björn Baumbach [Mon, 15 Jun 2020 18:12:02 +0000 (20:12 +0200)] 
samba-tool user: add new user 'rename' command

Usage: samba-tool user rename <username> [options]

Rename a user and related attributes.

This command allows to set the user's name related attributes. The user's
CN will be renamed automatically.
The user's new CN will be made up by combining the given-name, initials
and surname. A dot ('.') will be appended to the initials automatically.
Use the --force-new-cn option to specify the new CN manually.

The username specified on the command is the sAMAccountName.

Example1:
samba-tool user rename johndoe --surname='Bloggs'

Example1 shows how to change the surname of a user 'johndoe' to 'Bloggs' on
the local server. The user's CN will be renamed automatically, based on
the given name, initials and surname.

Pair-Programmed-With: Jule Anger <ja@sernet.de>

Signed-off-by: Björn Baumbach <bb@sernet.de>
Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agotestsuite: add test suite for samba-tool contact commands
Jule Anger [Fri, 21 Aug 2020 06:43:17 +0000 (08:43 +0200)] 
testsuite: add test suite for samba-tool contact commands

Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agosamdb: add fullname_from_names() method
Jule Anger [Mon, 24 Aug 2020 14:39:01 +0000 (16:39 +0200)] 
samdb: add fullname_from_names() method

Add a method to construct the fullname, using the given name, the initials
and the surname.
If one of this values is empty, try to use the old one, given by an
attributs set.
If the combination is empty, the method will return the fallback-default
parameter.

Use this method to construct the CN or the displayName of users or
contacts.

Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agosamdb: add prepare_attr_replace() method
Jule Anger [Mon, 24 Aug 2020 14:34:35 +0000 (16:34 +0200)] 
samdb: add prepare_attr_replace() method

Add a method to prepare a given Message to replace the given attribute.
If the given new value is None or the old value and the new value are
the same, do nothing.
If the new value is empty, prepare to replace the given attribute with
[].
Else prepare to replace the given attribute with the new value.

Use this for samdb.modify(msg).

Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agoautobuild: Merge no-modules test with the library --disable-python build
Andrew Bartlett [Fri, 11 Sep 2020 01:36:22 +0000 (13:36 +1200)] 
autobuild: Merge no-modules test with the library --disable-python build

This avoids another full compile cycle.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agoautobuild: Remove more "make install" steps
Andrew Bartlett [Fri, 11 Sep 2020 01:00:14 +0000 (13:00 +1200)] 
autobuild: Remove more "make install" steps

Running a "make install" involves a full re-link which takes quite some time
we really only need to test this in a couple of basic combinations, so remove
from a few more targets.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years ago.gitlab-ci.yml: Remove echo of (incorrect due previous commit) command
Andrew Bartlett [Fri, 11 Sep 2020 00:40:09 +0000 (12:40 +1200)] 
.gitlab-ci.yml: Remove echo of (incorrect due previous commit) command

The command is now echoed by the gitlab interface now anyway,
so avoid having to keep these in sync.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agoautobuild: Remove the os.getpid() from the autobuild directory
Andrew Bartlett [Thu, 10 Sep 2020 23:22:10 +0000 (11:22 +1200)] 
autobuild: Remove the os.getpid() from the autobuild directory

This might help our CI runners get a ccache hit by keeping the path constant.

Otherwise, we only get a good ccache hit rate if the docker container gives
us the same pid each time.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agoselftest: Move some more tests from the samba-o3 job
Andrew Bartlett [Thu, 10 Sep 2020 23:05:19 +0000 (11:05 +1200)] 
selftest: Move some more tests from the samba-o3 job

These tests do not need to be repeated over and over on multiple
distributions.  This just wastes CI resources.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years ago.gitlab-ci.yml: Set interuptable: true
Andrew Bartlett [Thu, 10 Sep 2020 22:47:25 +0000 (10:47 +1200)] 
.gitlab-ci.yml: Set interuptable: true

This should reduce some CI costs, avoiding spending CPU time on jobs that are
already out of date because a new branch has been pushed.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agobuild: Remove Python2 handling in SAMBA_CHECK_PYTHON_HEADERS()
Andrew Bartlett [Thu, 10 Sep 2020 23:05:58 +0000 (11:05 +1200)] 
build: Remove Python2 handling in SAMBA_CHECK_PYTHON_HEADERS()

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agobuild: Remove Python2 support from the build
Andrew Bartlett [Thu, 10 Sep 2020 22:40:59 +0000 (10:40 +1200)] 
build: Remove Python2 support from the build

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14488

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agoautobuild.py: Combine samba-static and samba-nopython
Andrew Bartlett [Thu, 10 Sep 2020 22:35:58 +0000 (10:35 +1200)] 
autobuild.py: Combine samba-static and samba-nopython

We expect these will complete in under an hour and reduce the number of
parallel jobs.  Hopefully there will be some ccache hits between these
as well.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agos3: smbd: Remove unused check_path_syntax_wcard().
Jeremy Allison [Wed, 30 Sep 2020 00:18:59 +0000 (17:18 -0700)] 
s3: smbd: Remove unused check_path_syntax_wcard().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Sep 30 22:08:01 UTC 2020 on sn-devel-184

5 years agos3: smbd: Remove unused 'bool *ppath_contains_wcard' parameter from parse_dfs_path().
Jeremy Allison [Wed, 30 Sep 2020 00:14:22 +0000 (17:14 -0700)] 
s3: smbd: Remove unused 'bool *ppath_contains_wcard' parameter from parse_dfs_path().

check_path_syntax_wcard() is now unused.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: smbd: Implement the 'allow_wcards' parameter inside parse_dfs_path().
Jeremy Allison [Wed, 30 Sep 2020 00:11:47 +0000 (17:11 -0700)] 
s3: smbd: Implement the 'allow_wcards' parameter inside parse_dfs_path().

Previously this didn't actually restrict wildcards here, as check_path_syntax_wcard()
returns the fact there was a wildcard in the last component, but doesn't
return an error. Just use check_path_syntax() instead and check
for wildcards separately.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: smbd: Remove wrapper resolve_dfspath_wcard(). Just call dfs_redirect() directly.
Jeremy Allison [Tue, 29 Sep 2020 21:24:10 +0000 (14:24 -0700)] 
s3: smbd: Remove wrapper resolve_dfspath_wcard(). Just call dfs_redirect() directly.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: smbd: Remove unused 'bool *ppath_contains_wcard' parameter from dfs_redirect()
Jeremy Allison [Tue, 29 Sep 2020 21:21:08 +0000 (14:21 -0700)] 
s3: smbd: Remove unused 'bool *ppath_contains_wcard' parameter from dfs_redirect()

resolve_dfspath_wcard() is now a tranparent wrapper for dfs_redirect().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: smbd: Remove unused 'bool *ppath_contains_wcard' parameter from resolve_dfspath_w...
Jeremy Allison [Tue, 29 Sep 2020 21:17:35 +0000 (14:17 -0700)] 
s3: smbd: Remove unused 'bool *ppath_contains_wcard' parameter from resolve_dfspath_wcard()

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: smbd: Remove the 'bool *ppath_contains_wcard' parameter from filename_convert_int...
Jeremy Allison [Tue, 29 Sep 2020 21:12:41 +0000 (14:12 -0700)] 
s3: smbd: Remove the 'bool *ppath_contains_wcard' parameter from filename_convert_internal()

It's always ignored.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: smbd: The only caller of filename_convert_with_privilege() passes in NULL for...
Jeremy Allison [Tue, 29 Sep 2020 21:09:55 +0000 (14:09 -0700)] 
s3: smbd: The only caller of filename_convert_with_privilege() passes in NULL for the 'bool *ppath_contains_wcard' parameter.

Remove it.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: smbd: All callers to filename_convert() pass in NULL for the 'bool *ppath_contain...
Jeremy Allison [Tue, 29 Sep 2020 21:08:09 +0000 (14:08 -0700)] 
s3: smbd: All callers to filename_convert() pass in NULL for the 'bool *ppath_contains_wcard' parameter.

Remove it.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: smbd: As srvstr_get_path_internal() ignores the wcard parameter, use check_path_s...
Jeremy Allison [Wed, 30 Sep 2020 00:16:26 +0000 (17:16 -0700)] 
s3: smbd: As srvstr_get_path_internal() ignores the wcard parameter, use check_path_syntax() instead of check_path_syntax_wcard()

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: smbd: Rename srvstr_get_path_wcard_internal() -> srvstr_get_path_internal().
Jeremy Allison [Tue, 29 Sep 2020 21:01:57 +0000 (14:01 -0700)] 
s3: smbd: Rename srvstr_get_path_wcard_internal() -> srvstr_get_path_internal().

It now does nothing with wildcards.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: smbd: All callers to srvstr_get_path_wcard_internal() pass 'ignore' as the last...
Jeremy Allison [Tue, 29 Sep 2020 21:01:01 +0000 (14:01 -0700)] 
s3: smbd: All callers to srvstr_get_path_wcard_internal() pass 'ignore' as the last parameter.

Move it internal to srvstr_get_path_wcard_internal().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: smbd: Remove the wrapper srvstr_get_path_req_wcard().
Jeremy Allison [Tue, 29 Sep 2020 20:58:22 +0000 (13:58 -0700)] 
s3: smbd: Remove the wrapper srvstr_get_path_req_wcard().

Rename srvstr_get_path_req_wcard() -> srvstr_get_path_req()
as it no longer gets ward status.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: smbd: Remove srvstr_get_path_wcard() - no longer used.
Jeremy Allison [Tue, 29 Sep 2020 20:51:46 +0000 (13:51 -0700)] 
s3: smbd: Remove srvstr_get_path_wcard() - no longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: smbd: srvstr_get_path_wcard_posix() is no longer used.
Jeremy Allison [Tue, 29 Sep 2020 20:48:57 +0000 (13:48 -0700)] 
s3: smbd: srvstr_get_path_wcard_posix() is no longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: smbd: smb_file_rename_information() doesn't need to use the wildcard status of...
Jeremy Allison [Tue, 29 Sep 2020 20:47:08 +0000 (13:47 -0700)] 
s3: smbd: smb_file_rename_information() doesn't need to use the wildcard status of the destination.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: smbd: SMB1 call_nt_transact_rename() never needs wcard bool.
Jeremy Allison [Tue, 29 Sep 2020 20:44:15 +0000 (13:44 -0700)] 
s3: smbd: SMB1 call_nt_transact_rename() never needs wcard bool.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: smbd: SMB1 reply_copy(). Use srvstr_get_path_req() not srvstr_get_path_req_wcard()
Jeremy Allison [Tue, 29 Sep 2020 20:26:02 +0000 (13:26 -0700)] 
s3: smbd: SMB1 reply_copy(). Use srvstr_get_path_req() not srvstr_get_path_req_wcard()

Now we check the wildcard status elsewhere. Don't pass to filename_convert() either.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: smbd: SMB1 reply_copy() - set the xxx_has_wild flags from the processed names.
Jeremy Allison [Tue, 29 Sep 2020 20:24:29 +0000 (13:24 -0700)] 
s3: smbd: SMB1 reply_copy() - set the xxx_has_wild flags from the processed names.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: smbd: SMB1 reply_mv() no longer needs the XX_has_wcard variables.
Jeremy Allison [Tue, 29 Sep 2020 20:09:52 +0000 (13:09 -0700)] 
s3: smbd: SMB1 reply_mv() no longer needs the XX_has_wcard variables.

Use srvstr_get_path_req() not srvstr_get_path_req_wcard().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: smbd: SMB1 rename_internals() can figure out the wildcard status of the paths...
Jeremy Allison [Tue, 29 Sep 2020 20:08:01 +0000 (13:08 -0700)] 
s3: smbd: SMB1 rename_internals() can figure out the wildcard status of the paths by itself.

No need to pass them as parameters.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: smbd: SMB1 reply_unlink() - use srvstr_get_path_req() not srvstr_get_path_req_wcard()
Jeremy Allison [Tue, 29 Sep 2020 19:32:02 +0000 (12:32 -0700)] 
s3: smbd: SMB1 reply_unlink() - use srvstr_get_path_req() not srvstr_get_path_req_wcard()

Now unlink_internals() checks its own wildcard on the mask.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>