]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
4 years agodrs_utils: remove unused sendRemoveDsServer()
Douglas Bagnall [Wed, 18 Nov 2020 23:43:01 +0000 (12:43 +1300)] 
drs_utils: remove unused sendRemoveDsServer()

The only caller of this was `samba-tool domain demote` which stopped
using it in 2015 with commit f121173cbf46fe64746d73adf40015c43d5c55fc.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
4 years agopython: remove unused provision.check_install()
Douglas Bagnall [Wed, 18 Nov 2020 23:23:45 +0000 (12:23 +1300)] 
python: remove unused provision.check_install()

Unused for at last 10 years.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
4 years agosamba-tool gpo: use common attr_default
Douglas Bagnall [Wed, 18 Nov 2020 22:24:47 +0000 (11:24 +1300)] 
samba-tool gpo: use common attr_default

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
4 years agosamba-tool drs: move attr_default to common
Douglas Bagnall [Wed, 18 Nov 2020 22:24:25 +0000 (11:24 +1300)] 
samba-tool drs: move attr_default to common

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
4 years agosamba-tool pso uses common timestamp functions
Douglas Bagnall [Wed, 18 Nov 2020 22:20:35 +0000 (11:20 +1300)] 
samba-tool pso uses common timestamp functions

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
4 years agosamba-tool domain: move timestamp functions to common
Douglas Bagnall [Wed, 18 Nov 2020 22:19:04 +0000 (11:19 +1300)] 
samba-tool domain: move timestamp functions to common

Other tools use identical functions, and they too can use common.py

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
5 years agos4:torture:smb2: remove unused fallback defines in oplock.c
Stefan Metzmacher [Mon, 7 Dec 2020 11:06:11 +0000 (12:06 +0100)] 
s4:torture:smb2: remove unused fallback defines in oplock.c

F_SETLEASE/F_SETSIG were all included in the kernel
and glibc in 2002, there's no need to have fallbacks 18 years later.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Dec  7 20:07:18 UTC 2020 on sn-devel-184

5 years agos3:smbd: remove unused fallback defines in oplock_linux.c
Stefan Metzmacher [Mon, 7 Dec 2020 11:06:11 +0000 (12:06 +0100)] 
s3:smbd: remove unused fallback defines in oplock_linux.c

F_GETLEASE/F_SETLEASE/F_SETSIG were all included in the kernel
and glibc in 2002, there's no need to have fallbacks 18 years later.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3/wscript: only check for F_SETLEASE being available at compile time
Stefan Metzmacher [Mon, 7 Dec 2020 10:38:59 +0000 (11:38 +0100)] 
s3/wscript: only check for F_SETLEASE being available at compile time

F_GETLEASE/F_SETLEASE are available (at least) since Linux 2.4.0 from
2002.

We also should not have the configure check depend on the filesystem
we find at build time. It's very common that the build-environment is
much more restricted than the runtime-environment will be.

As a history we had this check on Samba 3.6:

 AC_CACHE_CHECK([for Linux kernel oplocks],samba_cv_HAVE_KERNEL_OPLOCKS_LINUX,[
 AC_TRY_RUN([
 #include <sys/types.h>
 #include <fcntl.h>
 #ifndef F_GETLEASE
 #define F_GETLEASE 1025
 #endif
 main() {
        int fd = open("/dev/null", O_RDONLY);
        return fcntl(fd, F_GETLEASE, 0) == -1;
 }
 ],
 samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes,samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no,samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross)])
 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
    AC_DEFINE(HAVE_KERNEL_OPLOCKS_LINUX,1,[Whether to use linux kernel oplocks])
 fi

which didn't depend on the filesystem.

Then we got a broken check introduced in Samba 4.0 (a copy of the
F_NOTIFY check):

 # Check for Linux kernel oplocks
 conf.CHECK_CODE('''
 #include <sys/types.h>
 #include <fcntl.h>
 #include <signal.h>
 #ifndef F_NOTIFY
 #define F_NOTIFY 1026
 #endif
 main() {
         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
 }''', 'HAVE_KERNEL_OPLOCKS_LINUX', addmain=False, execute=True,
        msg="Checking for Linux kernel oplocks")

