]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
5 years agosmbd: Remove a variable used just once
Volker Lendecke [Thu, 5 Nov 2020 09:39:10 +0000 (10:39 +0100)] 
smbd: Remove a variable used just once

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: Don't set share_mode_lock modified in grant_new_fsp_lease()
Volker Lendecke [Wed, 4 Nov 2020 14:51:51 +0000 (15:51 +0100)] 
smbd: Don't set share_mode_lock modified in grant_new_fsp_lease()

A new lease never triggers a retry. Setting d->modified to true just
triggered the watchers needlessly.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agonet_tdb: Use share_mode_data_dump()
Volker Lendecke [Wed, 4 Nov 2020 14:28:16 +0000 (15:28 +0100)] 
net_tdb: Use share_mode_data_dump()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolocking: Add share_mode_data_dump() accessor function
Volker Lendecke [Wed, 4 Nov 2020 14:27:56 +0000 (15:27 +0100)] 
locking: Add share_mode_data_dump() accessor function

This is a special case for net tdb dump. The alternative would be to
change the net tdb dump behaviour.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agonet_tdb: Use share_mode_filename()
Volker Lendecke [Wed, 4 Nov 2020 14:12:33 +0000 (15:12 +0100)] 
net_tdb: Use share_mode_filename()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agonet_tdb: Use share_mode_servicepath()
Volker Lendecke [Wed, 4 Nov 2020 14:11:40 +0000 (15:11 +0100)] 
net_tdb: Use share_mode_servicepath()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agonet_tdb: Slightly restructure net_tdb_locking()
Volker Lendecke [Wed, 4 Nov 2020 14:09:40 +0000 (15:09 +0100)] 
net_tdb: Slightly restructure net_tdb_locking()

Remove the net_tdb_locking_fetch() subroutine. All of net_tdb_locking() is
still very simple, and net_tdb_locking_fetch() did the fetch as such plus
parsing the hex key. With this restructuring it was possible to avoid a direct
reference to lck->data->id.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: Use share_mode_servicepath() in scavenger.c
Volker Lendecke [Wed, 4 Nov 2020 12:46:02 +0000 (13:46 +0100)] 
smbd: Use share_mode_servicepath() in scavenger.c

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolocking: Add share_mode_servicepath() accessor function
Volker Lendecke [Wed, 4 Nov 2020 12:42:03 +0000 (13:42 +0100)] 
locking: Add share_mode_servicepath() accessor function

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: Avoid share_mode_lock dereference in scavenger
Volker Lendecke [Wed, 4 Nov 2020 12:35:26 +0000 (13:35 +0100)] 
smbd: Avoid share_mode_lock dereference in scavenger

Pass "struct file_id" to callees without accessing share_mode_lock
internals

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: Use share_mode_filename() in scavenger.c
Volker Lendecke [Wed, 4 Nov 2020 12:32:14 +0000 (13:32 +0100)] 
smbd: Use share_mode_filename() in scavenger.c

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbstatus: Use share_mode_filename()
Volker Lendecke [Wed, 4 Nov 2020 12:20:09 +0000 (13:20 +0100)] 
smbstatus: Use share_mode_filename()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolocking: Add share_mode_filename() accessor function
Volker Lendecke [Wed, 4 Nov 2020 12:19:46 +0000 (13:19 +0100)] 
locking: Add share_mode_filename() accessor function

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: Use share_mode_changed_write_time() in smbd/close.c
Volker Lendecke [Wed, 4 Nov 2020 12:00:55 +0000 (13:00 +0100)] 
smbd: Use share_mode_changed_write_time() in smbd/close.c

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: Use share_mode_changed_write_time() in durable_disconnect()
Volker Lendecke [Wed, 4 Nov 2020 11:53:47 +0000 (12:53 +0100)] 
smbd: Use share_mode_changed_write_time() in durable_disconnect()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolocking: Add share_mode_changed_write_time() accessor function
Volker Lendecke [Wed, 4 Nov 2020 11:53:29 +0000 (12:53 +0100)] 
locking: Add share_mode_changed_write_time() accessor function

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: Move setting d->modified=true to reset_share_mode_entry()
Volker Lendecke [Wed, 4 Nov 2020 11:53:03 +0000 (12:53 +0100)] 
smbd: Move setting d->modified=true to reset_share_mode_entry()

