]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
4 years agoselftest: preforkrestartdc doesn't need gdb-backtraces
Douglas Bagnall [Thu, 11 Feb 2021 09:19:31 +0000 (22:19 +1300)] 
selftest: preforkrestartdc doesn't need gdb-backtraces

There are tests in this environment that kill processes with SEGV
signals, which causes a backtrace that is entirely spurious from a
debugging point of view.

We can turn that off, saving processor time and moments of developer
confusion.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: David Mulder <dmulder@suse.com>
4 years agopytest:segfault: avoid gdb_backtrace on knownfail
Douglas Bagnall [Thu, 11 Feb 2021 09:16:33 +0000 (22:16 +1300)] 
pytest:segfault: avoid gdb_backtrace on knownfail

We know that test_net_replicate_init__3() segfaults. It is a knownfail
and we don't need to see the gdb backtrace every time.

This saves nearly two minutes on `make test TESTS=segfault`.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: David Mulder <dmulder@suse.com>
4 years agoselftest/gdb_backtrace: add an off switch
Douglas Bagnall [Thu, 11 Feb 2021 04:39:18 +0000 (17:39 +1300)] 
selftest/gdb_backtrace: add an off switch

Sometime you know a test is going to crash and produce a LOT of
backtrace, and you already know what it will look like. For those
times you can set

PLEASE_NO_GDB_BACKTRACE=1

and there will be no backtrace, which can save quite a bit of time and
thousands of lines of log file. (In particular, backtraces of Python
programs can take over a minute to complete).

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: David Mulder <dmulder@suse.com>
4 years agoprinting: use correct error out in get_correct_cversion() when openat_pathref_fsp...
Ralph Boehme [Tue, 16 Feb 2021 13:24:05 +0000 (14:24 +0100)] 
printing: use correct error out in get_correct_cversion() when openat_pathref_fsp() fails

Fixes a regression introduced by a74f0af1a91fe0bbc68e4d41d65f43ec383ae8bf: if
there's no existing file, openat_pathref_fsp() will fail with
NT_STATUS_OBJECT_NAME_NOT_FOUND which must be handled the same way it is done by
the SMB_VFS_CREATE_FILE() call below.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Wed Feb 17 19:53:00 UTC 2021 on sn-devel-184

4 years agoprinting: use correct error out in file_version_is_newer() when openat_pathref_fsp...
Ralph Boehme [Tue, 16 Feb 2021 13:23:02 +0000 (14:23 +0100)] 
printing: use correct error out in file_version_is_newer() when openat_pathref_fsp() fails

Fixes a regression introduced by ef5e913bca584f0232d5bfff14df4ccba2dda35c: if
there's no existing file, openat_pathref_fsp() will fail with
NT_STATUS_OBJECT_NAME_NOT_FOUND which must be handled the same way it is done by
the SMB_VFS_CREATE_FILE() call below.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agoprinting: use correct error out in file_version_is_newer() when openat_pathref_fsp...
Ralph Boehme [Tue, 16 Feb 2021 13:19:51 +0000 (14:19 +0100)] 
printing: use correct error out in file_version_is_newer() when openat_pathref_fsp() fails

Fixes a regression introduced by cbe25e1777d0c43c21e8acc2cea79fd03fdaf2ea: if
there's no existing file, openat_pathref_fsp() will fail with
NT_STATUS_OBJECT_NAME_NOT_FOUND which must be handled the same way it is done by
the SMB_VFS_CREATE_FILE() call below.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agosamba-tool: Replace gpo command for removing Sudoers Group Policy
David Mulder [Wed, 23 Dec 2020 15:09:32 +0000 (08:09 -0700)] 
samba-tool: Replace gpo command for removing Sudoers Group Policy

Replace it with the VGP command for removing
sudoers entries from an xml file.

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sun Feb 14 00:53:41 UTC 2021 on sn-devel-184

4 years agosamba-tool: Test gpo manage vgp sudoers remove command
David Mulder [Tue, 22 Dec 2020 22:36:59 +0000 (15:36 -0700)] 
samba-tool: Test gpo manage vgp sudoers remove command

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosamba-tool: Replace gpo command for adding Sudoers Group Policy
David Mulder [Tue, 22 Dec 2020 20:34:19 +0000 (13:34 -0700)] 
samba-tool: Replace gpo command for adding Sudoers Group Policy

