Use vfs_cifs as a basis for vfs_proxy
[Samba/vfs_proxy.git] / source3 / modules / vfs_onefs.c
blobb51858fbaec0a83e35fd46cef71fd329dff50570
1 /*
2 * Unix SMB/CIFS implementation.
3 * Support for OneFS
5 * Copyright (C) Tim Prouty, 2008
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, see <http://www.gnu.org/licenses/>.
21 #include "includes.h"
22 #include "onefs.h"
24 #undef DBGC_CLASS
25 #define DBGC_CLASS DBGC_VFS
27 static int onefs_mkdir(vfs_handle_struct *handle, const char *path,
28 mode_t mode)
30 DEBUG(0, ("SMB_VFS_MKDIR should never be called in vfs_onefs"));
31 return SMB_VFS_NEXT_MKDIR(handle, path, mode);
34 static int onefs_open(vfs_handle_struct *handle, const char *fname,
35 files_struct *fsp, int flags, mode_t mode)
37 DEBUG(0, ("SMB_VFS_OPEN should never be called in vfs_onefs"));
38 return SMB_VFS_NEXT_OPEN(handle, fname, fsp, flags, mode);
41 static vfs_op_tuple onefs_ops[] = {
42 {SMB_VFS_OP(onefs_mkdir), SMB_VFS_OP_MKDIR,
43 SMB_VFS_LAYER_OPAQUE},
44 {SMB_VFS_OP(onefs_open), SMB_VFS_OP_OPEN,
45 SMB_VFS_LAYER_OPAQUE},
46 {SMB_VFS_OP(onefs_create_file), SMB_VFS_OP_CREATE_FILE,
47 SMB_VFS_LAYER_OPAQUE},
48 {SMB_VFS_OP(onefs_fget_nt_acl), SMB_VFS_OP_FGET_NT_ACL,
49 SMB_VFS_LAYER_OPAQUE},
50 {SMB_VFS_OP(onefs_get_nt_acl), SMB_VFS_OP_GET_NT_ACL,
51 SMB_VFS_LAYER_OPAQUE},
52 {SMB_VFS_OP(onefs_fset_nt_acl), SMB_VFS_OP_FSET_NT_ACL,
53 SMB_VFS_LAYER_OPAQUE},
54 {SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
57 NTSTATUS vfs_onefs_init(void)
59 return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "onefs",
60 onefs_ops);