This function is only called from
vfs_default_durable_reconnect(). It is really the lower-level routine
that triggers the write of the locking.tdb record.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolocking: Make share_mode_watch_send() take "share_mode_lock"
Volker Lendecke [Tue, 3 Nov 2020 16:36:08 +0000 (17:36 +0100)] 
locking: Make share_mode_watch_send() take "share_mode_lock"

This makes clear that this can only be done under a lock

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: Move "struct share_mode_lock" to share_mode_lock.h
Volker Lendecke [Wed, 4 Nov 2020 10:34:54 +0000 (11:34 +0100)] 
smbd: Move "struct share_mode_lock" to share_mode_lock.h

share_mode_lock.c is where it's created

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: Move share_mode_cleanup_disonnected() to scavenger.c
Volker Lendecke [Tue, 3 Nov 2020 12:25:57 +0000 (13:25 +0100)] 
smbd: Move share_mode_cleanup_disonnected() to scavenger.c

Reduce the complexity of share_mode_lock.c, scavenger.c is the only
user of this routine.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: Give locking/share_mode_lock.c its own header file
Volker Lendecke [Wed, 28 Oct 2020 11:09:39 +0000 (12:09 +0100)] 
smbd: Give locking/share_mode_lock.c its own header file

To me this is then easier to figure out what is defined there, and
where it's exactly used.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: Align integer types
Volker Lendecke [Wed, 4 Nov 2020 10:29:21 +0000 (11:29 +0100)] 
smbd: Align integer types

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agopassdb: Align integer types
Volker Lendecke [Wed, 4 Nov 2020 10:12:59 +0000 (11:12 +0100)] 
passdb: Align integer types

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoauth: Align an integer type
Volker Lendecke [Wed, 4 Nov 2020 10:09:06 +0000 (11:09 +0100)] 
auth: Align an integer type

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agovfs_error_inject: Align integer types
Volker Lendecke [Fri, 30 Oct 2020 14:43:03 +0000 (15:43 +0100)] 
vfs_error_inject: Align integer types

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib: Slightly optimize smb_fname_str_dbg()
Volker Lendecke [Tue, 3 Nov 2020 11:33:12 +0000 (12:33 +0100)] 
lib: Slightly optimize smb_fname_str_dbg()

Don't leak "fname"

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib: Fix a theoretical out-of-bounds write
Volker Lendecke [Fri, 30 Oct 2020 10:04:21 +0000 (11:04 +0100)] 
lib: Fix a theoretical out-of-bounds write

This routine looked fishy: We do cap_vals[num_cap_vals++] = XXX based
on #ifdefs and capabilities. Then later on we did a check that we did
not overwrite the stack. The change I did is to just count the number
of num_cap_vals++, right now it's 5. I know it is in different switch
branches, but with the #ifdefs it's a bit clumsy to read the exact
number of actual num_cap_vals++ that can happen in one run. On debian
buster, cap_val_t is an int, so this is not really wasting too much.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib: Fix a signed/unsigned warning
Volker Lendecke [Fri, 30 Oct 2020 10:02:31 +0000 (11:02 +0100)] 
lib: Fix a signed/unsigned warning

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: Use ISDOT[DOT] in can_delete_directory_fsp()
Volker Lendecke [Wed, 28 Oct 2020 14:40:39 +0000 (15:40 +0100)] 
smbd: Use ISDOT[DOT] in can_delete_directory_fsp()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolocking: Remove an unused anonymous struct reference
Volker Lendecke [Wed, 28 Oct 2020 10:47:49 +0000 (11:47 +0100)] 
locking: Remove an unused anonymous struct reference