Replace it with the VGP command for adding
sudoers entries in an xml file.

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosamba-tool: Test VGP sudoers add command
David Mulder [Tue, 22 Dec 2020 18:23:34 +0000 (11:23 -0700)] 
samba-tool: Test VGP sudoers add command

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosamba-tool: Replace gpo command for listing Sudoers Group Policy
David Mulder [Mon, 21 Dec 2020 21:57:27 +0000 (14:57 -0700)] 
samba-tool: Replace gpo command for listing Sudoers Group Policy

Replace it with the VGP command for listing
sudoers entries in an xml file.

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosamba-tool: Test gpo manage vgp sudoers list command
David Mulder [Mon, 21 Dec 2020 20:14:41 +0000 (13:14 -0700)] 
samba-tool: Test gpo manage vgp sudoers list command

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agogpo: VGP Sudoers policy must handle group principals
David Mulder [Mon, 21 Dec 2020 23:48:55 +0000 (16:48 -0700)] 
gpo: VGP Sudoers policy must handle group principals

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agogpo: Test that VGP Sudoers policy handles group principals
David Mulder [Mon, 21 Dec 2020 23:47:51 +0000 (16:47 -0700)] 
gpo: Test that VGP Sudoers policy handles group principals

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs: update status of SMB_VFS_READLINKAT()
Jeremy Allison [Thu, 11 Feb 2021 19:59:06 +0000 (11:59 -0800)] 
vfs: update status of SMB_VFS_READLINKAT()

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Feb 13 01:19:49 UTC 2021 on sn-devel-184

4 years agos3: smbd: Change smb_unix_read_symlink() to use a real directory fsp for SMB_VFS_READ...
Jeremy Allison [Wed, 10 Feb 2021 22:50:36 +0000 (14:50 -0800)] 
s3: smbd: Change smb_unix_read_symlink() to use a real directory fsp for SMB_VFS_READLINKAT().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
4 years agos3: smbd: Factor out the SMB1 UNIX extensions read symlink code into a function.
Jeremy Allison [Wed, 10 Feb 2021 21:34:42 +0000 (13:34 -0800)] 
s3: smbd: Factor out the SMB1 UNIX extensions read symlink code into a function.

Will make it much easier to convert to a dirfsp later.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
4 years agos3: VFS: unityed_media: Fix um_readlinkat() to cope with real directory fsps.
Jeremy Allison [Thu, 11 Feb 2021 19:55:16 +0000 (11:55 -0800)] 
s3: VFS: unityed_media: Fix um_readlinkat() to cope with real directory fsps.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
4 years agos3: VFS: time_audit: Fix smb_time_audit_readlinkat() to cope with real directory...
Jeremy Allison [Thu, 11 Feb 2021 19:49:24 +0000 (11:49 -0800)] 
s3: VFS: time_audit: Fix smb_time_audit_readlinkat() to cope with real directory fsps.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
4 years ago3: VFS: snapper: Fix snapper_gmt_readlinkat() to cope with real directory fsps.
Jeremy Allison [Thu, 11 Feb 2021 19:43:50 +0000 (11:43 -0800)] 
3: VFS: snapper: Fix snapper_gmt_readlinkat() to cope with real directory fsps.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
4 years agos3: VFS: shadow_copy2: Fix shadow_copy2_readlinkat() to cope with real directory...
Jeremy Allison [Thu, 11 Feb 2021 19:36:22 +0000 (11:36 -0800)] 
s3: VFS: shadow_copy2: Fix shadow_copy2_readlinkat() to cope with real directory fsps.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
4 years agos3: VFS: media_harmony: Fix mh_readlinkat() to cope with real directory fsps.
Jeremy Allison [Thu, 11 Feb 2021 19:05:28 +0000 (11:05 -0800)] 
s3: VFS: media_harmony: Fix mh_readlinkat() to cope with real directory fsps.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
4 years agos3: VFS: glusterfs: Fix vfs_gluster_readlinkat() to cope with real directory fsps.
Jeremy Allison [Thu, 11 Feb 2021 19:02:28 +0000 (11:02 -0800)] 
s3: VFS: glusterfs: Fix vfs_gluster_readlinkat() to cope with real directory fsps.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
4 years agos3: VFS: full_audit: Fix smb_full_audit_readlinkat() to cope with real directory...
Jeremy Allison [Thu, 11 Feb 2021 18:59:18 +0000 (10:59 -0800)] 
s3: VFS: full_audit: Fix smb_full_audit_readlinkat() to cope with real directory fsps.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
4 years agos3: VFS: ceph_snapshots: Fix ceph_snap_gmt_readlinkat() to cope with real directory...
Jeremy Allison [Thu, 11 Feb 2021 17:54:52 +0000 (09:54 -0800)] 
s3: VFS: ceph_snapshots: Fix ceph_snap_gmt_readlinkat() to cope with real directory fsps.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
4 years agos3: VFS: ceph: Fix cephwrap_readlinkat() to cope with real directory fsps.
Jeremy Allison [Thu, 11 Feb 2021 17:26:15 +0000 (09:26 -0800)] 
s3: VFS: ceph: Fix cephwrap_readlinkat() to cope with real directory fsps.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
4 years agos3: VFS: cap: Fix cap_readlinkat() to cope with real directory fsps.
Jeremy Allison [Thu, 11 Feb 2021 17:21:41 +0000 (09:21 -0800)] 
s3: VFS: cap: Fix cap_readlinkat() to cope with real directory fsps.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
4 years agos3: VFS: expand_msdfs: Since we moved to SMB_VFS_READ_DFS_PATHAT() this module has...
Jeremy Allison [Thu, 11 Feb 2021 18:52:47 +0000 (10:52 -0800)] 
s3: VFS: expand_msdfs: Since we moved to SMB_VFS_READ_DFS_PATHAT() this module has looked at the wrong function.

