if (!p)
return(NULL);
- ptr = SMB_VFS_READDIR(conn, (DIR *)p, sbuf);
+ ptr = SMB_VFS_READDIR(conn, (SMB_STRUCT_DIR *)p, sbuf);
if (!ptr)
return(NULL);
return handle->fns->fs_capabilities(handle, p_ts_res);
}
+NTSTATUS smb_vfs_call_get_dfs_referrals(struct vfs_handle_struct *handle,
+ struct dfs_GetDFSReferral *r)
+{
+ VFS_FIND(get_dfs_referrals);
+ return handle->fns->get_dfs_referrals(handle, r);
+}
+
SMB_STRUCT_DIR *smb_vfs_call_opendir(struct vfs_handle_struct *handle,
const char *fname, const char *mask,
uint32 attributes)
}
/* cd into the parent dir to pin it. */
- ret = SMB_VFS_CHDIR(fsp->conn, parent_dir);
+ ret = vfs_ChDir(fsp->conn, parent_dir);
if (ret == -1) {
return map_nt_error_from_unix(errno);
}
/* Must use lstat here. */
ret = SMB_VFS_LSTAT(fsp->conn, &local_fname);
if (ret == -1) {
- return map_nt_error_from_unix(errno);
+ status = map_nt_error_from_unix(errno);
+ goto out;
}
/* Ensure it matches the fsp stat. */
if (!check_same_stat(&local_fname.st, &fsp->fsp_name->st)) {
- return NT_STATUS_ACCESS_DENIED;
+ status = NT_STATUS_ACCESS_DENIED;
+ goto out;
}
path = final_component;
} else {
status = map_nt_error_from_unix(errno);
}
+ out:
+
if (as_root) {
vfs_ChDir(fsp->conn,saved_dir);
TALLOC_FREE(saved_dir);
mapped_name);
}
+NTSTATUS smb_vfs_call_fsctl(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ TALLOC_CTX *ctx,
+ uint32_t function,
+ uint16_t req_flags,
+ const uint8_t *in_data,
+ uint32_t in_len,
+ uint8_t **out_data,
+ uint32_t max_out_len,
+ uint32_t *out_len)
+{
+ VFS_FIND(fsctl);
+ return handle->fns->fsctl(handle, fsp, ctx, function, req_flags,
+ in_data, in_len, out_data, max_out_len,
+ out_len);
+}
+
NTSTATUS smb_vfs_call_fget_nt_acl(struct vfs_handle_struct *handle,
struct files_struct *fsp,
uint32 security_info,