This was used in share_mode_do_locked()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib: Move generate_unique_u64_state into generate_unique_u64()
Volker Lendecke [Mon, 26 Oct 2020 10:51:44 +0000 (11:51 +0100)] 
lib: Move generate_unique_u64_state into generate_unique_u64()

Make clear that generate_unique_u64() is the only function referencing
it.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib: talloc: Remove the ALWAYS_REALLOC code paths. talloc-2.3.2
Jeremy Allison [Mon, 9 Nov 2020 19:50:09 +0000 (11:50 -0800)] 
lib: talloc: Remove the ALWAYS_REALLOC code paths.

This is now never set, and also never tested, and only makes
the talloc code more complicated.

Once this is gone we can start looking at the memlimit
stuff.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
5 years agowinbind: alternatively use prama fini for destructors if supported
Björn Jacke [Fri, 30 Oct 2020 11:59:06 +0000 (12:59 +0100)] 
winbind: alternatively use prama fini for destructors if supported

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Nov 10 08:17:53 UTC 2020 on sn-devel-184

5 years agotalloc: alternatively use prama init for constructors if supported
Björn Jacke [Fri, 30 Oct 2020 11:57:42 +0000 (12:57 +0100)] 
talloc: alternatively use prama init for constructors if supported

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agowaf: check for pragma init/fini support for constructors/destructors
Björn Jacke [Fri, 30 Oct 2020 11:55:54 +0000 (12:55 +0100)] 
waf: check for pragma init/fini support for constructors/destructors

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoutil_net: fix a statement not reached warning
Björn Jacke [Mon, 26 Oct 2020 10:30:06 +0000 (11:30 +0100)] 
util_net: fix a statement not reached warning

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoldb_parse_test: studio compiler doesn't like empty struct definitions
Björn Jacke [Mon, 26 Oct 2020 11:49:05 +0000 (12:49 +0100)] 
ldb_parse_test: studio compiler doesn't like empty struct definitions

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoldb_key_value_test: studio compiler doesn't like empty struct definitions
Björn Jacke [Sun, 25 Oct 2020 16:13:57 +0000 (17:13 +0100)] 
ldb_key_value_test: studio compiler doesn't like empty struct definitions

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoldb_kv_index: fix empty initializer compile warning
Björn Jacke [Mon, 19 Oct 2020 00:39:46 +0000 (02:39 +0200)] 
ldb_kv_index: fix empty initializer compile warning

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agotorture/sharemode: fix empty initializer compile warning
Björn Jacke [Mon, 19 Oct 2020 00:35:02 +0000 (02:35 +0200)] 
torture/sharemode: fix empty initializer compile warning

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agopidl: use unused attribute only if supported by feature macro
Björn Jacke [Mon, 19 Oct 2020 00:03:02 +0000 (02:03 +0200)] 
pidl: use unused attribute only if supported by feature macro

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agotdb: fix studio compiler build
Björn Jacke [Thu, 7 Mar 2019 11:50:29 +0000 (12:50 +0100)] 
tdb: fix studio compiler build

Solaris Studio compiler 12.4 is pedantic about prototypes in headers having
the external visibility declarations too. It throws errors like:

redeclaration must have the same or more restrictive linker scoping: ...

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agotalloc/pytalloc: fix studio compler build
Björn Jacke [Sun, 18 Oct 2020 19:55:22 +0000 (21:55 +0200)] 
talloc/pytalloc: fix studio compler build

Solaris Studio compiler 12.4 is pedantic about prototypes in headers having
the external visibility declarations too. It throws errors like:

redeclaration must have the same or more restrictive linker scoping: ...

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agotalloc: fix studio compiler build
Björn Jacke [Wed, 6 Mar 2019 23:40:12 +0000 (00:40 +0100)] 
talloc: fix studio compiler build