Fix it to work as a redirection of SMB_VFS_READ_DFS_PATHAT()
instead of SMB_VFS_READLINKAT().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
4 years agonsswitch pam_winbind: Fix clang compilation error
Gary Lockyer [Wed, 10 Feb 2021 19:59:55 +0000 (08:59 +1300)] 
nsswitch pam_winbind: Fix clang compilation error

Fix clang compilation error:
   error: format string is not a string literal [-Werror,-Wformat-nonliteral]

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Feb 12 00:10:50 UTC 2021 on sn-devel-184

4 years agogpo: Security gpext rsop list only own policies
David Mulder [Tue, 15 Dec 2020 19:48:30 +0000 (12:48 -0700)] 
gpo: Security gpext rsop list only own policies

The rsop should only list the policies from
that extension, not from all policies in the
same file.

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Feb 11 18:28:09 UTC 2021 on sn-devel-184

4 years agogpo: Test that Security gpext rsop lists only own policies
David Mulder [Tue, 9 Feb 2021 19:58:49 +0000 (12:58 -0700)] 
gpo: Test that Security gpext rsop lists only own policies

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agogpo: Ensure empty Security sections are removed
David Mulder [Fri, 11 Dec 2020 17:38:32 +0000 (10:38 -0700)] 
gpo: Ensure empty Security sections are removed

Failing to remove the empty section causes tests
to fail, and is also just bad practice.

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agogpo: Test that empty Security sections are removed
David Mulder [Tue, 9 Feb 2021 18:06:40 +0000 (11:06 -0700)] 
gpo: Test that empty Security sections are removed

Ensure that empty sections are removed when
calling samba-tool gpo manage security set.

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3:registry Renaming get_charset() to smbreg_get_charset()
xzhao9 [Sun, 3 Jan 2021 18:02:18 +0000 (13:02 -0500)] 
s3:registry Renaming get_charset() to smbreg_get_charset()

Rename to smbreg_get_charset() function to avoid naming conflict
with MariaDB.

Signed-off-by: xzhao9 <i@xuzhao.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Mulder <dmulder@suse.com>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Feb 10 21:00:28 UTC 2021 on sn-devel-184

4 years agoclassicupgrade: treat old never expires value right
Björn Jacke [Fri, 5 Feb 2021 11:47:01 +0000 (12:47 +0100)] 
classicupgrade: treat old never expires value right

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

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Feb 10 15:06:49 UTC 2021 on sn-devel-184

