]>
git.ipfire.org Git - thirdparty/samba.git/log
Jeremy Allison [Tue, 8 Jun 2021 19:46:34 +0000 (12:46 -0700)]
s3: VFS: ceph_snapshots. Remove ceph_snap_gmt_get_nt_acl_at().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 8 Jun 2021 19:45:43 +0000 (12:45 -0700)]
s3: VFS: catia. Remove catia_get_nt_acl_at().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 8 Jun 2021 19:44:51 +0000 (12:44 -0700)]
s3: VFS: acl_xattr: Remove unused get_acl_blob_at().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 8 Jun 2021 19:44:05 +0000 (12:44 -0700)]
s3: VFS: acl_xattr: Remove acl_xattr_get_nt_acl_at().
Comment out get_acl_blob_at() as no longer used.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 8 Jun 2021 19:42:52 +0000 (12:42 -0700)]
s3: VFS: acl_tdb: Remove unused get_acl_blob_at().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 8 Jun 2021 19:42:00 +0000 (12:42 -0700)]
s3: VFS: acl_tdb. Remove acl_tdb_get_nt_acl_at().
Comment out get_acl_blob_at() as no longer used.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 8 Jun 2021 19:40:40 +0000 (12:40 -0700)]
s3: VFS: aixacl2: Remove aixjfs2_get_nt_acl_at().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 8 Jun 2021 19:39:56 +0000 (12:39 -0700)]
s3: VFS: afsacl: Remove afsacl_get_nt_acl_at().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 8 Jun 2021 19:38:43 +0000 (12:38 -0700)]
s3: VFS: shadow_copy2: Remove shadow_copy2_get_nt_acl_at().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 8 Jun 2021 19:34:25 +0000 (12:34 -0700)]
s3 VFS: glusterfs: Remove get_nt_acl_at_fn().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 8 Jun 2021 19:28:24 +0000 (12:28 -0700)]
s3: smbd: open_directory(). Pass down the real parent_dir->fsp to smbd_check_access_rights_fsp().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 8 Jun 2021 19:27:09 +0000 (12:27 -0700)]
s3: smbd: open_file(). Pass down the real parent_dir->fsp to smbd_check_access_rights_fsp().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 8 Jun 2021 19:24:17 +0000 (12:24 -0700)]
s3: smbd: smbd_check_access_rights_fsp(). Add dirfsp parameter.
Pass down to smbd_check_access_rights_sd().
Always pass conn->cwd_fsp for now.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 8 Jun 2021 19:16:04 +0000 (12:16 -0700)]
s3: smbd: smbd_check_access_rights_sd(). Add dirfsp parameter.
Pass down to parent_override_delete().
Always pass fsp->conn->cwd_fsp for now.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 8 Jun 2021 19:14:19 +0000 (12:14 -0700)]
s3: smbd: parent_override_delete(). Add dirfsp parameter.
Pass down to can_delete_file_in_directory().
Always pass conn->cwd_fsp for now.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 8 Jun 2021 19:02:16 +0000 (12:02 -0700)]
s3: smbd: open_directory(). Start passing a real parent dirfsp to smbd_calculate_access_mask_fsp().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 8 Jun 2021 19:00:56 +0000 (12:00 -0700)]
s3: smbd: open_file_ntcreate(). Start passing a real parent dirfsp to smbd_calculate_access_mask_fsp().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 8 Jun 2021 18:56:25 +0000 (11:56 -0700)]
s3: smbd: smbd_calculate_access_mask_fsp(). Add dirfsp parameter.
Pass this down into smbd_calculate_maximum_allowed_access_fsp().
Currently pass fsp->conn->cwd_fsp everywhere.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 8 Jun 2021 18:40:11 +0000 (11:40 -0700)]
s3: smbd: smbd_calculate_maximum_allowed_access_fsp(), add parent dirfsp parameter and pass to can_delete_file_in_directory().
Pass the same fsp->conn->cwd_fsp parameter to can_delete_file_in_directory()
dirfsp for now.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 8 Jun 2021 18:37:57 +0000 (11:37 -0700)]
s3: smbd: Remove smbd_check_access_rights(). No longer used.
There are now no more callers of SMB_VFS_GET_NT_ACL_AT().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 8 Jun 2021 18:18:34 +0000 (11:18 -0700)]
s3: smbd: can_delete_file_in_directory(), smbd_check_access_rights() -> smbd_check_access_rights_fsp().
Last user of smbd_check_access_rights().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 8 Jun 2021 18:15:59 +0000 (11:15 -0700)]
s3: smbd: can_delete_file_in_directory(), we no longer need to do the SMB_VFS_STAT() call.
All code paths must have a valid stat here.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 8 Jun 2021 18:14:29 +0000 (11:14 -0700)]
s3: smbd: In can_delete_file_in_directory(), get a real parent pathref.
Not yet used but we will use this to get the parent ACL via handle.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 8 Jun 2021 18:08:06 +0000 (11:08 -0700)]
s3: smbd: In can_delete_file_in_directory(), remove the assertion that dirfsp == conn->cwd_fsp.
Allow a real parent directory fsp to be passed in. We're not doing this
yet but this will allow more efficient calling from the open code
where we have the parent directory fsp available.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 8 Jun 2021 18:03:24 +0000 (11:03 -0700)]
s3: smbd: In can_delete_file_in_directory(), move a fast-path exit to before any pathname manipulation.
If we're root we always return true on a writable share.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 8 Jun 2021 00:28:58 +0000 (17:28 -0700)]
s3: smbd: Remove smbd_calculate_maximum_allowed_access(). No longer used.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 8 Jun 2021 00:27:29 +0000 (17:27 -0700)]
s3: smbd: Remove smbd_calculate_access_mask(). No longer used.
Comment out smbd_calculate_maximum_allowed_access() as it is
a static function and we just removed the only caller.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 8 Jun 2021 00:22:57 +0000 (17:22 -0700)]
s3: smbd: open_fake_file(), smbd_calculate_access_mask() -> smbd_calculate_access_mask_fsp().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 8 Jun 2021 00:21:04 +0000 (17:21 -0700)]
s3: smbd: open_fake_file(). Move the smbd_calculate_access_mask() check until after we've initialized the file handle.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 8 Jun 2021 00:19:25 +0000 (17:19 -0700)]
s3: smbd: open_directory(), smbd_calculate_access_mask() -> smbd_calculate_access_mask_fsp().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 8 Jun 2021 00:17:40 +0000 (17:17 -0700)]
s3: smbd: open_file_ntcreate(), smbd_calculate_access_mask() -> smbd_calculate_access_mask_fsp().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 8 Jun 2021 00:13:50 +0000 (17:13 -0700)]
s3: VFS: fruit: fruit_freaddir_attr(), smbd_calculate_access_mask() -> smbd_calculate_access_mask_fsp().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 8 Jun 2021 00:12:29 +0000 (17:12 -0700)]
s3: smbd: smbd_smb2_create_after_exec(), smbd_calculate_access_mask() -> smbd_calculate_access_mask_fsp().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 8 Jun 2021 00:07:17 +0000 (17:07 -0700)]
s3: smbd: Change check_base_file_access() to take an fsp as the first argument.
Internally, change check_base_file_access(), smbd_calculate_access_mask() -> smbd_calculate_access_mask_fsp().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 8 Jun 2021 00:02:06 +0000 (17:02 -0700)]
s3: smbd: Add smbd_calculate_access_mask_fsp().
Not yet used but this now uses smbd_calculate_maximum_allowed_access_fsp(),
so uncomment it.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Mon, 7 Jun 2021 23:37:25 +0000 (16:37 -0700)]
s3: smbd: Add new smbd_calculate_access_mask_fsp() function.
Commented out as not yet used.
Signed-off-by: Noel Power <noel.power@suse.com>
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Mon, 7 Jun 2021 23:27:22 +0000 (16:27 -0700)]
s3: smbd: open_directory(). Cleanup debug message to refer to correct function.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Mon, 7 Jun 2021 23:25:54 +0000 (16:25 -0700)]
s3: smbd: open_file(). Cleanup debug message to refer to correct function.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Mon, 7 Jun 2021 23:24:42 +0000 (16:24 -0700)]
s3: smbd: open_file(). Cleanup debug message to refer to correct function.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Mon, 7 Jun 2021 22:08:06 +0000 (15:08 -0700)]
s3: smbd: open_file(), smbd_check_access_rights() -> smbd_check_access_rights_fsp().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Mon, 7 Jun 2021 22:03:41 +0000 (15:03 -0700)]
s3: smbd: open_directory(), smbd_check_access_rights() -> smbd_check_access_rights_fsp().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Mon, 7 Jun 2021 21:58:39 +0000 (14:58 -0700)]
s3: smbd: check_base_file_access(), smbd_check_access_rights() -> smbd_check_access_rights_fsp().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Mon, 7 Jun 2021 21:55:38 +0000 (14:55 -0700)]
s3: smbd: open_file(), smbd_check_access_rights() -> smbd_check_access_rights_fsp().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Mon, 7 Jun 2021 18:25:39 +0000 (11:25 -0700)]
s3: smbd: In notify, user_can_stat_name_under_fsp(), smbd_check_access_rights -> smbd_check_access_rights_fsp
Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Mon, 7 Jun 2021 17:26:00 +0000 (10:26 -0700)]
s3: VFS: ceph_snapshots: In ceph_snap_gmt_convert_dir(), re-use the directory handle for checking SEC_DIR_LIST permission.
Similar change to the one that went into shadow_copy2.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Mon, 7 Jun 2021 17:22:53 +0000 (10:22 -0700)]
s3: VFS: ceph_snapshots: In ceph_snap_enum_snapdir(), re-use the directory handle for checking SEC_DIR_LIST permission.
Similar change to the one that went into shadow_copy2.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Mon, 7 Jun 2021 16:56:19 +0000 (09:56 -0700)]
s3: VFS: vfs_shadow_copy2: Remove check_access_snapdir().
No longer used.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Mon, 7 Jun 2021 16:47:26 +0000 (09:47 -0700)]
s3: VFS: shadow_copy2: In shadow_copy2_get_shadow_copy_data(), check for DIR_LIST access once we already have a handle on the snap directory.
There's no sense in opening a synthetic pathref first in
order to check for DIR_LIST access, then open again to
do the SMB_VFS_NEXT_FDOPENDIR() for listing.
Just open once, and check for DIR_LIST access on the
open handle before calling SMB_VFS_NEXT_FDOPENDIR() for listing.
We no longer need check_access_snapdir(), which is
static, so comment it out. Removal next.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Mon, 7 Jun 2021 17:14:27 +0000 (10:14 -0700)]
s3: smbd: Remove can_write_to_file(). Pathname call no longer used.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Fri, 4 Jun 2021 20:46:08 +0000 (13:46 -0700)]
s3: smbd: Remove user_can_write_file().
No longer used.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Fri, 4 Jun 2021 20:45:24 +0000 (13:45 -0700)]
s3: smbd: Remove user_can_read_file().
No longer used.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Fri, 4 Jun 2021 20:44:52 +0000 (13:44 -0700)]
s3: smbd: Remove is_visible_file().
No longer used.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Fri, 4 Jun 2021 20:44:06 +0000 (13:44 -0700)]
s3: smbd: Remove dptr_normal_ReadDirName().
No longer used.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Fri, 4 Jun 2021 20:41:50 +0000 (13:41 -0700)]
s3: smbd: Now smbd_dirptr_get_entry() is doing the filtering, dptr_normal_ReadDirName() is an unneeded wrapper for ReadDirName().
Just call ReadDirName() directly.
This also means:
is_visible_file()
user_can_read_file()
user_can_write_file()
are no longer used, so commen them out for subsequent removal.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Fri, 4 Jun 2021 20:32:40 +0000 (13:32 -0700)]
s3: smbd: Now all callers of is_visible_fsp() pass 'false' for the use_veto parameter, remove it.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Fri, 4 Jun 2021 20:27:52 +0000 (13:27 -0700)]
s3: smbd: Remove is_visible_file() from dptr_ReadDirName().
dptr_ReadDirName() is only called from smbd_dirptr_get_entry(),
which is now doing it's own call to is_visible_fsp().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Fri, 4 Jun 2021 17:10:55 +0000 (10:10 -0700)]
s3: smbd: In smbd_dirptr_get_entry() add a call to is_visible_fsp().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Fri, 4 Jun 2021 18:20:08 +0000 (11:20 -0700)]
s3: smbd: In smbd_dirptr_get_entry(), add an early check for VETO_PATH.
Eventually we will be able to remove the 'bool use_veto' parameter
from is_visible_fsp().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Fri, 4 Jun 2021 20:21:29 +0000 (13:21 -0700)]
s3: smbd: In can_delete_directory_fsp(), is_visible_file() -> is_visible_fsp().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Fri, 4 Jun 2021 19:47:11 +0000 (12:47 -0700)]
s3: smbd: In can_delete_directory_fsp() explicitly call IS_VETO_PATH().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Fri, 4 Jun 2021 17:09:34 +0000 (10:09 -0700)]
s3: smbd: Allow is_visible_fsp() to cope with POSIX symlinks/MSDFS links.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Thu, 3 Jun 2021 19:40:54 +0000 (12:40 -0700)]
s3: smbd: is_visible_file() is now static to dir.c.
Once fully replaced in there it can be removed.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Fri, 4 Jun 2021 20:37:03 +0000 (13:37 -0700)]
s3: smbd: Fix old bug in reply_copy() where is_visible_file(), now is_visible_fsp() wasn't checking VETO files.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Thu, 3 Jun 2021 19:38:18 +0000 (12:38 -0700)]
s3: smbd: reply_copy(), is_visible_file() -> is_visible_fsp().
Offtopic, the function reply_copy() is insane and should be removed.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Thu, 3 Jun 2021 19:28:37 +0000 (12:28 -0700)]
s3: smbd: rename_internals(), is_visible_file() -> is_visible_fsp().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Fri, 4 Jun 2021 18:58:39 +0000 (11:58 -0700)]
s3: smbd: In unlink_internals(), is_visible_file() -> is_visible_fsp().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Fri, 4 Jun 2021 19:16:17 +0000 (12:16 -0700)]
s3: smbd: rmdir_internals(), fix the initial directory scan pass to use is_visible_fsp().
Add the same symlink accomodation as before.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Thu, 3 Jun 2021 18:15:50 +0000 (11:15 -0700)]
s3: smbd: Allow rmdir_internals() to cope with veto'ed symlinks.
We are only dealing with VETO'ed objects
here. If it's a symlink, just delete the
link without caring what it is pointing
to as this operation is safe.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Thu, 3 Jun 2021 00:51:25 +0000 (17:51 -0700)]
s3: smbd: In rmdir_internals(), Change is_visible_file() -> is_visible_fsp().
This needs some slight re-arranging, as previously
is_visible_file() preceeds the call to recursive_rmdir().
As we have to move the call to is_visible_fsp()
until after we have direntry_fname->fsp, then
we must also move the recursive_rmdir() to be
after is_visible_fsp().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Thu, 3 Jun 2021 00:42:27 +0000 (17:42 -0700)]
s3: smbd: Change recursive_rmdir(), is_visible_file() -> is_visible_fsp().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Thu, 3 Jun 2021 00:36:16 +0000 (17:36 -0700)]
s3: smbd: Add user_can_write_fsp().
Change is_visible_fsp() to use it.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 2 Jun 2021 18:31:45 +0000 (11:31 -0700)]
s3: smbd: Add user_can_read_fsp().
Change is_visible_fsp() to use it.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Thu, 3 Jun 2021 00:30:26 +0000 (17:30 -0700)]
s3: smbd: Add is_visible_fsp().
Not yet used.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 2 Jun 2021 20:39:50 +0000 (13:39 -0700)]
s3: smbd: set_ea_dos_attribute(), smbd_check_access_rights() -> smbd_check_access_rights_fsp().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 2 Jun 2021 20:37:30 +0000 (13:37 -0700)]
s3: smbd: reply_setatr(), smbd_check_access_rights() -> smbd_check_access_rights_fsp().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 2 Jun 2021 19:12:26 +0000 (12:12 -0700)]
s3: smbd: file_ntimes(), can_write_to_file() -> can_write_to_fsp().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 2 Jun 2021 19:01:17 +0000 (12:01 -0700)]
s3: smbd: file_set_dosmode(), can_write_to_file() -> can_write_to_fsp().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 2 Jun 2021 18:59:07 +0000 (11:59 -0700)]
s3: smbd: dos_mode_from_sbuf(), can_write_to_file() -> can_write_to_fsp().
Code with MS-DFS link where smb_fname->fsp == NULL.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 2 Jun 2021 18:43:41 +0000 (11:43 -0700)]
s3: smbd: Change acl_group_override() -> acl_group_override_fsp().
We always have a valid fsp here. Inside acl_group_override_fsp()
change can_write_to_file() -> can_write_to_fsp().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 2 Jun 2021 18:39:15 +0000 (11:39 -0700)]
s3: smbd: set_ea_dos_attribute(), can_write_to_file() -> can_write_to_fsp().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 2 Jun 2021 18:40:21 +0000 (11:40 -0700)]
s3: smbd: call_nt_transact_create(), can_write_to_file() -> can_write_to_fsp().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 2 Jun 2021 18:37:56 +0000 (11:37 -0700)]
s3: smbd: In reply_ntcreate_and_X(), can_write_to_file() -> can_write_to_fsp().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 2 Jun 2021 18:36:59 +0000 (11:36 -0700)]
s3: smbd: Add can_write_to_fsp(). Not yet used.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Thu, 3 Jun 2021 00:05:13 +0000 (17:05 -0700)]
s3: eventlog: get_nt_acl_no_snum(), SMB_VFS_GET_NT_ACL_AT() -> SMB_VFS_FGET_NT_ACL().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 2 Jun 2021 20:32:28 +0000 (13:32 -0700)]
s3: torture: cmd_get_nt_acl(), SMB_VFS_GET_NT_ACL_AT() -> SMB_VFS_FGET_NT_ACL()
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Wed, 2 Jun 2021 20:29:27 +0000 (13:29 -0700)]
s3: smbd: get_nt_acl_conn(), SMB_VFS_GET_NT_ACL_AT() -> SMB_VFS_FGET_NT_ACL()
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Noel Power [Mon, 24 May 2021 22:55:59 +0000 (15:55 -0700)]
s3/smbd: pysmbd: Ensure SMB_VFS_GET_NT_ACL_AT() has an fsp when called.
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Noel Power [Mon, 24 May 2021 22:52:44 +0000 (15:52 -0700)]
s3/smbd: pysmbd: SMB_VFS_SYS_ACL_GET_FILE -> SMB_VFS_SYS_ACL_GET_FD
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 25 May 2021 01:39:52 +0000 (18:39 -0700)]
s3: smbd: Inside inherit_new_acl(), change from SMB_VFS_GET_NT_ACL_AT() -> SMB_VFS_FGET_NT_ACL().
One more pathname-based call gone.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 25 May 2021 01:38:06 +0000 (18:38 -0700)]
s3: smbd: Pass parent_dir_fname parameter to inherit_new_acl().
Not yet used.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 25 May 2021 00:00:22 +0000 (17:00 -0700)]
s3: smbd: Remove directory_has_default_acl().
No more users.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Mon, 24 May 2021 23:59:30 +0000 (16:59 -0700)]
s3: smbd: Change directory_has_default_acl() -> directory_has_default_acl_fsp().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Mon, 24 May 2021 23:58:12 +0000 (16:58 -0700)]
s3: Add directory_has_default_acl_fsp().
Not yet used.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Mon, 24 May 2021 18:17:22 +0000 (11:17 -0700)]
s3: smbd: Remove check_parent_access().
No more callers.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Mon, 24 May 2021 18:15:29 +0000 (11:15 -0700)]
s3: smbd: Change open_file() to use check_parent_access_fsp() instead of check_parent_access().
No more uses of check_parent_access().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Mon, 24 May 2021 23:51:16 +0000 (16:51 -0700)]
s3: smbd: In open_file_ntcreate(), remove the local parent_dir_fname and rename the passed in parameter to be the same.
open_file() can now use parent_dir_fname->fsp for handle-based
access calls.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Mon, 24 May 2021 23:49:44 +0000 (16:49 -0700)]
s3: smbd: In open_file_ntcreate() initialize the local parent_dir_fname from the passed in parent_dir_fname_in.
We can now remove the call to parent_smb_fname().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Mon, 24 May 2021 23:47:34 +0000 (16:47 -0700)]
s3: smbd: Pass parent_dir_fname_in, smb_fname_atname_in from create_file_unixpath() to open_file_ntcreate().
Not yet used.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Mon, 24 May 2021 23:39:35 +0000 (16:39 -0700)]
s3: smbd: In mkdir_internal(), remove the local parent_dir_fname. We pass it in from the caller now.
This will allow us to change directory_has_default_acl() to
directory_has_default_acl_fsp() later.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Mon, 24 May 2021 23:36:43 +0000 (16:36 -0700)]
s3: smbd: In mkdir_internal(), use the passed in 'smb_fname_atname' instead of a local 'base_name' variable.
atname is a better name, as base_name refers to the name without streams
and this is nothing to do with streams.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>