Solaris Studio compiler 12.4 is pedantic about prototypes in headers having
the external visibility declarations too. It throws errors like:

redeclaration must have the same or more restrictive linker scoping: ...

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoauth_generic: fix empty initializer compile warning
Björn Jacke [Sun, 18 Oct 2020 19:07:14 +0000 (21:07 +0200)] 
auth_generic: fix empty initializer compile warning

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agohttp_conn.c: fix "void function cannot return value" error
Björn Jacke [Sun, 18 Oct 2020 18:43:26 +0000 (20:43 +0200)] 
http_conn.c: fix "void function cannot return value" error

this made the studio compiler build break

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agodebug: remove a cast, which makes the Solaris Studio compiler unhappy
Björn Jacke [Sun, 18 Oct 2020 18:21:56 +0000 (20:21 +0200)] 
debug: remove a cast, which makes the Solaris Studio compiler unhappy

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

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agowaf: use _POSIX_PTHREAD_SEMANTIC on Solaris
Björn Jacke [Sun, 18 Oct 2020 18:15:36 +0000 (20:15 +0200)] 
waf: use _POSIX_PTHREAD_SEMANTIC on Solaris

Solaris uses POSIX draft function calls by default for a number of functions,
unless you set _POSIX_PTHREAD_SEMANTIC

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoheimdal_build: silence warning: macro redefined
Björn Jacke [Sun, 18 Oct 2020 17:18:34 +0000 (19:18 +0200)] 
heimdal_build: silence warning: macro redefined

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoreplace: define BOOL_DEFINED to fix header yp_prot header check on Solaris
Björn Jacke [Sun, 18 Oct 2020 14:24:08 +0000 (16:24 +0200)] 
replace: define BOOL_DEFINED to fix header yp_prot header check on Solaris

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agowaf/texpect: add required nsl dependency for Solaris
Björn Jacke [Sun, 18 Oct 2020 14:22:55 +0000 (16:22 +0200)] 
waf/texpect: add required nsl dependency for Solaris

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoreplace/waf: fix libnsl checking on Solaris
Björn Jacke [Thu, 7 Mar 2019 12:10:11 +0000 (13:10 +0100)] 
replace/waf: fix libnsl checking on Solaris

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

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agomanpages/vfs_glusterfs: Mention silent skipping of write-behind translator
Anoop C S [Thu, 5 Nov 2020 10:42:09 +0000 (16:12 +0530)] 
manpages/vfs_glusterfs: Mention silent skipping of write-behind translator

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

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Mon Nov  9 13:30:06 UTC 2020 on sn-devel-184

5 years agosefltest: Enable the dcerpc.createtrustrelax test against ad_dc_fips
Andreas Schneider [Fri, 6 Nov 2020 09:13:48 +0000 (10:13 +0100)] 
sefltest: Enable the dcerpc.createtrustrelax test against ad_dc_fips

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Nov  9 10:22:51 UTC 2020 on sn-devel-184

5 years agos4:rpc_server: Allow to use RC4 for creating trusts
Andreas Schneider [Thu, 20 Aug 2020 11:51:39 +0000 (13:51 +0200)] 
s4:rpc_server: Allow to use RC4 for creating trusts

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:rpc_server: Allow to use RC4 for creating trusts
Andreas Schneider [Thu, 20 Aug 2020 11:40:21 +0000 (13:40 +0200)] 
s3:rpc_server: Allow to use RC4 for creating trusts

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos4:rpc_server: Use gnutls_cipher_decrypt() in get_trustdom_auth_blob()
Andreas Schneider [Fri, 6 Nov 2020 13:33:38 +0000 (14:33 +0100)] 
s4:rpc_server: Use gnutls_cipher_decrypt() in get_trustdom_auth_blob()

