| 1 | /*
|
|---|
| 2 | Unix SMB/Netbios implementation.
|
|---|
| 3 | VFS module to get and set irix acls
|
|---|
| 4 | Copyright (C) Michael Adam 2006
|
|---|
| 5 |
|
|---|
| 6 | This program is free software; you can redistribute it and/or modify
|
|---|
| 7 | it under the terms of the GNU General Public License as published by
|
|---|
| 8 | the Free Software Foundation; either version 2 of the License, or
|
|---|
| 9 | (at your option) any later version.
|
|---|
| 10 |
|
|---|
| 11 | This program is distributed in the hope that it will be useful,
|
|---|
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 14 | GNU General Public License for more details.
|
|---|
| 15 |
|
|---|
| 16 | You should have received a copy of the GNU General Public License
|
|---|
| 17 | along with this program; if not, write to the Free Software
|
|---|
| 18 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|---|
| 19 | */
|
|---|
| 20 |
|
|---|
| 21 | #include "includes.h"
|
|---|
| 22 |
|
|---|
| 23 | /* prototypes for private functions first - for clarity */
|
|---|
| 24 |
|
|---|
| 25 | /* public functions - the api */
|
|---|
| 26 |
|
|---|
| 27 | SMB_ACL_T irixacl_sys_acl_get_file(vfs_handle_struct *handle,
|
|---|
| 28 | const char *path_p,
|
|---|
| 29 | SMB_ACL_TYPE_T type)
|
|---|
| 30 | {
|
|---|
| 31 | errno = ENOTSUP;
|
|---|
| 32 | return NULL;
|
|---|
| 33 | }
|
|---|
| 34 |
|
|---|
| 35 | SMB_ACL_T irixacl_sys_acl_get_fd(vfs_handle_struct *handle,
|
|---|
| 36 | files_struct *fsp,
|
|---|
| 37 | int fd)
|
|---|
| 38 | {
|
|---|
| 39 | errno = ENOTSUP;
|
|---|
| 40 | return NULL;
|
|---|
| 41 | }
|
|---|
| 42 |
|
|---|
| 43 | int irixacl_sys_acl_set_file(vfs_handle_struct *handle,
|
|---|
| 44 | const char *name,
|
|---|
| 45 | SMB_ACL_TYPE_T type,
|
|---|
| 46 | SMB_ACL_T theacl)
|
|---|
| 47 | {
|
|---|
| 48 | errno = ENOTSUP;
|
|---|
| 49 | return -1;
|
|---|
| 50 | }
|
|---|
| 51 |
|
|---|
| 52 | int irixacl_sys_acl_set_fd(vfs_handle_struct *handle,
|
|---|
| 53 | files_struct *fsp,
|
|---|
| 54 | int fd, SMB_ACL_T theacl)
|
|---|
| 55 | {
|
|---|
| 56 | errno = ENOTSUP;
|
|---|
| 57 | return -1;
|
|---|
| 58 | }
|
|---|
| 59 |
|
|---|
| 60 | int irixacl_sys_acl_delete_def_file(vfs_handle_struct *handle,
|
|---|
| 61 | const char *path)
|
|---|
| 62 | {
|
|---|
| 63 | errno = ENOTSUP;
|
|---|
| 64 | return -1;
|
|---|
| 65 | }
|
|---|
| 66 |
|
|---|
| 67 | /* private functions */
|
|---|
| 68 |
|
|---|
| 69 | /* VFS operations structure */
|
|---|
| 70 |
|
|---|
| 71 | static vfs_op_tuple irixacl_op_tuples[] = {
|
|---|
| 72 | /* Disk operations */
|
|---|
| 73 | {SMB_VFS_OP(irixacl_sys_acl_get_file),
|
|---|
| 74 | SMB_VFS_OP_SYS_ACL_GET_FILE,
|
|---|
| 75 | SMB_VFS_LAYER_TRANSPARENT},
|
|---|
| 76 |
|
|---|
| 77 | {SMB_VFS_OP(irixacl_sys_acl_get_fd),
|
|---|
| 78 | SMB_VFS_OP_SYS_ACL_GET_FD,
|
|---|
| 79 | SMB_VFS_LAYER_TRANSPARENT},
|
|---|
| 80 |
|
|---|
| 81 | {SMB_VFS_OP(irixacl_sys_acl_set_file),
|
|---|
| 82 | SMB_VFS_OP_SYS_ACL_SET_FILE,
|
|---|
| 83 | SMB_VFS_LAYER_TRANSPARENT},
|
|---|
| 84 |
|
|---|
| 85 | {SMB_VFS_OP(irixacl_sys_acl_set_fd),
|
|---|
| 86 | SMB_VFS_OP_SYS_ACL_SET_FD,
|
|---|
| 87 | SMB_VFS_LAYER_TRANSPARENT},
|
|---|
| 88 |
|
|---|
| 89 | {SMB_VFS_OP(irixacl_sys_acl_delete_def_file),
|
|---|
| 90 | SMB_VFS_OP_SYS_ACL_DELETE_DEF_FILE,
|
|---|
| 91 | SMB_VFS_LAYER_TRANSPARENT},
|
|---|
| 92 |
|
|---|
| 93 | {SMB_VFS_OP(NULL),
|
|---|
| 94 | SMB_VFS_OP_NOOP,
|
|---|
| 95 | SMB_VFS_LAYER_NOOP}
|
|---|
| 96 | };
|
|---|
| 97 |
|
|---|
| 98 | NTSTATUS vfs_irixacl_init(void);
|
|---|
| 99 | NTSTATUS vfs_irixacl_init(void)
|
|---|
| 100 | {
|
|---|
| 101 | return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "irixacl",
|
|---|
| 102 | irixacl_op_tuples);
|
|---|
| 103 | }
|
|---|
| 104 |
|
|---|
| 105 | /* ENTE */
|
|---|