return NT_STATUS_NO_MEMORY;
}
- if (fsp != NULL && fsp->fh->fd != -1) {
+ if (fsp != NULL && fsp_get_pathref_fd(fsp) != -1) {
length = SMB_VFS_NEXT_FGETXATTR(handle,
fsp,
config->xattr_name,
return status;
}
-static NTSTATUS nfs4acl_xattr_get_nt_acl(struct vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- uint32_t security_info,
- TALLOC_CTX *mem_ctx,
- struct security_descriptor **sd)
-{
- struct SMB4ACL_T *smb4acl = NULL;
- TALLOC_CTX *frame = talloc_stackframe();
- DATA_BLOB blob;
- NTSTATUS status;
-
- status = nfs4acl_get_blob(handle, NULL, smb_fname, frame, &blob);
- if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) {
- TALLOC_FREE(frame);
- return nfs4acl_xattr_default_sd(
- handle, smb_fname, mem_ctx, sd);
- }
- if (!NT_STATUS_IS_OK(status)) {
- TALLOC_FREE(frame);
- return status;
- }
-
- status = nfs4acl_blob_to_smb4(handle, &blob, frame, &smb4acl);
- if (!NT_STATUS_IS_OK(status)) {
- TALLOC_FREE(frame);
- return status;
- }
-
- status = smb_get_nt_acl_nfs4(handle->conn, smb_fname, NULL,
- security_info, mem_ctx, sd,
- smb4acl);
- TALLOC_FREE(frame);
- return status;
-}
-
static NTSTATUS nfs4acl_xattr_get_nt_acl_at(struct vfs_handle_struct *handle,
struct files_struct *dirfsp,
const struct smb_filename *smb_fname,
return false;
}
- if (fsp->fh->fd != -1) {
+ if (fsp_get_pathref_fd(fsp) != -1) {
ret = SMB_VFS_NEXT_FSETXATTR(handle, fsp, config->xattr_name,
blob.data, blob.length, 0);
} else {
restored_mode = existing_mode | expected_mode;
- if (fsp->fh->fd != -1) {
+ if (fsp_get_io_fd(fsp) != -1) {
ret = SMB_VFS_NEXT_FCHMOD(handle,
fsp,
restored_mode);
static int nfs4acl_xattr_fail__sys_acl_set_fd(vfs_handle_struct *handle,
files_struct *fsp,
+ SMB_ACL_TYPE_T type,
SMB_ACL_T theacl)
{
return -1;
static struct vfs_fn_pointers nfs4acl_xattr_fns = {
.connect_fn = nfs4acl_connect,
.fget_nt_acl_fn = nfs4acl_xattr_fget_nt_acl,
- .get_nt_acl_fn = nfs4acl_xattr_get_nt_acl,
.get_nt_acl_at_fn = nfs4acl_xattr_get_nt_acl_at,
.fset_nt_acl_fn = nfs4acl_xattr_fset_nt_acl,