From: Volker Lendecke Date: Sat, 4 Oct 2025 16:36:47 +0000 (+0200) Subject: vfs_fake_acls: Reduce indentation in fake_acls_stat() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3fede963c647c2ee719f11a222e0c146d061feb;p=thirdparty%2Fsamba.git vfs_fake_acls: Reduce indentation in fake_acls_stat() Use an early error return Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- diff --git a/source3/modules/vfs_fake_acls.c b/source3/modules/vfs_fake_acls.c index bb1ed25cdff..3387461626f 100644 --- a/source3/modules/vfs_fake_acls.c +++ b/source3/modules/vfs_fake_acls.c @@ -129,6 +129,13 @@ static int fake_acls_stat(vfs_handle_struct *handle, return 0; } + if (fsp_get_pathref_fd(handle->conn->cwd_fsp) == -1) { + /* + * No tcon around, fail as if we don't have the EAs + */ + return 0; + } + /* * openat_pathref_fsp() expects a talloc'ed smb_filename. stat * can be passed a struct from the stack. Make a talloc'ed @@ -140,19 +147,13 @@ static int fake_acls_stat(vfs_handle_struct *handle, return -1; } - if (fsp_get_pathref_fd(handle->conn->cwd_fsp) == -1) { - /* - * No tcon around, fail as if we don't have the EAs - */ - status = NT_STATUS_INVALID_HANDLE; - } else { - /* Recursion guard. */ - prd->calling_pathref_fsp = true; - status = openat_pathref_fsp(handle->conn->cwd_fsp, - smb_fname_cp); - /* End recursion guard. */ - prd->calling_pathref_fsp = false; - } + /* Recursion guard. */ + prd->calling_pathref_fsp = true; + + status = openat_pathref_fsp(handle->conn->cwd_fsp, smb_fname_cp); + + /* End recursion guard. */ + prd->calling_pathref_fsp = false; if (!NT_STATUS_IS_OK(status)) { /*