4 years agos3:pysmbd: fix fd leak in py_smbd_create_file()
Stefan Metzmacher [Tue, 9 Feb 2021 12:48:36 +0000 (13:48 +0100)] 
s3:pysmbd: fix fd leak in py_smbd_create_file()

Various 'samba-tool domain backup' commands use this and will
fail if there's over ~1000 files in the sysvol folder.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
4 years agothird_party: Update socket_wrapper to version 1.3.2
Stefan Metzmacher [Tue, 9 Feb 2021 07:56:42 +0000 (08:56 +0100)] 
third_party: Update socket_wrapper to version 1.3.2

This brings support for fd-passing of INET sockets.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agoselftest/gdb_backtrace: use 'unset LD_PRELOAD'
Stefan Metzmacher [Tue, 9 Feb 2021 15:22:37 +0000 (16:22 +0100)] 
selftest/gdb_backtrace: use 'unset LD_PRELOAD'

We may have bugs in socket_wrapper and others, we don't want
to inject these bugs into the debugger.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agoexamples/fuse/smb2mount: fix compiler warning on ubuntu20.04 with -O3
Stefan Metzmacher [Wed, 3 Feb 2021 16:55:14 +0000 (17:55 +0100)] 
examples/fuse/smb2mount: fix compiler warning on ubuntu20.04 with -O3

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agosamba-tool: Add a gpo command for setting VGP OpenSSH Group Policy
David Mulder [Wed, 23 Dec 2020 21:52:35 +0000 (14:52 -0700)] 
samba-tool: Add a gpo command for setting VGP OpenSSH Group Policy

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Feb  9 21:24:14 UTC 2021 on sn-devel-184

4 years agosamba-tool: Test gpo manage openssh set command
David Mulder [Wed, 23 Dec 2020 21:29:58 +0000 (14:29 -0700)] 
samba-tool: Test gpo manage openssh set command

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosamba-tool: Add a gpo command for listing VGP OpenSSH Group Policy
David Mulder [Wed, 23 Dec 2020 21:14:49 +0000 (14:14 -0700)] 
samba-tool: Add a gpo command for listing VGP OpenSSH Group Policy

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosamba-tool: Test gpo manage openssh list command
David Mulder [Wed, 23 Dec 2020 19:25:11 +0000 (12:25 -0700)] 
samba-tool: Test gpo manage openssh list command

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agogpo: Apply Group Policy OpenSSH settings from VGP
David Mulder [Thu, 5 Nov 2020 16:08:26 +0000 (09:08 -0700)] 
gpo: Apply Group Policy OpenSSH settings from VGP

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agogpo: Test Group Policy OpenSSH for VGP
David Mulder [Wed, 4 Nov 2020 17:24:26 +0000 (10:24 -0700)] 
gpo: Test Group Policy OpenSSH for VGP

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3 lib system: Change signature of sys_proc_fd_path
Gary Lockyer [Tue, 9 Feb 2021 01:07:53 +0000 (14:07 +1300)] 
s3 lib system: Change signature of sys_proc_fd_path

It's always called with sizeof(buf)

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Feb  9 04:16:43 UTC 2021 on sn-devel-184

4 years agos3 lib system: Fix clang compilation error
Gary Lockyer [Mon, 8 Feb 2021 20:06:12 +0000 (09:06 +1300)] 
s3 lib system: Fix clang compilation error

Fix clang compilation error:
   error: format string is not a string literal [-Werror,-Wformat-nonliteral]

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoHEIMDAL: krb5_storage_free(NULL) should work
Paul Wise [Mon, 29 Feb 2016 17:58:45 +0000 (11:58 -0600)] 
HEIMDAL: krb5_storage_free(NULL) should work

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

Signed-off-by: Paul Wise <pabs3@bonedaddy.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Original-author: Nicolas Williams <nico@twosigma.com>
(cherry-picked from heimdal commit b3db07d5f0e03f6a1a0a392e70f9675e19a6d6af)

4 years agos3:testparm: Warn about 'server schannel = no'
Andreas Schneider [Mon, 8 Feb 2021 08:48:16 +0000 (09:48 +0100)] 
s3:testparm: Warn about 'server schannel = no'

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Feb  9 03:08:42 UTC 2021 on sn-devel-184

