From: Jeremy Allison Date: Wed, 18 Sep 2019 02:23:31 +0000 (-0700) Subject: s3: VFS: vfs_streams_depot. Wrap Convert streams_depot_unlink() -> streams_depot_unli... X-Git-Tag: talloc-2.3.1~632 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b2fda0576c76b1a63d08a9266620fe87a2ad587;p=thirdparty%2Fsamba.git s3: VFS: vfs_streams_depot. Wrap Convert streams_depot_unlink() -> streams_depot_unlink_internal() so we can add parameters. Make streams_depot_unlink() a wrapper calling the internal version. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/modules/vfs_streams_depot.c b/source3/modules/vfs_streams_depot.c index c85e4df6dbf..c51bdac0058 100644 --- a/source3/modules/vfs_streams_depot.c +++ b/source3/modules/vfs_streams_depot.c @@ -691,8 +691,10 @@ static int streams_depot_open(vfs_handle_struct *handle, return ret; } -static int streams_depot_unlink(vfs_handle_struct *handle, - const struct smb_filename *smb_fname) +static int streams_depot_unlink_internal(vfs_handle_struct *handle, + struct files_struct *dirfsp, + const struct smb_filename *smb_fname, + int flags) { struct smb_filename *smb_fname_base = NULL; int ret = -1; @@ -777,6 +779,15 @@ static int streams_depot_unlink(vfs_handle_struct *handle, return ret; } +static int streams_depot_unlink(vfs_handle_struct *handle, + const struct smb_filename *smb_fname) +{ + return streams_depot_unlink_internal(handle, + handle->conn->cwd_fsp, + smb_fname, + 0); +} + static int streams_depot_rmdir(vfs_handle_struct *handle, const struct smb_filename *smb_fname) { @@ -854,7 +865,10 @@ static int streams_depot_unlinkat(vfs_handle_struct *handle, if (flags & AT_REMOVEDIR) { ret = streams_depot_rmdir(handle, smb_fname); } else { - ret = streams_depot_unlink(handle, smb_fname); + ret = streams_depot_unlink_internal(handle, + dirfsp, + smb_fname, + flags); } return ret; }