this got "fixed" in Samba 4.7 (and backports to 4.6, 4.5 and 4.4) into

 # Check for Linux kernel oplocks
 conf.CHECK_CODE('''
 #include <sys/types.h>
 #include <fcntl.h>
 #include <signal.h>
 #ifndef F_GETLEASE
 #define F_GETLEASE 1025
 #endif
 main() {
         exit(fcntl(open("/tmp", O_RDONLY), F_GETLEASE, 0) == -1 ?  1 : 0);
 }''', 'HAVE_KERNEL_OPLOCKS_LINUX', addmain=False, execute=True,
        msg="Checking for Linux kernel oplocks")

Lately it became dependend on the filesystem in the build-environment:

 # Check for Linux kernel oplocks
 conf.CHECK_CODE('''
 #include <sys/types.h>
 #include <fcntl.h>
 #include <signal.h>
 #ifndef F_GETLEASE
 #define F_GETLEASE 1025
 #endif
 main() {
       const char *fname="/tmp/oplock-test.txt";
       int fd = open(fname, O_RDWR|O_CREAT, 0644);
       int ret = fcntl(fd, F_SETLEASE, F_WRLCK);
       unlink(fname);
       return (ret == -1) ? 1 : 0;
 }''', 'HAVE_KERNEL_OPLOCKS_LINUX', addmain=False, execute=True,
        msg="Checking for Linux kernel oplocks")

Now we just check for F_SETLEASE being available in linux/fcntl.h.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3/wscript: remove unused check for F_NOTIFY
Stefan Metzmacher [Mon, 7 Dec 2020 10:24:43 +0000 (11:24 +0100)] 
s3/wscript: remove unused check for F_NOTIFY

There're no references to F_NOTIFY nor HAVE_KERNEL_CHANGE_NOTIFY in the
code, so the configure check is not needed at all.

We only use the inotify or fam abstractions.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4/samba: call force_check_log_size() in standard_new_task()
Ralph Boehme [Thu, 26 Nov 2020 14:24:44 +0000 (15:24 +0100)] 
s4/samba: call force_check_log_size() in standard_new_task()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14248
RN: samba process does not honor max log size

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): Mon Dec  7 18:54:29 UTC 2020 on sn-devel-184

5 years agos4/samba: call force_check_log_size() in standard_accept_connection()
Ralph Boehme [Thu, 26 Nov 2020 14:24:26 +0000 (15:24 +0100)] 
s4/samba: call force_check_log_size() in standard_accept_connection()

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4/samba: call force_check_log_size() in prefork_reload_after_fork()
Ralph Boehme [Thu, 26 Nov 2020 14:23:58 +0000 (15:23 +0100)] 
s4/samba: call force_check_log_size() in prefork_reload_after_fork()

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

Signed-off-by: Ralph Boehme <slow@samba.org>
5 years agos4: call reopen_logs_internal() in the SIGHUP handler of the prefork process model
Ralph Boehme [Mon, 23 Nov 2020 15:44:04 +0000 (16:44 +0100)] 
s4: call reopen_logs_internal() in the SIGHUP handler of the prefork process model

With debug_schedule_reopen_logs() the actual reopen only takes place at some
point in the future when a DEBUG message is processed.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4: replace low-level SIGUP handler with a tevent handler
Ralph Boehme [Fri, 20 Nov 2020 14:21:03 +0000 (15:21 +0100)] 
s4: replace low-level SIGUP handler with a tevent handler

Replace the low-level signal handler for SIGHUP with a nice tevent signal
handler. The low-level handler sig_hup() installed by setup_signals() remains
being used during early startup before a tevent context is available.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4: install tevent tracing hooks to trigger logfile rotation
Ralph Boehme [Thu, 26 Nov 2020 13:21:58 +0000 (14:21 +0100)] 
s4: install tevent tracing hooks to trigger logfile rotation

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4: add samba server tevent trace helper stuff
Ralph Boehme [Mon, 23 Nov 2020 16:53:57 +0000 (17:53 +0100)] 
s4: add samba server tevent trace helper stuff

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agodebug: detect logrotation by checking inode number
Ralph Boehme [Mon, 23 Nov 2020 15:04:03 +0000 (16:04 +0100)] 
debug: detect logrotation by checking inode number

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agodebug: pass struct debug_class *config to do_one_check_log_size()
Ralph Boehme [Mon, 23 Nov 2020 14:51:09 +0000 (15:51 +0100)] 
debug: pass struct debug_class *config to do_one_check_log_size()