4 years agopam_winbind: improve pam message if minimum password age strikes
Björn Jacke [Wed, 27 Jan 2021 20:14:43 +0000 (21:14 +0100)] 
pam_winbind: improve pam message if minimum password age strikes

if minimum password age strikes we should output the next possible password
change time and not other password restriction policies.

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agovfs: update status of SMB_VFS_LINKAT()
Jeremy Allison [Tue, 19 Jan 2021 20:58:09 +0000 (12:58 -0800)] 
vfs: update status of SMB_VFS_LINKAT()

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Feb  9 01:15:58 UTC 2021 on sn-devel-184

4 years agos3: smbd: Change hardlink_internals() to use a real directory fsp for SMB_VFS_LINKAT().
Jeremy Allison [Tue, 19 Jan 2021 20:57:51 +0000 (12:57 -0800)] 
s3: smbd: Change hardlink_internals() to use a real directory fsp for SMB_VFS_LINKAT().

New VFS change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
4 years agos3: smbd: Centralize error exits to an 'out' label in hardlink_internals().
Jeremy Allison [Tue, 19 Jan 2021 20:49:40 +0000 (12:49 -0800)] 
s3: smbd: Centralize error exits to an 'out' label in hardlink_internals().

Makes it easier to add TALLOC_FREE's that are always called.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
4 years agos3: VFS: syncops: Fix syncops_linkat() to cope with real directory fsps.
Jeremy Allison [Fri, 5 Feb 2021 22:19:21 +0000 (14:19 -0800)] 
s3: VFS: syncops: Fix syncops_linkat() to cope with real directory fsps.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
4 years agos3: VFS: unityed_media: Fix um_linkat() to cope with real directory fsps.
Jeremy Allison [Wed, 3 Feb 2021 22:45:36 +0000 (14:45 -0800)] 
s3: VFS: unityed_media: Fix um_linkat() to cope with real directory fsps.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
4 years agos3: VFS: time_audit: Fix smb_time_audit_linkat() to cope with real directory fsps.
Jeremy Allison [Wed, 3 Feb 2021 21:59:00 +0000 (13:59 -0800)] 
s3: VFS: time_audit: Fix smb_time_audit_linkat() to cope with real directory fsps.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
4 years agos3: VFS: media_harmony: Fix mh_linkat() to cope with real directory fsps.
Jeremy Allison [Wed, 3 Feb 2021 20:36:27 +0000 (12:36 -0800)] 
s3: VFS: media_harmony: Fix mh_linkat() to cope with real directory fsps.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
4 years agos3: VFS: full_audit: Fix smb_full_audit_linkat() to cope with real directory fsps.
Jeremy Allison [Mon, 1 Feb 2021 21:08:46 +0000 (13:08 -0800)] 
s3: VFS: full_audit: Fix smb_full_audit_linkat() to cope with real directory fsps.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
4 years agos3: VFS: gluster: Fix vfs_gluster_linkat() to cope with real directory fsps.
Jeremy Allison [Tue, 19 Jan 2021 19:54:51 +0000 (11:54 -0800)] 
s3: VFS: gluster: Fix vfs_gluster_linkat() to cope with real directory fsps.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
4 years agos3: VFS: ceph: Fix cephwrap_linkat() to cope with real directory fsps.
Jeremy Allison [Tue, 19 Jan 2021 19:04:12 +0000 (11:04 -0800)] 
s3: VFS: ceph: Fix cephwrap_linkat() to cope with real directory fsps.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
4 years agos3: VFS: cap: Fix cap_linkat() to cope with real directory fsps.
Jeremy Allison [Mon, 1 Feb 2021 21:04:34 +0000 (13:04 -0800)] 
s3: VFS: cap: Fix cap_linkat() to cope with real directory fsps.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
4 years agoRevert "VFS: shadow_copy2: Fixup shadow_copy2_mknodat() to correctly use the dirfsp...
Jeremy Allison [Wed, 3 Feb 2021 21:55:12 +0000 (13:55 -0800)] 
Revert "VFS: shadow_copy2: Fixup shadow_copy2_mknodat() to correctly use the dirfsp path."

This isn't needed as the existing code will refuse a new name with
a non-zero twp in the target name.