It doesn't matter for RC4, but just to be correct.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
5 years agos3:rpc_server: Use gnutls_cipher_decrypt() in get_trustdom_auth_blob()
Andreas Schneider [Fri, 6 Nov 2020 13:30:26 +0000 (14:30 +0100)] 
s3:rpc_server: Use gnutls_cipher_decrypt() in get_trustdom_auth_blob()

It doesn't matter for RC4, but just to be correct.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
5 years agos3: spoolss: Make parameters in call to user_ok_token() match all other uses.
Jeremy Allison [Thu, 5 Nov 2020 23:48:08 +0000 (15:48 -0800)] 
s3: spoolss: Make parameters in call to user_ok_token() match all other uses.

We already have p->session_info->unix_info->unix_name, we don't
need to go through a legacy call to uidtoname(p->session_info->unix_token->uid).

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

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 Nov  9 04:10:45 UTC 2020 on sn-devel-184

5 years agotests python krb5: Add python kerberos compatability tests
Gary Lockyer [Wed, 4 Nov 2020 00:58:24 +0000 (13:58 +1300)] 
tests python krb5: Add python kerberos compatability tests

Add new python test to document the differences between the MIT and
Heimdal Kerberos implementations.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoselftest: add heimdal kdc specific known fail
Gary Lockyer [Wed, 4 Nov 2020 00:54:46 +0000 (13:54 +1300)] 
selftest: add heimdal kdc specific known fail

Add a heimdal kerberos specific known fail, will be needed by subsequent
commits.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agolib: talloc: More tests for realloc when used with memlimited pools
Arran Cudbard-Bell [Tue, 20 Oct 2020 19:12:17 +0000 (14:12 -0500)] 
lib: talloc: More tests for realloc when used with memlimited pools

This requires the previous patch.

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

Signed-off-by: Arran Cudbard-Bell <a.cudbardb@freeradius.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agolib: talloc: Fix memlimit on pool realloc.
Jeremy Allison [Tue, 20 Oct 2020 17:52:55 +0000 (10:52 -0700)] 
lib: talloc: Fix memlimit on pool realloc.

We only have to do the memlimit check before any
real malloc or realloc. Allocations out of a
memory pool have already been counted in the
memory limit, so don't check in those cases.

This is an application-visible change (although
fixing a bug) so bump the ABI to 2.3.1 -> 2.3.2.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Arran Cudbard-Bell <a.cudbardb@freeradius.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agolib: talloc: Add more debugging text for existing memlimit + pool tests
Arran Cudbard-Bell [Tue, 20 Oct 2020 19:10:30 +0000 (14:10 -0500)] 
lib: talloc: Add more debugging text for existing memlimit + pool tests

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

Signed-off-by: Arran Cudbard-Bell <a.cudbardb@freeradius.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agolib: talloc: Fix pool object accounting when doing talloc_realloc() in the ALWAYS_REA...
Jeremy Allison [Tue, 20 Oct 2020 19:14:58 +0000 (12:14 -0700)] 
lib: talloc: Fix pool object accounting when doing talloc_realloc() in the ALWAYS_REALLOC compiled case.

tc_alloc_pool() or the fallback malloc can return NULL.

Wait until we know we are returning a valid pointer
before decrementing pool_hdr->object_count due to
reallocing out of the talloc_pool.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agolib: talloc: Cleanup. Use consistent preprocessor logic macros.
Jeremy Allison [Tue, 20 Oct 2020 19:18:10 +0000 (12:18 -0700)] 
lib: talloc: Cleanup. Use consistent preprocessor logic macros.

Match other use of ALWAYS_REALLOC.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agodoc: improve --with-shared-modules documentation
David Disseldorp [Fri, 6 Nov 2020 13:06:32 +0000 (14:06 +0100)] 
doc: improve --with-shared-modules documentation

Remove statement about lack of support. Add description and example for
how to explicitly disable modules via a '!' prefix.

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): Fri Nov  6 20:19:22 UTC 2020 on sn-devel-184

