From: Jeremy Allison Date: Fri, 6 Sep 2019 17:02:27 +0000 (-0700) Subject: s3: VFS: vfs_streams_depot: Change use of SMB_VFS_NEXT_MKDIR -> SMB_VFS_NEXT_MKDIRAT. X-Git-Tag: talloc-2.3.1~888 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea93b756cb23e37d367a07480a50666633b21ef9;p=thirdparty%2Fsamba.git s3: VFS: vfs_streams_depot: Change use of SMB_VFS_NEXT_MKDIR -> SMB_VFS_NEXT_MKDIRAT. Use conn->cwd_fsp as current fsp. No logic change for now. 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 419aee99173..e9019037869 100644 --- a/source3/modules/vfs_streams_depot.c +++ b/source3/modules/vfs_streams_depot.c @@ -128,6 +128,7 @@ static char *stream_dir(vfs_handle_struct *handle, char *rootdir = NULL; struct smb_filename *rootdir_fname = NULL; struct smb_filename *tmp_fname = NULL; + int ret; check_valid = lp_parm_bool(SNUM(handle->conn), "streams_depot", "check_valid", true); @@ -295,8 +296,11 @@ static char *stream_dir(vfs_handle_struct *handle, goto fail; } - if ((SMB_VFS_NEXT_MKDIR(handle, rootdir_fname, 0755) != 0) - && (errno != EEXIST)) { + ret = SMB_VFS_NEXT_MKDIRAT(handle, + handle->conn->cwd_fsp, + rootdir_fname, + 0755); + if ((ret != 0) && (errno != EEXIST)) { goto fail; } @@ -316,8 +320,11 @@ static char *stream_dir(vfs_handle_struct *handle, goto fail; } - if ((SMB_VFS_NEXT_MKDIR(handle, tmp_fname, 0755) != 0) - && (errno != EEXIST)) { + ret = SMB_VFS_NEXT_MKDIRAT(handle, + handle->conn->cwd_fsp, + tmp_fname, + 0755); + if ((ret != 0) && (errno != EEXIST)) { goto fail; } @@ -341,8 +348,11 @@ static char *stream_dir(vfs_handle_struct *handle, goto fail; } - if ((SMB_VFS_NEXT_MKDIR(handle, tmp_fname, 0755) != 0) - && (errno != EEXIST)) { + ret = SMB_VFS_NEXT_MKDIRAT(handle, + handle->conn->cwd_fsp, + tmp_fname, + 0755); + if ((ret != 0) && (errno != EEXIST)) { goto fail; } @@ -350,8 +360,11 @@ static char *stream_dir(vfs_handle_struct *handle, TALLOC_FREE(tmp_fname); /* smb_fname_hash is the struct smb_filename version of 'result' */ - if ((SMB_VFS_NEXT_MKDIR(handle, smb_fname_hash, 0755) != 0) - && (errno != EEXIST)) { + ret = SMB_VFS_NEXT_MKDIRAT(handle, + handle->conn->cwd_fsp, + smb_fname_hash, + 0755); + if ((ret != 0) && (errno != EEXIST)) { goto fail; }