Pass a pointer to the struct instead of all struct members individually. No
change in behaviour.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agodebug: pass struct debug_class *config to reopen_one_log()
Ralph Boehme [Mon, 23 Nov 2020 14:46:47 +0000 (15:46 +0100)] 
debug: pass struct debug_class *config to reopen_one_log()

Pass a pointer to the struct instead of all struct members individually. No
change in behaviour.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoloadparm: setup debug subsystem setting max_log_size from config
Ralph Boehme [Fri, 13 Nov 2020 11:34:50 +0000 (12:34 +0100)] 
loadparm: setup debug subsystem setting max_log_size from config

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoWHATSNEW.txt: fix version to 4.14
Stefan Metzmacher [Sat, 5 Dec 2020 21:19:07 +0000 (22:19 +0100)] 
WHATSNEW.txt: fix version to 4.14

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sat Dec  5 22:35:04 UTC 2020 on sn-devel-184

5 years agosmbd: Remove "have_share_modes" from "struct share_mode_data"
Volker Lendecke [Thu, 3 Dec 2020 16:16:25 +0000 (17:16 +0100)] 
smbd: Remove "have_share_modes" from "struct share_mode_data"

Nobody in share_mode_lock.c looked at that value anymore, so we don't
need to manually maintain it.

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 Dec  4 22:32:38 UTC 2020 on sn-devel-184

5 years agosmbd: Simplify share_mode_entry_do()
Volker Lendecke [Thu, 3 Dec 2020 16:12:20 +0000 (17:12 +0100)] 
smbd: Simplify share_mode_entry_do()

Rely on the truth in locking.tdb wrt existence of share entries

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: Remove a comment that was not helpful for me
Volker Lendecke [Thu, 3 Dec 2020 16:03:32 +0000 (17:03 +0100)] 
smbd: Remove a comment that was not helpful for me

Also avoid an "else" branch

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: Simplify share_mode_lock_destructor()
Volker Lendecke [Thu, 3 Dec 2020 16:02:10 +0000 (17:02 +0100)] 
smbd: Simplify share_mode_lock_destructor()

Rely on the truth in the database whether we found share modes or
not, share_mode_data_store() has that information for free.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: Remove unused share_mode_have_entries()
Volker Lendecke [Thu, 3 Dec 2020 15:23:58 +0000 (16:23 +0100)] 
smbd: Remove unused share_mode_have_entries()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: Simplify open_mode_check()
Volker Lendecke [Thu, 3 Dec 2020 15:18:25 +0000 (16:18 +0100)] 
smbd: Simplify open_mode_check()

The call to share_mode_have_entries() was put in before
fresh_share_mode_lock() initialized d->flags to be completely
permissive. With that correct initialization the call to
share_conflict() a few lines down will also make open_mode_check()
pass for any share_access/access_mask.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: Simplify share_mode_memcache_fetch()
Volker Lendecke [Tue, 1 Dec 2020 12:50:32 +0000 (13:50 +0100)] 
smbd: Simplify share_mode_memcache_fetch()

Take a struct file_id instead of a locking.tdb key,
share_mode_memcache_store() also operates on the implicit fid in
struct share_mode_data.

To do this, parse_share_modes() also needs to take file_id.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agobuild: Fix kernel oplock test
Volker Lendecke [Fri, 20 Nov 2020 13:19:21 +0000 (14:19 +0100)] 
build: Fix kernel oplock test

In a pure docker environment with overlayfs F_GETLEASE works on /tmp,
but F_SETLEASE does not. This test now correctly detects that.

The effect is that the samba-fileserver environment would run fine in
a shared gitlab runner, at the price of not testing kernel oplocks. We
could move the kernel oplock tests to another environment that for
other reasons can't run on shared gitlab runners.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: Align integer types
Volker Lendecke [Tue, 1 Dec 2020 12:27:11 +0000 (13:27 +0100)] 
smbd: Align integer types