5 years agobuild: put quotes around '!vfs_snapper' module instructions
David Disseldorp [Fri, 6 Nov 2020 13:04:19 +0000 (14:04 +0100)] 
build: put quotes around '!vfs_snapper' module instructions

Otherwise the exclamation may get swallowed by shell, leading to further
confusion.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoRemove source4/scripting/devel/createtrust script
Isaac Boukris [Thu, 5 Nov 2020 13:38:19 +0000 (15:38 +0200)] 
Remove source4/scripting/devel/createtrust script

We now have the 'samba-tool domain trust' command.

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Isaac Boukris <iboukris@samba.org>
Autobuild-Date(master): Fri Nov  6 11:25:02 UTC 2020 on sn-devel-184

5 years agoselftest: add a test for the CreateTrustedDomainRelax wrapper
Isaac Boukris [Tue, 1 Sep 2020 17:14:29 +0000 (20:14 +0300)] 
selftest: add a test for the CreateTrustedDomainRelax wrapper

Originally copied from 'source4/scripting/devel/createtrust'
(had to drop the TRUST_AUTH_TYPE_VERSION part though, as it
fails against samba DC).

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
5 years agoUse the new CreateTrustedDomainRelax()
Isaac Boukris [Thu, 20 Aug 2020 10:49:17 +0000 (12:49 +0200)] 
Use the new CreateTrustedDomainRelax()

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
5 years agoAdd CreateTrustedDomainRelax wrapper for fips mode
Isaac Boukris [Thu, 20 Aug 2020 10:47:12 +0000 (12:47 +0200)] 
Add CreateTrustedDomainRelax wrapper for fips mode

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
5 years agoselftest: add a test for py dce transport_encrypted
Isaac Boukris [Thu, 20 Aug 2020 10:44:08 +0000 (12:44 +0200)] 
selftest: add a test for py dce transport_encrypted

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
5 years agoAdd py binding for dcerpc_transport_encrypted
Isaac Boukris [Thu, 20 Aug 2020 10:35:01 +0000 (12:35 +0200)] 
Add py binding for dcerpc_transport_encrypted

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
5 years agoAdd dcerpc_transport_encrypted()
Isaac Boukris [Thu, 20 Aug 2020 10:18:21 +0000 (12:18 +0200)] 
Add dcerpc_transport_encrypted()

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
5 years agoAdd smb2cli_session_get_encryption_cipher()
Isaac Boukris [Thu, 20 Aug 2020 10:09:05 +0000 (12:09 +0200)] 
Add smb2cli_session_get_encryption_cipher()

When 'session->smb2->should_encrypt' is true, the client MUST encrypt
all transport messages (see also MS-SMB2 3.2.4.1.8).

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
5 years agos4:libnet:py_net - free event context in dealloc fn
Andrew Walker [Mon, 2 Nov 2020 21:42:29 +0000 (16:42 -0500)] 
s4:libnet:py_net - free event context in dealloc fn

Creation of a new Net() object initializes an event context under
a NULL talloc context and then creates a new talloc context as a
child of the event context. The deallocation function for the
net object only frees the child and not the parent. This leaks an
fd for the tevent context and associated memory.

Signed-off-by: Andrew Walker <awalker@ixsystems.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Nov  6 04:58:31 UTC 2020 on sn-devel-184

5 years agoRevert "lookup_name: allow lookup for own realm"
Alexander Bokovoy [Wed, 4 Nov 2020 17:21:24 +0000 (19:21 +0200)] 
Revert "lookup_name: allow lookup for own realm"

This reverts commit f901691209867b32c2d7c5c9274eee196f541654.

Autobuild-User(master): Alexander Bokovoy <ab@samba.org>
Autobuild-Date(master): Thu Nov  5 07:53:03 UTC 2020 on sn-devel-184