This reverts commit 2f74056a916aef9925cae76016378b993560e22b.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
4 years agoRevert "VFS: shadow_copy2: Fixup shadow_copy2_symlinkat() to correctly use the dirfsp...
Jeremy Allison [Wed, 3 Feb 2021 21:52:33 +0000 (13:52 -0800)] 
Revert "VFS: shadow_copy2: Fixup shadow_copy2_symlinkat() to correctly use the dirfsp path."

This isn't needed as the existing code will refuse a new name with
a non-zero twp in the target name.

This reverts commit ec27c4c44d1e9035639e033689fa739518f17132.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
4 years agosamba-tool: Add a gpo command for removing VGP Files Group Policy
David Mulder [Thu, 28 Jan 2021 16:21:42 +0000 (09:21 -0700)] 
samba-tool: Add a gpo command for removing VGP Files Group Policy

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Feb  8 23:36:57 UTC 2021 on sn-devel-184

4 years agosamba-tool: Test gpo manage files remove command
David Mulder [Wed, 27 Jan 2021 21:05:29 +0000 (14:05 -0700)] 
samba-tool: Test gpo manage files remove command

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosamba-tool: Add a gpo command for adding VGP Files Group Policy
David Mulder [Wed, 27 Jan 2021 20:21:32 +0000 (13:21 -0700)] 
samba-tool: Add a gpo command for adding VGP Files Group Policy

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosamba-tool: Test gpo manage files add command
David Mulder [Tue, 26 Jan 2021 20:43:43 +0000 (13:43 -0700)] 
samba-tool: Test gpo manage files add command

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosamba-tool: Add a gpo command for listing VGP Files Group Policy
David Mulder [Tue, 26 Jan 2021 17:46:27 +0000 (10:46 -0700)] 
samba-tool: Add a gpo command for listing VGP Files Group Policy

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosamba-tool: Test gpo manage files list command
David Mulder [Tue, 26 Jan 2021 17:07:18 +0000 (10:07 -0700)] 
samba-tool: Test gpo manage files list command

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agogpo: Apply Group Policy Files Policy from VGP
David Mulder [Mon, 25 Jan 2021 15:13:18 +0000 (08:13 -0700)] 
gpo: Apply Group Policy Files Policy from VGP

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agogpo: Test Group Policy VGP Files Policy
David Mulder [Fri, 22 Jan 2021 17:09:55 +0000 (10:09 -0700)] 
gpo: Test Group Policy VGP Files Policy

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoctdb-tests: Actually wait for record to migrate to lmaster node
Martin Schwenke [Tue, 2 Feb 2021 01:45:04 +0000 (12:45 +1100)] 
ctdb-tests: Actually wait for record to migrate to lmaster node

This test has been failing with:

  Wait until record is migrated to lmaster node 0
  <30|BAD: node 0 is not dmaster
  dmaster: 1
  rsn: 8
  flags: 0x00010000 MIGRATED_WITH_DATA
  data(6) = "value1"
  *** TEST COMPLETED (RC=1) AT 2021-02-02 06:18:48, CLEANING UP...

This should never happen.  If this really fails then the wait should
time out.

The problem is that wait_until() does:

  "$@" || _rc=$?

and vacuum_test_key_dmaster() currently calls ctdb_test_fail() on
failure, which causes the shell to exit.  Instead, pass a variant to
wait_until() that simply returns the correct status instead of
exiting.

An alternative would be to change the statement in wait_until() to do:

  ("$@") || _rc=$?

so it captures the exit.  However, this is a global change and
requires more thought.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: remove NT_STATUS_STOPPED_ON_SYMLINK status code check from call_trans2findfirst()
Ralph Boehme [Tue, 2 Feb 2021 15:01:19 +0000 (16:01 +0100)] 
smbd: remove NT_STATUS_STOPPED_ON_SYMLINK status code check from call_trans2findfirst()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Feb  5 07:26:44 UTC 2021 on sn-devel-184