full_path_tos() return ssize_t

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agospoolssd: Align integer types
Volker Lendecke [Thu, 3 Dec 2020 15:23:39 +0000 (16:23 +0100)] 
spoolssd: Align integer types

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoclitar: Align integer types
Volker Lendecke [Wed, 2 Dec 2020 10:13:11 +0000 (11:13 +0100)] 
clitar: Align integer types

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib: Align integer types
Volker Lendecke [Mon, 30 Nov 2020 12:39:15 +0000 (13:39 +0100)] 
lib: Align integer types

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3: smbd: Quiet log messages from usershares for an unknown share.
Jeremy Allison [Wed, 2 Dec 2020 19:47:02 +0000 (11:47 -0800)] 
s3: smbd: Quiet log messages from usershares for an unknown share.

No need to log missing shares/sharenames at debug level zero.

Keep the debug level zero for all other usershare problems.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Rowland penny <rpenny@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Dec  4 20:54:06 UTC 2020 on sn-devel-184

5 years agovfs_zfsacl: add missing inherited flag on hidden "magic" everyone@ ACE
Ralph Boehme [Mon, 30 Nov 2020 11:28:58 +0000 (12:28 +0100)] 
vfs_zfsacl: add missing inherited flag on hidden "magic" everyone@ ACE

This was an omission in the fixes for bug 14470.

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

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): Tue Dec  1 20:29:34 UTC 2020 on sn-devel-184

5 years agovfs_zfsacl: reformatting
Ralph Boehme [Mon, 30 Nov 2020 11:28:00 +0000 (12:28 +0100)] 
vfs_zfsacl: reformatting

No change in behaviour.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoselftest: Remove samba3.blackbox.smbclient_tar from flapping tests
Noel Power [Mon, 30 Nov 2020 09:21:50 +0000 (09:21 +0000)] 
selftest: Remove samba3.blackbox.smbclient_tar from flapping tests

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

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoclitar: Use do_list()'s recursion in clitar.c
Volker Lendecke [Tue, 1 Dec 2020 07:58:14 +0000 (08:58 +0100)] 
clitar: Use do_list()'s recursion in clitar.c

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Aurelien Aptel <aaptel@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
5 years agos3/script/tests: Ensure all remote test files are removed
Jeremy Allison [Mon, 30 Nov 2020 17:19:29 +0000 (17:19 +0000)] 
s3/script/tests: Ensure all remote test files are removed

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
5 years agos3/script/tests: call smbclient deltree to remove remote files
Noel Power [Mon, 30 Nov 2020 10:41:57 +0000 (10:41 +0000)] 
s3/script/tests: call smbclient deltree to remove remote files

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

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3/script/tests: Make smb_client 'die' behaviour configurable
Noel Power [Mon, 30 Nov 2020 10:18:32 +0000 (10:18 +0000)] 
s3/script/tests: Make smb_client 'die' behaviour configurable