5 years agoRevert "cli_credentials: add a helper to parse user or group names"
Alexander Bokovoy [Wed, 4 Nov 2020 17:21:20 +0000 (19:21 +0200)] 
Revert "cli_credentials: add a helper to parse user or group names"

This reverts commit 00f4262ed0b22f6e333e5a29c5590b62c783905c.

5 years agoRevert "cli_credentials_parse_string: fix parsing of principals"
Alexander Bokovoy [Wed, 4 Nov 2020 17:20:58 +0000 (19:20 +0200)] 
Revert "cli_credentials_parse_string: fix parsing of principals"

This reverts commit eb0474d27bae4592b25ac6bf600da29c6a1cb9f8.

5 years agobootstrap: Add Fedora 33
Andreas Schneider [Wed, 4 Nov 2020 15:15:16 +0000 (16:15 +0100)] 
bootstrap: Add Fedora 33

This removes Fedora 31 support.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Nov  5 00:17:55 UTC 2020 on sn-devel-184

5 years agotests python krb5: Add python kerberos canonicalization tests
Gary Lockyer [Mon, 26 Oct 2020 20:32:21 +0000 (09:32 +1300)] 
tests python krb5: Add python kerberos canonicalization tests

Add python canonicalization tests, loosely based on the code in
source4/torture/krb5/kdc-canon-heimdal.c.  The long term goal is to move
the integration level tests out of kdc-canon-heimdal, leaving it as a
heimdal library unit test.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agotests python krb5: Add canonicalize flag to ASN1
Gary Lockyer [Mon, 26 Oct 2020 20:31:24 +0000 (09:31 +1300)] 
tests python krb5: Add canonicalize flag to ASN1

Add the canonicalize flag to KerberosFlags, so that it can be used in
python based canonicalization tests.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agotests python krb5: Make PrincipalName_create a class method
Gary Lockyer [Mon, 26 Oct 2020 20:29:56 +0000 (09:29 +1300)] 
tests python krb5: Make PrincipalName_create a class method

Make PrincipalName_create a class method, so it can be used in helper
classes.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoselftest: add mit kdc specific known fail
Gary Lockyer [Mon, 2 Nov 2020 20:25:48 +0000 (09:25 +1300)] 
selftest: add mit kdc specific known fail

Add a MIT kerberos specific known fail, will be needed by subsequent
commits.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos3-vfs_glusterfs: always disable write-behind translator
Günther Deschner [Mon, 2 Nov 2020 15:10:44 +0000 (16:10 +0100)] 
s3-vfs_glusterfs: always disable write-behind translator

The "pass-through" option has now been merged upstream as of:
https://github.com/gluster/glusterfs/pull/1640

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

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Pair-Programmed-With: Anoop C S <anoopcs@samba.org>
Pair-Programmed-With: Sachin Prabhu <sprabhu@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Nov  4 22:53:49 UTC 2020 on sn-devel-184

5 years agoVFS-License-clarification: minor improvements aligning w/ GPLv3 text
Bradley M. Kuhn [Mon, 26 Oct 2020 21:29:00 +0000 (14:29 -0700)] 
VFS-License-clarification: minor improvements aligning w/ GPLv3 text

The phrase "derived work" and word "derived" don't appear in GPLv3;
instead, GPLv3 uses the phrases "modified version" and "based on" to
implement the strong copyleft clause.  Herein, align the VFS
statement with the phrases as they appear in the GPLv3 since Samba's
license is GPLv3-or-later.

Included are also a few other very minor wording changes as suggested
by legal counsel who is experienced with presenting these sorts of
licensing statements to company lawyers and suggests these changes
will comfort that constituency.

Finally, update both occurrences of the statement in the codebase in
two different files.

Signed-off-by: Bradley M. Kuhn <bkuhn@sfconservancy.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
Reviewed-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibsmb: Remove cli_state->dfs_mountpoint
Volker Lendecke [Sat, 31 Oct 2020 15:48:31 +0000 (16:48 +0100)] 
libsmb: Remove cli_state->dfs_mountpoint

