]>
git.ipfire.org Git - thirdparty/samba.git/log
Noel Power [Fri, 11 Jun 2021 15:31:13 +0000 (16:31 +0100)]
VFS: ceph: Remove SMB_VFS_CHFLAGS
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Noel Power [Fri, 11 Jun 2021 15:23:12 +0000 (16:23 +0100)]
s3/smbd: smb_set_file_unix_info2: SMB_VFS_CHFLAGS -> SMB_VFS_FCHFLAGS
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Noel Power [Fri, 11 Jun 2021 14:46:56 +0000 (15:46 +0100)]
VFS: snapper: Add SMB_VFS_FCHFLAGS implementation
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Noel Power [Fri, 11 Jun 2021 14:46:30 +0000 (15:46 +0100)]
VFS: shadow_copy2: Add SMB_VFS_FCHFLAGS implementation
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Noel Power [Fri, 11 Jun 2021 14:46:07 +0000 (15:46 +0100)]
VFS: glusterfs: Add SMB_VFS_FCHFLAGS implementation
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Noel Power [Fri, 11 Jun 2021 14:45:51 +0000 (15:45 +0100)]
VFS: ceph_snapshots: Add SMB_VFS_FCHFLAGS implementation
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Noel Power [Fri, 11 Jun 2021 14:45:38 +0000 (15:45 +0100)]
VFS: ceph: Add SMB_VFS_FCHFLAGS implementation
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Noel Power [Thu, 10 Jun 2021 15:31:40 +0000 (16:31 +0100)]
VFS: Add initial implemenataion for SMB_VFS_FCHFLAGS
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Pavel Filipenský [Tue, 22 Jun 2021 14:00:00 +0000 (16:00 +0200)]
idl: secrets_domain_info1_change is not a recursive structure
575d39048e3b4f619d65d65303ac809c40c5d495 has marked
several structures as recursive, they contain typically a
backpointer named '* next'. secrets_domain_info1 is not self
recursive, it only contains a pointer named '*next_change'.
Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Jun 29 03:07:17 UTC 2021 on sn-devel-184
Andreas Schneider [Tue, 22 Jun 2021 07:37:13 +0000 (09:37 +0200)]
s4:dsdsb: Check return code of cli_credentials_guess()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Andreas Schneider [Tue, 22 Jun 2021 07:35:47 +0000 (09:35 +0200)]
s3:libsmb: Check return code of cli_credentials_guess()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Andreas Schneider [Tue, 22 Jun 2021 07:34:39 +0000 (09:34 +0200)]
s3:libnetapi: Check return code of cli_credentials_guess()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Andreas Schneider [Tue, 22 Jun 2021 07:24:38 +0000 (09:24 +0200)]
auth:creds: Check return code of cli_credentials_guess()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Andreas Schneider [Tue, 27 Apr 2021 14:19:31 +0000 (16:19 +0200)]
lib:cmdline: Ignore the return code of cli_credentials_guess()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Andreas Schneider [Tue, 27 Apr 2021 14:15:30 +0000 (16:15 +0200)]
auth:creds: Return bool for cli_credentials_guess()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Andreas Schneider [Tue, 27 Apr 2021 14:11:48 +0000 (16:11 +0200)]
auth:creds: Add sanity check for env variables
CID 710829
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Andreas Schneider [Tue, 22 Jun 2021 07:48:42 +0000 (09:48 +0200)]
s4:rpc_server: Check return code of cli_credentials_set_conf()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Andreas Schneider [Tue, 22 Jun 2021 07:47:23 +0000 (09:47 +0200)]
s4:kpasswd: Check return code of cli_credentials_set_conf()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Andreas Schneider [Tue, 22 Jun 2021 07:46:14 +0000 (09:46 +0200)]
s4:dns_server: Check return code of cli_credentials_set_conf()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Andreas Schneider [Tue, 22 Jun 2021 07:44:44 +0000 (09:44 +0200)]
s4:dns:bind_dlz: Check return codes of cli_credentials functions
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Andreas Schneider [Tue, 22 Jun 2021 07:41:36 +0000 (09:41 +0200)]
s4:auth: Check return code of cli_credentials_set_conf()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Andreas Schneider [Tue, 22 Jun 2021 07:39:53 +0000 (09:39 +0200)]
s4:auth: Check return code of cli_credentials_set_conf()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Andreas Schneider [Tue, 4 May 2021 09:24:55 +0000 (11:24 +0200)]
s3:winbindd: Check return code of cli_credentials_set_conf()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Andreas Schneider [Tue, 4 May 2021 09:08:28 +0000 (11:08 +0200)]
s3:passdb: Check return code of cli_credentials_set_conf()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Andreas Schneider [Tue, 4 May 2021 09:06:23 +0000 (11:06 +0200)]
s3:libsmb: Check return code of cli_credentials_set_conf()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Andreas Schneider [Tue, 4 May 2021 09:05:27 +0000 (11:05 +0200)]
s3:auth: Check return code of cli_credentials_set_conf()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Andreas Schneider [Tue, 4 May 2021 09:02:02 +0000 (11:02 +0200)]
auth:creds: Check return code of cli_credentials_set_conf()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Andreas Schneider [Thu, 1 Apr 2021 15:02:10 +0000 (17:02 +0200)]
auth:creds: Return a bool for cli_credentials_set_conf()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Douglas Bagnall [Thu, 22 Apr 2021 13:00:12 +0000 (01:00 +1200)]
rpc/dnsserver: check talloc_strndup return
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Douglas Bagnall [Fri, 28 May 2021 10:48:00 +0000 (22:48 +1200)]
rpc dnsserver: improve handling of serial numbers
This is not correct, but it gets closer. We need to save the updated
serial number in the SOA.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Douglas Bagnall [Fri, 28 May 2021 10:45:52 +0000 (22:45 +1200)]
rpc dnsserver: set the record rank
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Douglas Bagnall [Fri, 28 May 2021 10:44:28 +0000 (22:44 +1200)]
rpc dnsserver: updates reset more than timestamp
This is based on observed Windows behaviour.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Douglas Bagnall [Fri, 28 May 2021 07:09:17 +0000 (19:09 +1200)]
rpc:dnsserver: allow update replacing with similar record
We have been refusing to handle the case where the replaced record
matches the replacement according to dns_record_match() (meaning the
wType and data are semantically identical). In Windows this is
explicitly used for changing TTL.
There are further changes we need to properly handle this case.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Douglas Bagnall [Sat, 10 Apr 2021 23:40:59 +0000 (11:40 +1200)]
rpc:dnsserver: split off record rank setting logic
We want to do this also in update (in following commits), and we later
will want to fix the logic.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Jeremy Allison [Mon, 28 Jun 2021 17:20:49 +0000 (10:20 -0700)]
s3: VFS: fake_acls. Add missing NULL check for return of cp_smb_filename().
Found by Coverity.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Jun 28 20:03:33 UTC 2021 on sn-devel-184
Jeremy Allison [Wed, 23 Jun 2021 19:12:30 +0000 (12:12 -0700)]
s3: smbd: Cleanup - rename get_ea_names_from_file() -> get_ea_names_from_fsp().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Jun 25 16:37:59 UTC 2021 on sn-devel-184
Jeremy Allison [Wed, 23 Jun 2021 00:53:29 +0000 (17:53 -0700)]
s3: smbd: Rename get_ea_value() -> get_ea_value_fsp().
Remove the connection struct and smb_filename parameters.
There are now no more callers of SMB_VFS_GETXATTR().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 23 Jun 2021 00:03:20 +0000 (17:03 -0700)]
s3: VFS: streams_xattr: Rename get_xattr_size() -> get_xattr_size_fsp().
It now only needs 2 parameters, fsp and EA name.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Fri, 25 Jun 2021 04:42:16 +0000 (21:42 -0700)]
s3: VFS: streams_xattr: In streams_xattr_stat() - ~S_IFMT already removes S_IFDIR.
We don't need to do this separately.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 22 Jun 2021 23:49:11 +0000 (16:49 -0700)]
s3: VFS: streams_xattr: Use openat_pathref_fsp() to create a smb_fname->fsp (and the smb_fname->fsp->base_fsp) if the incoming name doesn't have one.
Use new smb_fname->fsp->base_fsp parameter in get_xattr_size(), change name parameter to NULL.
If openat_pathref_fsp() fails, return the correct error code (thanks Ralph!).
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 22 Jun 2021 21:24:15 +0000 (14:24 -0700)]
s3: VFS: streams_xattr: In streams_xattr_stat(), make use of smb_fname->fsp->base_fsp if it has one.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 22 Jun 2021 21:19:13 +0000 (14:19 -0700)]
s3: VFS: streams_xattr: Bring streams_xattr_stat_base() inline into streams_xattr_stat().
That was its only caller.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 22 Jun 2021 21:16:04 +0000 (14:16 -0700)]
s3: VFS: streams_xattr: Simplify streams_xattr_lstat().
There can never be EA's on a symlink. Windows will never
see a symlink, and in SMB_FILENAME_POSIX_PATH mode we don't
allow EA's on a symlink.
All of the previous code boiled down to errno = ENOENT, return -1
so make that explicit.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 22 Jun 2021 20:47:46 +0000 (13:47 -0700)]
s3: VFS: streams_xattr: Use fsp->base_fsp for the fsp parameter to get_xattr_size() in streams_xattr_fstat().
We no longer need the 'struct smb_filename *smb_fname_base' here.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 22 Jun 2021 20:46:01 +0000 (13:46 -0700)]
s3: VFS: streams_xattr: Add an fsp parameter to get_xattr_size().
Not yet used.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 23 Jun 2021 00:23:32 +0000 (17:23 -0700)]
s3: VFS: streams_xattr: In streams_xattr_openat() we can assume fsp->base_fsp != NULL.
It should have been opened/created by this point.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 22 Jun 2021 19:17:37 +0000 (12:17 -0700)]
s3: VFS: streams_xattr: In walk_xattr_streams() use smb_fname->fsp for get_ea_value().
We know this is a valid fsp as we have already used it above inside
walk_xattr_streams() as an argument to get_ea_names_from_file().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 23 Jun 2021 00:38:46 +0000 (17:38 -0700)]
s3: VFS: streams_xattr: In streams_xattr_ftruncate() - remove smb_fname_base.
No longer used and we were leaking it onto the talloc_tos() anyway.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 23 Jun 2021 00:37:51 +0000 (17:37 -0700)]
s3: VFS: streams_xattr: In streams_xattr_ftruncate() - use the fsp->base_fsp argument for get_ea_value().
We know it must be valid here.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 23 Jun 2021 00:36:28 +0000 (17:36 -0700)]
s3: VFS: streams_xattr: In streams_xattr_ftruncate() - remove conditional.
We know fsp->base_fsp must be valid here for SMB_VFS_FSETXATTR()
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 23 Jun 2021 00:20:08 +0000 (17:20 -0700)]
s3: VFS: streams_xattr: In streams_xattr_pread() - remove smb_fname_base.
No longer used and we were leaking it onto the talloc_tos() anyway.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 23 Jun 2021 00:19:08 +0000 (17:19 -0700)]
s3: VFS: streams_xattr: In streams_xattr_pread() - use the fsp->base_fsp argument for get_ea_value().
We know it must be valid here.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 23 Jun 2021 00:16:09 +0000 (17:16 -0700)]
s3: VFS: streams_xattr: In streams_xattr_pwrite() - remove smb_fname_base.
No longer used and we were leaking it onto the talloc_tos() anyway.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 23 Jun 2021 00:14:52 +0000 (17:14 -0700)]
s3: VFS: streams_xattr: In streams_xattr_pwrite() - use the fsp->base_fsp argument for get_ea_value().
We know it must be valid here.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 23 Jun 2021 00:10:50 +0000 (17:10 -0700)]
s3: VFS: streams_xattr: In streams_xattr_pwrite() - remove conditional.
We know fsp->base_fsp must be valid here for SMB_VFS_FSETXATTR().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 23 Jun 2021 18:45:25 +0000 (11:45 -0700)]
s3: VFS: ceph_snapshots: Remove ceph_snap_get_btime().
No longer used.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 23 Jun 2021 18:44:23 +0000 (11:44 -0700)]
s3: VFS: ceph_snapshots: In ceph_snap_gmt_convert_dir() - change to use ceph_snap_get_btime_fsp().
Comment out ceph_snap_get_btime() as it has no more callers.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 23 Jun 2021 18:29:18 +0000 (11:29 -0700)]
s3: VFS: ceph_snapshots: In ceph_snap_fill_label(), use ceph_snap_get_btime_fsp() instead of ceph_snap_get_btime().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 23 Jun 2021 18:14:52 +0000 (11:14 -0700)]
s3: VFS: ceph_snapshots: In ceph_snap_fill_label() - pass in dirfsp instead of the raw path.
We will use this for openat_pathref_fsp() later.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 23 Jun 2021 17:58:40 +0000 (10:58 -0700)]
s3: VFS: ceph_snapshots: Add ceph_snap_get_btime_fsp().
Handle-based copy of ceph_snap_get_btime(). Uses
SMB_VFS_NEXT_FGETXATTR() instead of SMB_VFS_NEXT_GETXATTR().
Commented out as nothing uses it yet. This will change shortly.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 23 Jun 2021 17:50:04 +0000 (10:50 -0700)]
s3: VFS: fake_acls: Remove unused fake_acls_uid()/fake_acls_gid().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 23 Jun 2021 17:48:49 +0000 (10:48 -0700)]
s3: VFS: fake_acls: In fake_acls_stat() - Now we always have a valid fsp, remove the calls to the path-based functions.
Comment out fake_acls_uid()/fake_acls_gid(), they are no longer used.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 23 Jun 2021 17:43:51 +0000 (10:43 -0700)]
s3: VFS: fake_acls: In fake_acls_stat() - use openat_pathref_fsp() to always get a pathref fsp.
Add a recursion guard so that openat_pathref_fsp() doesn't
end up recursing into itself when it calls SMB_VFS_STAT().
We now always have a valid fsp inside fake_acls_stat().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 23 Jun 2021 02:10:37 +0000 (19:10 -0700)]
s3: VFS: fake_acls: In fake_acls_stat() - if we have a pathref fsp, use it.
We will add a pathref open for the case where we don't next.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 23 Jun 2021 02:05:06 +0000 (19:05 -0700)]
s3: VFS: fake_acls: In fake_acls_stat() - remove call to get_full_smb_filename().
It serves no purpose here. We no longer need the frame pointer.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 23 Jun 2021 17:27:13 +0000 (10:27 -0700)]
s3: VFS: fake_acls: In fake_acls_lstat() - get a pathref on whatever the link points to and use the handle-based functions.
Add a recursion guard so that synthetic_pathref() can't
recurse into itself by calling SMB_VFS_LSTAT().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 23 Jun 2021 02:05:57 +0000 (19:05 -0700)]
s3: VFS: fake_acls: In fake_acls_lstat() - remove call to get_full_smb_filename().
It serves no purpose here. We no longer need the frame pointer.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 22 Jun 2021 19:01:13 +0000 (12:01 -0700)]
s3: VFS: streams_depot: file_is_valid(), SMB_VFS_GETXATTR() -> SMB_VFS_FGETXATTR().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 23 Jun 2021 22:11:47 +0000 (15:11 -0700)]
s3: lib: adouble: Remove ad_set() - Dead code. Not used anywhere.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Fri, 25 Jun 2021 03:23:39 +0000 (20:23 -0700)]
s3: lib: adouble: Protect ad_read_meta() from accidently using a NULL fsp.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 22 Jun 2021 18:47:25 +0000 (11:47 -0700)]
s3: torture: In cmd_getxattr(), SMB_VFS_GETXATTR() -> SMB_VFS_FGETXATTR().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 22 Jun 2021 18:43:56 +0000 (11:43 -0700)]
s3: smbd: get_ea_list_from_fsp(). Make it clear we're using only the fsp by replacing the fsp->fsp_name with NULL.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 22 Jun 2021 18:40:31 +0000 (11:40 -0700)]
s3: smbd: fload_inherited_info(). Always use SMB_VFS_FGETXATTR().
If the underlying fd is -1, we want this to fail with EBADF.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 22 Jun 2021 18:29:21 +0000 (11:29 -0700)]
s3: modules: acl_xattr: getxattr_do(). Remove the smb_fname parameter.
It was always NULL. Always use the passed in fsp.
If the underlying fd is -1, we want this to fail with EBADF.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 23 Jun 2021 00:31:41 +0000 (17:31 -0700)]
s3: smbd: Temporarily add protection to get_ea_value() for fsp==NULL and smb_fname==NULL.
This will go away once get_ea_value() is fully handle-based
and renamed to get_ea_value_fsp().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 22 Jun 2021 18:26:59 +0000 (11:26 -0700)]
s3: smbd: get_ea_value(). If we have an fsp, *always* use it for SMB_VFS_FGETXATTR().
If the underlying fd is -1, we want this to fail with EBADF.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 23 Jun 2021 06:38:44 +0000 (23:38 -0700)]
s3: smbd: Move the call to fsp_set_fd(conn->cwd_fsp, AT_FDCWD) to just after SMB_VFS_CHDIR().
Once SMB_VFS_CHDIR() has been called and returned success, cwd_fsp *must* be AT_FDCWD.
We needs this so that SMB_VFS_STAT() can work correctly with
at startup time with modules that need to create pathref fsp's.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 23 Jun 2021 06:39:41 +0000 (23:39 -0700)]
s3: smbd: On startup file_name_hash() can be called with an absolute pathname.
This occurs on first CHDIR to the root of the share.
Ensure we don't add conn->connectpath twice when doing
creating the file name hash.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Fri, 25 Jun 2021 02:11:38 +0000 (19:11 -0700)]
s3: smbd: In openat_pathref_fsp(), just check we're opening the same file type, not dev and inode.
As this is an internal open and we don't have any
locks around, we don't have to mandate the dev and ino
pair are the same (and in fact not doing so fixes bugs
when this is called by VFS modules that like to play tricks
with ino number on stream paths (fruit, and streams_xattr
are the two that currently do this).
There's no security advantage to checking that, as the
fd_openat() ensures this is safe. As fd_openat() does an
FSTAT on the handle, update the smb_fname stat info with
the "correct" values from the handle.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Fri, 25 Jun 2021 03:05:01 +0000 (20:05 -0700)]
s4: torture: Improve error messages in check_stream() and read_stream() to include the filename and NTSTATUS.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Martin Schwenke [Mon, 21 Jun 2021 10:30:21 +0000 (20:30 +1000)]
ctdb-scripts: Ignore ShellCheck SC3013 for test -nt
In ShellCheck 0.7.2, POSIX compatibility warnings got their own SC3xxx
error codes, so now both the old and new codes need to be ignored.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Fri Jun 25 10:06:48 UTC 2021 on sn-devel-184
Martin Schwenke [Mon, 21 Jun 2021 05:26:38 +0000 (15:26 +1000)]
ctdb-tests: Force stub version of service in eventscript tests
Fedora 34 now has a shell function for the which command, which causes
these uses of which to return the enclosing function definition rather
than the executable file as expected.
The event script unit tests always expect the stub service command to
be used, so the conditional in these functions is unnecessary.
$CTDB_HELPER_BINDIR already conveniently points to the stub directory,
so use it here.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Tue, 15 Sep 2020 03:54:30 +0000 (13:54 +1000)]
ctdb-common: Drop unused include of mkdir_p.h
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Tue, 19 May 2020 07:57:35 +0000 (17:57 +1000)]
ctdb-daemon: Close server socket when switching to client
The socket is set close-on-exec but that doesn't help for processes
that do not exec(). This should be done for all child processes.
This has been seen in testing where "ctdb shutdown" waits for the
socket to close before succeeding. It appears that lingering
vacuuming processes have not closed the socket when becoming clients
so they cause "ctdb shutdown" to hang even though the main daemon
process has exited. The cause of the lingering vacuuming processes
has been previously examined but still isn't understood.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Andreas Schneider [Wed, 23 Jun 2021 08:13:24 +0000 (10:13 +0200)]
WHATSNEW: Document changes of trusted domains scanning and enterpise principals
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Jun 23 10:46:22 UTC 2021 on sn-devel-184
Andreas Schneider [Fri, 18 Jun 2021 08:11:06 +0000 (10:11 +0200)]
docs-xml: Disable `winbind scan trusted domains` by default
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Andreas Schneider [Tue, 15 Jun 2021 14:14:11 +0000 (16:14 +0200)]
docs-xml: Enable `winbind use krb5 enterprise principals` by default
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Andreas Schneider [Tue, 15 Jun 2021 15:31:46 +0000 (17:31 +0200)]
docs-xml: Fix description of `winbind use krb5 enterprise principals`
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 22 Jun 2021 17:23:22 +0000 (10:23 -0700)]
s3: VFS: posixacl_xattr: Remove posixacl_xattr_acl_set_file(). No longer used.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Wed Jun 23 09:56:00 UTC 2021 on sn-devel-184
Jeremy Allison [Tue, 22 Jun 2021 17:22:16 +0000 (10:22 -0700)]
s3: VFS: posixacl_xattr: Remove posixacl_xattr_acl_get_file(). No longer used.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
Andreas Schneider [Tue, 22 Jun 2021 07:03:06 +0000 (09:03 +0200)]
lib:ldb-samba: Use debug level defines
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Jun 23 09:03:42 UTC 2021 on sn-devel-184
Andreas Schneider [Tue, 22 Jun 2021 07:00:09 +0000 (09:00 +0200)]
lib:ldb-samba: Set log level for ldb tracing to 11
We should not enable ldb tracing on debug level 10 which is meant for
Samba debug logs and not trace logs.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Fri, 18 Jun 2021 18:43:30 +0000 (11:43 -0700)]
s3: VFS: Update status of SMB_VFS_RENAMEAT.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Tue Jun 22 14:34:06 UTC 2021 on sn-devel-184
Jeremy Allison [Fri, 18 Jun 2021 18:41:22 +0000 (11:41 -0700)]
s3: smbd: Make SMB_VFS_RENAMEAT() a relative call.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
Jeremy Allison [Fri, 18 Jun 2021 04:36:33 +0000 (21:36 -0700)]
s3: VFS: streams_xattr: Use real dirfsp for SMB_VFS_RENAMEAT()
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
Jeremy Allison [Fri, 18 Jun 2021 04:05:00 +0000 (21:05 -0700)]
s3: VFS: streams_depot: Use real dirfsp for SMB_VFS_RENAMEAT()
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
Jeremy Allison [Fri, 18 Jun 2021 03:58:37 +0000 (20:58 -0700)]
s3: VFS: unityed_media: Use real dirfsp for SMB_VFS_RENAMEAT()
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
Jeremy Allison [Fri, 18 Jun 2021 03:52:19 +0000 (20:52 -0700)]
s3: VFS: time_audit: Use real dirfsp for SMB_VFS_RENAMEAT()
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
Jeremy Allison [Thu, 17 Jun 2021 19:28:30 +0000 (12:28 -0700)]
s3: VFS: syncops: Use real dirfsp for SMB_VFS_RENAMEAT()
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
Noel Power [Thu, 17 Jun 2021 18:29:17 +0000 (11:29 -0700)]
s3: VFS: virusfilter: Use real dirfsp for SMB_VFS_RENAMEAT()
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>