smb_client behaviour is to die if there is an error. This is
a little heavy handed and make it impossible for example to
use smb_client to run a command that might fail (where such
a failure isn't really an error) E.G. Calling deltree and
the directory doesn't exist

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

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3/script/tests: Remove make_path (for remote dir)
Noel Power [Mon, 30 Nov 2020 09:59:58 +0000 (09:59 +0000)] 
s3/script/tests: Remove make_path (for remote dir)

LOCALPATH is actually the local path to the share, we should
not need to create the share path (it should already exist)

Note: When we remove the tree located at LOCALPATH we keep the root
      so the share path should always be there

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

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoselftest: make samba3.blackbox.smbclient_tar runnable (even manually)
Noel Power [Mon, 30 Nov 2020 11:15:06 +0000 (11:15 +0000)] 
selftest: make samba3.blackbox.smbclient_tar runnable (even manually)

samba3.blackbox.smbclient_tar is marked as flapping so it
seems we have missed that it has stopped working. The local path
passed to script/tests/test_smbclient_tarmode.pl must point to a
valid share

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

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3/script/tests: Fix samba3.blackbox.smbclient_tarmode cleanup
Noel Power [Mon, 30 Nov 2020 17:39:25 +0000 (17:39 +0000)] 
s3/script/tests: Fix samba3.blackbox.smbclient_tarmode cleanup

Make sure samba3.blackbox.smbclient_tarmode removes data files
not just before running the test but also after

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

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3/script: Use smbclient deltree to clean up smbclient_tarmode subdir
Noel Power [Fri, 27 Nov 2020 15:52:27 +0000 (15:52 +0000)] 
s3/script: Use smbclient deltree to clean up smbclient_tarmode subdir

Replace rm -rf of local dir (that is hosted remotely)
with smbclient deltree

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

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3/script/tests: Use tarmode share for samba3.blackbox.smbclient_tar*
Noel Power [Fri, 27 Nov 2020 15:33:26 +0000 (15:33 +0000)] 
s3/script/tests: Use tarmode share for samba3.blackbox.smbclient_tar*

After this change both samba3.blackbox.smbclient_tar &
samba3.blackbox.smbclient_tarmode now use the same dedicated share

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

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3/script/test: Use different testdir for samba3.blackbox.smbclient_tarmode
Noel Power [Fri, 27 Nov 2020 15:25:21 +0000 (15:25 +0000)] 
s3/script/test: Use different testdir for samba3.blackbox.smbclient_tarmode

The other tarmode torture test samba3.blackbox.smbclient_tar now uses a share
'tarmode' which uses the same source path as samba3.blackbox.smbclient_tarmode

Avoid conflicting paths and use a new subdir (of the test share) called
'smbclient_tarmode'

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

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoselftest: Add a new tarmode shares
Noel Power [Thu, 26 Nov 2020 17:31:50 +0000 (17:31 +0000)] 
selftest: Add a new tarmode shares

samba3.blackbox.smbclient_tar & samba3.blackbox.smbclient_tar
need separate shares with own xattr tdb(s)

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

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3/script/tests: Fix 'Unrecognized option(s) passed to mkpath()' error
Noel Power [Fri, 27 Nov 2020 12:01:49 +0000 (12:01 +0000)] 
s3/script/tests: Fix 'Unrecognized option(s) passed to mkpath()' error

'keep_root' is an unrecognised option for make_path/mkpath

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

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotest: Fix the FreeBSD build
Volker Lendecke [Thu, 26 Nov 2020 13:30:36 +0000 (14:30 +0100)] 
test: Fix the FreeBSD build

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): Mon Nov 30 23:48:02 UTC 2020 on sn-devel-184

5 years agosmbd: Fix the 32-bit build on FreeBSD
Volker Lendecke [Thu, 26 Nov 2020 13:23:24 +0000 (14:23 +0100)] 
smbd: Fix the 32-bit build on FreeBSD

log->rec_index is not size_t, it's uint64_t

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agowbinfo: Align some integer types
Volker Lendecke [Thu, 26 Nov 2020 13:18:20 +0000 (14:18 +0100)] 
wbinfo: Align some integer types

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib: Change make_file_id_from_itime() prototype
Volker Lendecke [Mon, 23 Nov 2020 14:37:44 +0000 (15:37 +0100)] 
lib: Change make_file_id_from_itime() prototype

SMB_STRUCT_STAT is defined in includes.h. This way including file_id.h
is possible without including includes.h

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotorture: Align integer types
Volker Lendecke [Mon, 23 Nov 2020 15:15:34 +0000 (16:15 +0100)] 
torture: Align integer types

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibsmb: Slightly beautify internal_resolve_name()
Volker Lendecke [Tue, 24 Nov 2020 20:22:55 +0000 (21:22 +0100)] 
libsmb: Slightly beautify internal_resolve_name()

We have "goto done;" at the end of every if-branch, we don't need
else.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibsmb: Move a variable closer to its use in internal_resolve_name()
Volker Lendecke [Tue, 24 Nov 2020 20:24:34 +0000 (21:24 +0100)] 
libsmb: Move a variable closer to its use in internal_resolve_name()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosamldb: Align two integer types
Volker Lendecke [Wed, 25 Nov 2020 15:33:32 +0000 (16:33 +0100)] 
samldb: Align two integer types