4 years agosmbd: remove NT_STATUS_STOPPED_ON_SYMLINK status code check from copy_file()
Ralph Boehme [Tue, 2 Feb 2021 15:00:32 +0000 (16:00 +0100)] 
smbd: remove NT_STATUS_STOPPED_ON_SYMLINK status code check from copy_file()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: remove NT_STATUS_STOPPED_ON_SYMLINK status code check from copy_file()
Ralph Boehme [Tue, 2 Feb 2021 14:58:57 +0000 (15:58 +0100)] 
smbd: remove NT_STATUS_STOPPED_ON_SYMLINK status code check from copy_file()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: remove NT_STATUS_STOPPED_ON_SYMLINK status code check from rename_internals()
Ralph Boehme [Tue, 2 Feb 2021 14:58:42 +0000 (15:58 +0100)] 
smbd: remove NT_STATUS_STOPPED_ON_SYMLINK status code check from rename_internals()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: remove NT_STATUS_STOPPED_ON_SYMLINK status code check from rename_internals()
Ralph Boehme [Tue, 2 Feb 2021 14:58:30 +0000 (15:58 +0100)] 
smbd: remove NT_STATUS_STOPPED_ON_SYMLINK status code check from rename_internals()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: remove NT_STATUS_STOPPED_ON_SYMLINK status code check from reply_search()
Ralph Boehme [Tue, 2 Feb 2021 14:57:26 +0000 (15:57 +0100)] 
smbd: remove NT_STATUS_STOPPED_ON_SYMLINK status code check from reply_search()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: remove NT_STATUS_STOPPED_ON_SYMLINK status code check from create_file_unixpath()
Ralph Boehme [Tue, 2 Feb 2021 14:57:09 +0000 (15:57 +0100)] 
smbd: remove NT_STATUS_STOPPED_ON_SYMLINK status code check from create_file_unixpath()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: remove NT_STATUS_STOPPED_ON_SYMLINK status code check from open_streams_for_del...
Ralph Boehme [Tue, 2 Feb 2021 14:56:44 +0000 (15:56 +0100)] 
smbd: remove NT_STATUS_STOPPED_ON_SYMLINK status code check from open_streams_for_delete()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: remove NT_STATUS_STOPPED_ON_SYMLINK status code check from parent_pathref()
Ralph Boehme [Tue, 2 Feb 2021 14:56:26 +0000 (15:56 +0100)] 
smbd: remove NT_STATUS_STOPPED_ON_SYMLINK status code check from parent_pathref()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: remove NT_STATUS_STOPPED_ON_SYMLINK status code check from synthetic_pathref()
Ralph Boehme [Tue, 2 Feb 2021 14:56:16 +0000 (15:56 +0100)] 
smbd: remove NT_STATUS_STOPPED_ON_SYMLINK status code check from synthetic_pathref()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: remove NT_STATUS_STOPPED_ON_SYMLINK status code check from get_file_handle_for_...
Ralph Boehme [Tue, 2 Feb 2021 14:54:43 +0000 (15:54 +0100)] 
smbd: remove NT_STATUS_STOPPED_ON_SYMLINK status code check from get_file_handle_for_metadata()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agonet: remove NT_STATUS_STOPPED_ON_SYMLINK status code check from openat_pathref_fsp()
Ralph Boehme [Tue, 2 Feb 2021 14:54:02 +0000 (15:54 +0100)] 
net: remove NT_STATUS_STOPPED_ON_SYMLINK status code check from openat_pathref_fsp()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: don't return NT_STATUS_STOPPED_ON_SYMLINK in openat_pathref_fsp()
Ralph Boehme [Tue, 2 Feb 2021 10:18:54 +0000 (11:18 +0100)] 
smbd: don't return NT_STATUS_STOPPED_ON_SYMLINK in openat_pathref_fsp()

NT_STATUS_STOPPED_ON_SYMLINK is returned when trying to open a symlink, most
callers are not interested in this.

Some callers that would want to know whether openat_pathref_fsp() failed
specifically on a symlink are setup_close_full_information(),
smbd_dirptr_get_entry(), unlink_internals() and filename_convert_internal(), so
we fix those callers to handle the symlink case themselves.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: simplify error codepath in openat_pathref_fsp()
Ralph Boehme [Tue, 2 Feb 2021 12:49:56 +0000 (13:49 +0100)] 
smbd: simplify error codepath in openat_pathref_fsp()

No change in behaviour: the cleanup code at the fail label does the same as the
cleanup this patch removes. It has an extra fd_close() that is not existing in
the removed cleanup, but as fsp->fd is -1, that's a noop.

And when previously the

