source: vendor/current/source3/modules/vfs_offline.c

Last change on this file was 988, checked in by Silvan Scherrer, 9 years ago

Samba Server: update vendor to version 4.4.3

File size: 1.4 KB
Line 
1/*
2 Unix SMB/CIFS implementation.
3 Samba VFS module for marking all files as offline.
4
5 (c) Uri Simchoni, 2015
6
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.
11
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.
16
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/>.
19 */
20
21#include "includes.h"
22
23static uint32_t offline_fs_capabilities(struct vfs_handle_struct *handle,
24 enum timestamp_set_resolution *p_ts_res)
25{
26 return SMB_VFS_NEXT_FS_CAPABILITIES(handle, p_ts_res) |
27 FILE_SUPPORTS_REMOTE_STORAGE;
28}
29
30static bool offline_is_offline(struct vfs_handle_struct *handle,
31 const struct smb_filename *fname,
32 SMB_STRUCT_STAT *stbuf)
33{
34 return true;
35}
36
37static struct vfs_fn_pointers offline_fns = {
38 .fs_capabilities_fn = offline_fs_capabilities,
39 .is_offline_fn = offline_is_offline,
40};
41
42NTSTATUS vfs_offline_init(void);
43NTSTATUS vfs_offline_init(void)
44{
45 return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "offline",
46 &offline_fns);
47}
Note: See TracBrowser for help on using the repository browser.