ARRAY_SIZE is size_t

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotest: smbtorture3's OPLOCK5 test only available with kernel oplocks
Volker Lendecke [Thu, 26 Nov 2020 08:56:50 +0000 (09:56 +0100)] 
test: smbtorture3's OPLOCK5 test only available with kernel oplocks

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibsmb: Align integer types
Volker Lendecke [Mon, 23 Nov 2020 11:27:38 +0000 (12:27 +0100)] 
libsmb: Align integer types

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agowinbind: Align integer types
Volker Lendecke [Sat, 21 Nov 2020 12:02:28 +0000 (13:02 +0100)] 
winbind: Align integer types

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibcli: Align integer types
Volker Lendecke [Sat, 14 Nov 2020 15:31:09 +0000 (16:31 +0100)] 
libcli: Align integer types

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibrpc: talloc_stackframe() panics on failure
Volker Lendecke [Sat, 14 Nov 2020 09:16:57 +0000 (10:16 +0100)] 
librpc: talloc_stackframe() panics on failure

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibrpc: Make ep_register a bit easier to understand
Volker Lendecke [Sat, 14 Nov 2020 09:15:33 +0000 (10:15 +0100)] 
librpc: Make ep_register a bit easier to understand

I found the pointer dereference a bit confusing

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibrpc: Fix a talloc_stackframe() leak
Volker Lendecke [Sat, 14 Nov 2020 09:12:20 +0000 (10:12 +0100)] 
librpc: Fix a talloc_stackframe() leak

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibcli: Align a few integer types
Volker Lendecke [Sun, 29 Nov 2020 17:25:07 +0000 (18:25 +0100)] 
libcli: Align a few integer types

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agodocs: Fix "async dns timeout" manpage entry
Volker Lendecke [Sun, 29 Nov 2020 12:06:34 +0000 (13:06 +0100)] 
docs: Fix "async dns timeout" manpage entry

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoloadparm: Simplify lp_get_async_dns_timeout()
Volker Lendecke [Sun, 29 Nov 2020 12:05:02 +0000 (13:05 +0100)] 
loadparm: Simplify lp_get_async_dns_timeout()

Use MAX, and per README.Coding we don't need the intermediate
variable. This can be inspected in the debugger directly.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agodsgetdcname: Fix talloc hierarchy
Volker Lendecke [Fri, 27 Nov 2020 21:00:10 +0000 (22:00 +0100)] 
dsgetdcname: Fix talloc hierarchy

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotests python krb5: Extra canonicalization tests
Gary Lockyer [Wed, 18 Nov 2020 01:49:28 +0000 (14:49 +1300)] 
tests python krb5: Extra canonicalization tests

Add tests that set the server name to the client name for the machine
account in the kerberos AS_REQ.  This replicates the TEST_AS_REQ_SELF
test phase in source4/torture/krb5/kdc-canon-heimdal.c.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Nov 30 05:21:42 UTC 2020 on sn-devel-184

5 years agovfs_glusterfs: print exact cmdline for disabling write-behind translator
Günther Deschner [Tue, 24 Nov 2020 14:38:41 +0000 (15:38 +0100)] 
vfs_glusterfs: print exact cmdline for disabling write-behind translator

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

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Fri Nov 27 17:15:07 UTC 2020 on sn-devel-184

5 years agodocs-xml: Add a section about weak crypto in testparm manpage
Andreas Schneider [Fri, 27 Nov 2020 10:22:15 +0000 (11:22 +0100)] 
docs-xml: Add a section about weak crypto in testparm manpage

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Nov 27 13:48:20 UTC 2020 on sn-devel-184

5 years agos4: rename source4/smbd/ to source4/samba/
Ralph Boehme [Fri, 20 Nov 2020 14:27:17 +0000 (15:27 +0100)] 
s4: rename source4/smbd/ to source4/samba/

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Nov 27 10:07:18 UTC 2020 on sn-devel-184

5 years agosamba-tool: Give better error information when the 'domain backup restore' fails...
Andrew Bartlett [Fri, 13 Nov 2020 02:26:07 +0000 (15:26 +1300)] 
samba-tool: Give better error information when the 'domain backup restore' fails with a duplicate SID

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Autobuild-User(master): Gary Lockyer <gary@samba.org>
Autobuild-Date(master): Thu Nov 26 21:15:40 UTC 2020 on sn-devel-184

5 years agos3:libsmb: Return early if dir is NULL
Andreas Schneider [Wed, 25 Nov 2020 12:01:46 +0000 (13:01 +0100)] 
s3:libsmb: Return early if dir is NULL

This makes sure we do not dereference a NULL poineter.

Found by covscan.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Nov 26 11:07:09 UTC 2020 on sn-devel-184

5 years agos3:mdssd: Fix creating binding string for error message
Andreas Schneider [Wed, 25 Nov 2020 11:55:56 +0000 (12:55 +0100)] 
s3:mdssd: Fix creating binding string for error message