return NT_STATUS_OBJECT_NAME_NOT_FOUND;

returns an an explicit status code, when now doing goto fail status will also be
set to NT_STATUS_OBJECT_NAME_NOT_FOUND.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: expect valid stat info in openat_pathref_fsp()
Ralph Boehme [Mon, 1 Feb 2021 09:17:13 +0000 (10:17 +0100)] 
smbd: expect valid stat info in openat_pathref_fsp()

We're never creating files here, so instead of waiting for the underlying open()
to return ENOENT, just check that we have valid stat info, expecting all callers
to have called SMB_VFS_[L]STAT() on the smb_fname.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: stat path before calling openat_pathref_fsp() in smbd_dirptr_get_entry()
Ralph Boehme [Mon, 1 Feb 2021 11:09:39 +0000 (12:09 +0100)] 
smbd: stat path before calling openat_pathref_fsp() in smbd_dirptr_get_entry()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: move smb_fname creation to earlier point in smbd_dirptr_get_entry()
Ralph Boehme [Mon, 1 Feb 2021 11:04:49 +0000 (12:04 +0100)] 
smbd: move smb_fname creation to earlier point in smbd_dirptr_get_entry()

No change in behaviour. Makes way for the next commit adding additional logic.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: stat path before calling openat_pathref_fsp() in open_pathref_base_fsp()
Ralph Boehme [Mon, 1 Feb 2021 11:04:01 +0000 (12:04 +0100)] 
smbd: stat path before calling openat_pathref_fsp() in open_pathref_base_fsp()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: remove a redundant fstat()in create_file_unixpath()
Ralph Boehme [Mon, 1 Feb 2021 11:03:08 +0000 (12:03 +0100)] 
smbd: remove a redundant fstat()in create_file_unixpath()

openat_pathref_fsp() deep inside already calls fstat().

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: call stat before openat_pathref_fsp() in create_file_unixpath()
Ralph Boehme [Mon, 1 Feb 2021 11:01:22 +0000 (12:01 +0100)] 
smbd: call stat before openat_pathref_fsp() in create_file_unixpath()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: fix a resource leak in create_file_unixpath()
Ralph Boehme [Mon, 1 Feb 2021 11:01:01 +0000 (12:01 +0100)] 
smbd: fix a resource leak in create_file_unixpath()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: stat path before calling openat_pathref_fsp() in unlink_internals()
Ralph Boehme [Mon, 1 Feb 2021 11:00:35 +0000 (12:00 +0100)] 
smbd: stat path before calling openat_pathref_fsp() in unlink_internals()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3/libadouble: stat path before calling openat_pathref_fsp() in ad_unconvert_open_ad()
Ralph Boehme [Mon, 1 Feb 2021 10:59:37 +0000 (11:59 +0100)] 
s3/libadouble: stat path before calling openat_pathref_fsp() in ad_unconvert_open_ad()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: don't overwrite _mode if neither a msdfs symlink nor get_dosmode is requested
Ralph Boehme [Mon, 1 Feb 2021 11:37:10 +0000 (12:37 +0100)] 
smbd: don't overwrite _mode if neither a msdfs symlink nor get_dosmode is requested

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoCI: verify a symlink has FILE_ATTRIBUTE_NORMAL set
Ralph Boehme [Mon, 1 Feb 2021 13:44:03 +0000 (14:44 +0100)] 
CI: verify a symlink has FILE_ATTRIBUTE_NORMAL set

Not that it really makes sense to set FILE_ATTRIBUTE_NORMAL for symlinks in
POSIX client context, but that's what we had before 4.14.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolib:util: Avoid free'ing our own pointer
Andreas Schneider [Tue, 2 Feb 2021 17:10:38 +0000 (18:10 +0100)] 
lib:util: Avoid free'ing our own pointer

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Feb  3 10:57:01 UTC 2021 on sn-devel-184

4 years agolib:util: Add cache oversize test for memcache
Andreas Schneider [Wed, 3 Feb 2021 09:37:12 +0000 (10:37 +0100)] 
lib:util: Add cache oversize test for memcache

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agolib:util: Add basic memcache unit test
Andreas Schneider [Wed, 3 Feb 2021 09:30:08 +0000 (10:30 +0100)] 
lib:util: Add basic memcache unit test

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>