static NTSTATUS nfs4acl_get_blob(struct vfs_handle_struct *handle,
files_struct *fsp,
- const struct smb_filename *smb_fname_in,
TALLOC_CTX *mem_ctx,
DATA_BLOB *blob)
{
struct nfs4acl_config *config = NULL;
- const struct smb_filename *smb_fname = NULL;
+ const struct smb_filename *smb_fname = fsp->fsp_name;
size_t allocsize = 256;
ssize_t length;
bool ok;
*blob = data_blob_null;
- if (fsp == NULL && smb_fname_in == NULL) {
- return NT_STATUS_INTERNAL_ERROR;
- }
- smb_fname = smb_fname_in;
- if (smb_fname == NULL) {
- smb_fname = fsp->fsp_name;
- }
- if (smb_fname == NULL) {
- return NT_STATUS_INTERNAL_ERROR;
- }
-
ok = nfs4acl_validate_blob(handle, smb_fname);
if (!ok) {
return NT_STATUS_INTERNAL_ERROR;
return NT_STATUS_NO_MEMORY;
}
- if (fsp != NULL && fsp_get_pathref_fd(fsp) != -1) {
- length = SMB_VFS_NEXT_FGETXATTR(handle,
- fsp,
- config->xattr_name,
- blob->data,
- blob->length);
- } else {
- length = SMB_VFS_NEXT_GETXATTR(handle,
- smb_fname,
- config->xattr_name,
- blob->data,
- blob->length);
- }
+ length = SMB_VFS_NEXT_FGETXATTR(handle,
+ fsp,
+ config->xattr_name,
+ blob->data,
+ blob->length);
} while (length == -1 && errno == ERANGE && allocsize <= 65536);
if (length == -1) {
DATA_BLOB blob;
NTSTATUS status;
- status = nfs4acl_get_blob(handle, fsp, NULL, frame, &blob);
+ status = nfs4acl_get_blob(handle, fsp, frame, &blob);
if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) {
TALLOC_FREE(frame);
return nfs4acl_xattr_default_sd(
status = nfs4acl_get_blob(handle,
smb_fname->fsp,
- smb_fname,
frame,
&blob);
if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) {