Found by covscan.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos3:lsasd: Fix creating binding string for error message
Andreas Schneider [Wed, 25 Nov 2020 11:55:24 +0000 (12:55 +0100)] 
s3:lsasd: Fix creating binding string for error message

Found by covscan.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos3:spoolssd: Fix creating binding string for error message
Andreas Schneider [Wed, 25 Nov 2020 10:46:05 +0000 (11:46 +0100)] 
s3:spoolssd: Fix creating binding string for error message

Found by covscan.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agowinexe: Fix a possible null pointer derference
Andreas Schneider [Wed, 25 Nov 2020 10:38:01 +0000 (11:38 +0100)] 
winexe: Fix a possible null pointer derference

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos3:libsmb: Fix clang warnings that fnum might be used uninitialized
Andreas Schneider [Wed, 25 Nov 2020 10:34:09 +0000 (11:34 +0100)] 
s3:libsmb: Fix clang warnings that fnum might be used uninitialized

Found by covscan.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agosamba_upgradedns: Do not print confusing logs about missing .zone files
Andrew Bartlett [Mon, 23 Nov 2020 21:15:43 +0000 (10:15 +1300)] 
samba_upgradedns: Do not print confusing logs about missing .zone files

samba_upgradedns prints confusing logs about upgrading zone files
and automatically creating DNS zones when the zone already exists.

We need to move the logging to later when we know we what we are
using the parsed information for.

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

Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Nov 26 08:16:04 UTC 2020 on sn-devel-184

5 years agoTest password removal via python proctitle
David Mulder [Fri, 8 Nov 2019 20:06:53 +0000 (20:06 +0000)] 
Test password removal via python proctitle

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoRemove password from samba-tool proctitle
Heiko Baumann [Tue, 3 Sep 2019 12:30:18 +0000 (14:30 +0200)] 
Remove password from samba-tool proctitle

This fix makes sure the password is removed from the proctitle
of samba-tool so it cannot be exposed by e.g. ps(1).
- Moved code to python/samba/getopt.py as suggested by David Mulder
- Except ModuleNotFoundError when trying to load setproctitle module
- Improved code to keep option separator (space or equal sign) while
  removing password from proctitle.

Signed-off-by: Heiko Baumann <heibau@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: David Mulder <dmulder@suse.com>
5 years agoDo not create an empty DB when accessing a sam.ldb
Andrew Bartlett [Mon, 23 Nov 2020 06:35:37 +0000 (19:35 +1300)] 
Do not create an empty DB when accessing a sam.ldb

Samba already does this for samba-tool and doing this should make
our errors more sensible, particularly in BIND9 if not provisioned
with the correct --dns-backend=DLZ_BIND9

The old error was like:

 named[62954]: samba_dlz: Unable to get basedn for
 /var/lib/samba/private/dns/sam.ldb
  - NULL Base DN invalid for a base search.

The new error will be like (in this case from the torture test):
 Failed to connect to Failed to connect to
 ldb:///home/abartlet/samba/st/chgdcpass/bind-dns/dns/sam.ldb:
 Unable to open tdb '/home/abartlet/samba/st/chgdcpass/bind-dns/dns/sam.ldb':
 No such file or directory: Operations error

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

Reviewed-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
5 years agotorture: Do not call destroy_dlz() on uninitialised memory
Andrew Bartlett [Mon, 23 Nov 2020 07:27:51 +0000 (20:27 +1300)] 
torture: Do not call destroy_dlz() on uninitialised memory

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

Reviewed-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
5 years agowaf: upgrade to 2.0.21
Stefan Metzmacher [Wed, 25 Nov 2020 15:29:06 +0000 (16:29 +0100)] 
waf: upgrade to 2.0.21

This commit message was wrong:

    commit 5fc3a71d0f54b176d3cb2e399718d0468507e797
    Author: David Mulder <dmulder@suse.com>
    Date:   Mon Aug 24 13:12:46 2020 -0600

        waf: upgrade to 2.0.20

        This contain an important change:
        "Fix gccdeps.scan() returning nodes that no longer exist on disk."
        https://gitlab.com/ita1024/waf/-/merge_requests/2293

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
The fix was in in waf master, but not included in 2.0.20,
but it's now included in 2.0.21.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos3:lib: Check return code of set_blocking()
Andreas Schneider [Tue, 24 Nov 2020 16:42:24 +0000 (17:42 +0100)] 
s3:lib: Check return code of set_blocking()

