From: Jeremy Allison Date: Wed, 18 Sep 2019 02:08:26 +0000 (-0700) Subject: s3: VFS: vfs_streams_xattr. Wrap Convert streams_xattr_unlink() -> streams_xattr_unli... X-Git-Tag: talloc-2.3.1~629 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b3b83c15314859a121ebd4b1983b643fb3a490c;p=thirdparty%2Fsamba.git s3: VFS: vfs_streams_xattr. Wrap Convert streams_xattr_unlink() -> streams_xattr_unlink_internal() so we can add parameters. Make streams_xattr_unlink() a wrapper calling the internal version. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c index ea2f902502b..b04fe723b67 100644 --- a/source3/modules/vfs_streams_xattr.c +++ b/source3/modules/vfs_streams_xattr.c @@ -546,8 +546,10 @@ static int streams_xattr_close(vfs_handle_struct *handle, return ret; } -static int streams_xattr_unlink(vfs_handle_struct *handle, - const struct smb_filename *smb_fname) +static int streams_xattr_unlink_internal(vfs_handle_struct *handle, + struct files_struct *dirfsp, + const struct smb_filename *smb_fname, + int flags) { NTSTATUS status; int ret = -1; @@ -594,6 +596,15 @@ static int streams_xattr_unlink(vfs_handle_struct *handle, return ret; } +static int streams_xattr_unlink(vfs_handle_struct *handle, + const struct smb_filename *smb_fname) +{ + return streams_xattr_unlink_internal(handle, + handle->conn->cwd_fsp, + smb_fname, + 0); +} + static int streams_xattr_unlinkat(vfs_handle_struct *handle, struct files_struct *dirfsp, const struct smb_filename *smb_fname, @@ -606,8 +617,10 @@ static int streams_xattr_unlinkat(vfs_handle_struct *handle, smb_fname, flags); } else { - ret = streams_xattr_unlink(handle, - smb_fname); + ret = streams_xattr_unlink_internal(handle, + dirfsp, + smb_fname, + flags); } return ret; }