Not used anymore

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): Wed Nov  4 20:17:47 UTC 2020 on sn-devel-184

5 years agolibsmb: Remove "mntpoint" argument from cli_list_trans() callback
Volker Lendecke [Fri, 30 Oct 2020 17:49:52 +0000 (18:49 +0100)] 
libsmb: Remove "mntpoint" argument from cli_list_trans() callback

This was unused in the callers, also do this for symmetry.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibsmb: Remove "mntpoint" argument from cli_list() callback
Volker Lendecke [Mon, 19 Oct 2020 08:09:23 +0000 (10:09 +0200)] 
libsmb: Remove "mntpoint" argument from cli_list() callback

do_list()/do_list_helper() in source3/client/client.c was the only user of this
argument. And that use was wrong.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbclient: Fix recursive "ls" across DFS links
Volker Lendecke [Mon, 19 Oct 2020 07:37:03 +0000 (09:37 +0200)] 
smbclient: Fix recursive "ls" across DFS links

This is an a bit subtle patch: The main trick is that the previous
code a DFS-style \\server\share\dir1\dir2 path ended up in the list of
directories to enumerate. This was then processed by do_list again,
passing it to cli_resolve_path. However, cli_resolve_path always
expects non-DFS style paths as input. This patch passes the original,
non-DFS path to do_list_helper(), so that it ends up without the DFS
style \\server\share prefix in the directory queue.

From general failure it just fails on the SMB1-based environments,
like the other smbclient_s3 ones in knownfail.d/smb1-tests

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbclient: Add "mask" to do_list_helper_state
Volker Lendecke [Sun, 18 Oct 2020 16:39:17 +0000 (18:39 +0200)] 
smbclient: Add "mask" to do_list_helper_state

To me this is simpler to understand than to rely on the cli_list
callback which goes through some function call layers. Also, this
gives more obvious control over what we pass in the next patch.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbclient: Introduce struct do_list_helper_state
Volker Lendecke [Sun, 11 Oct 2020 05:41:01 +0000 (07:41 +0200)] 
smbclient: Introduce struct do_list_helper_state

We'll pass more information to do_list_helper() soon

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbclient: Wrap a few long lines
Volker Lendecke [Sun, 11 Oct 2020 05:35:52 +0000 (07:35 +0200)] 
smbclient: Wrap a few long lines

Make the next patch simpler

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbclient: Move variable declarations closer to their use
Volker Lendecke [Thu, 29 Oct 2020 20:32:21 +0000 (21:32 +0100)] 
smbclient: Move variable declarations closer to their use

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotorture: Show that recursive ls across dfs is broken
Volker Lendecke [Tue, 27 Oct 2020 09:12:51 +0000 (10:12 +0100)] 
torture: Show that recursive ls across dfs is broken

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibsmb: Fix a signed/unsigned warning
Volker Lendecke [Mon, 26 Oct 2020 08:18:57 +0000 (09:18 +0100)] 
libsmb: Fix a signed/unsigned warning

"num_bytes" is uint32_t, "received" is uint16_t. The multiplication
seems to implicitly widen "received" to int, leading to a
signed/unsigned warning. This cast makes that warning go away.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: Align two integer types
Volker Lendecke [Wed, 21 Oct 2020 10:59:29 +0000 (12:59 +0200)] 
smbd: Align two integer types

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibreplace: Compare a pointer against NULL, not 0
Volker Lendecke [Thu, 22 Oct 2020 09:32:29 +0000 (11:32 +0200)] 
libreplace: Compare a pointer against NULL, not 0

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibsmb: Fix a typo
Volker Lendecke [Sat, 31 Oct 2020 16:32:14 +0000 (17:32 +0100)] 
libsmb: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>