Found by covscan.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos3:smbd: Check return code of set_blocking()
Andreas Schneider [Tue, 24 Nov 2020 16:40:33 +0000 (17:40 +0100)] 
s3:smbd: Check return code of set_blocking()

Found by covscan.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agolibcli:smb: Check return code of set_blocking
Andreas Schneider [Tue, 24 Nov 2020 16:35:26 +0000 (17:35 +0100)] 
libcli:smb: Check return code of set_blocking

Found by covscan.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos3:winbind: Check return code of set_blocking()
Andreas Schneider [Tue, 24 Nov 2020 16:33:26 +0000 (17:33 +0100)] 
s3:winbind: Check return code of set_blocking()

Found by covscan.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos3:smbd: Fix a possible null pointer deref in oplock code
Andreas Schneider [Tue, 24 Nov 2020 15:57:12 +0000 (16:57 +0100)] 
s3:smbd: Fix a possible null pointer deref in oplock code

Found by cppcheck.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agosamba-tool domain backup: Confirm the sidForRestore we will put into the backup is...
Andrew Bartlett [Tue, 17 Nov 2020 23:11:10 +0000 (12:11 +1300)] 
samba-tool domain backup: Confirm the sidForRestore we will put into the backup is free

Otherwise the administrator might only find there is a problem once they
attempt to restore the domain!

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14575
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
5 years agos3: smbd: Fix misleading comment I added for commit 382a5c4e7ec08ec9291453ffad9541ab3...
Jeremy Allison [Sat, 21 Nov 2020 23:55:08 +0000 (15:55 -0800)] 
s3: smbd: Fix misleading comment I added for commit 382a5c4e7ec08ec9291453ffad9541ab36aca274

smbd: Fix failure to check dstdir for delete on close

We're preventing ourselves from holding two locks here,
not protecting from waiting for a lock someone else
holds.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sun Nov 22 01:22:36 UTC 2020 on sn-devel-184

5 years agotestprogs: Fix MIT KRB5 export keytab with > 1.18
Andreas Schneider [Thu, 19 Nov 2020 16:04:07 +0000 (17:04 +0100)] 
testprogs: Fix MIT KRB5 export keytab with > 1.18

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Nov 21 00:11:02 UTC 2020 on sn-devel-184

5 years agosmbd: Fix failure to check dstdir for delete on close
Volker Lendecke [Thu, 19 Nov 2020 11:38:06 +0000 (12:38 +0100)] 
smbd: Fix failure to check dstdir for delete on close

In smb2_setinfo.c the call to smbd_do_setfilepathinfo() to perform the
rename takes place while holding a share mode lock. The function
check_parent_access() called below tries to query the destination
directory's locking.tdb entry to check whether the delete on close
flag is set on the destination directory. This fails because the
file to be renamed already has the share mode entry locked, we can't
lock two share mode entries simultaneously.

Convert the check to use fetch_share_mode_unlocked(). This might
introduce races, but this whole check is racy anyway. It does not
really matter whether we do the check for delete_on_close under a lock
or not, fetch_share_mode_unlocked() retrieves a consistent status of
the locking.tdb entry at some point in time as well.

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 Nov 20 00:20:06 UTC 2020 on sn-devel-184

5 years agotests: SMB2 rename fails to check del-on-close on dst dir
Volker Lendecke [Tue, 17 Nov 2020 14:24:43 +0000 (15:24 +0100)] 
tests: SMB2 rename fails to check del-on-close on dst dir

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agopylibsmb: Add rename()
Volker Lendecke [Mon, 16 Nov 2020 11:41:35 +0000 (12:41 +0100)] 
pylibsmb: Add rename()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotests: Factor out prep_creds()
Volker Lendecke [Tue, 17 Nov 2020 15:11:11 +0000 (16:11 +0100)] 
tests: Factor out prep_creds()

3 times the same code can be put together

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibsmb: Make cli_nt_pipes_close() static
Volker Lendecke [Mon, 9 Nov 2020 18:32:57 +0000 (19:32 +0100)] 
libsmb: Make cli_nt_pipes_close() static

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