2 * Store streams in a separate subdirectory
4 * Copyright (C) Volker Lendecke, 2007
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 3 of the License, or
9 * (at your option) any later version.
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.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, see <http://www.gnu.org/licenses/>.
21 #include "smbd/smbd.h"
22 #include "system/filesys.h"
25 #define DBGC_CLASS DBGC_VFS
28 * Excerpt from a mail from tridge:
30 * Volker, what I'm thinking of is this:
31 * /mount-point/.streams/XX/YY/aaaa.bbbb/namedstream1
32 * /mount-point/.streams/XX/YY/aaaa.bbbb/namedstream2
34 * where XX/YY is a 2 level hash based on the fsid/inode. "aaaa.bbbb"
35 * is the fsid/inode. "namedstreamX" is a file named after the stream
39 static uint32_t hash_fn(DATA_BLOB key)
41 uint32_t value; /* Used to compute the hash value. */
42 uint32_t i; /* Used to cycle through random values. */
44 /* Set the initial value from the key size. */
45 for (value = 0x238F13AF * key.length, i=0; i < key.length; i++)
46 value = (value + (key.data[i] << (i*5 % 24)));
48 return (1103515243 * value + 12345);
52 * With the hashing scheme based on the inode we need to protect against
53 * streams showing up on files with re-used inodes. This can happen if we
54 * create a stream directory from within Samba, and a local process or NFS
55 * client deletes the file without deleting the streams directory. When the
56 * inode is re-used and the stream directory is still around, the streams in
57 * there would be show up as belonging to the new file.
59 * There are several workarounds for this, probably the easiest one is on
60 * systems which have a true birthtime stat element: When the file has a later
61 * birthtime than the streams directory, then we have to recreate the
64 * The other workaround is to somehow mark the file as generated by Samba with
65 * something that a NFS client would not do. The closest one is a special
66 * xattr value being set. On systems which do not support xattrs, it might be
67 * an option to put in a special ACL entry for a non-existing group.
70 static bool file_is_valid(vfs_handle_struct *handle, const char *path)
74 DEBUG(10, ("file_is_valid (%s) called\n", path));
76 if (SMB_VFS_GETXATTR(handle->conn, path, SAMBA_XATTR_MARKER,
77 &buf, sizeof(buf)) != sizeof(buf)) {
78 DEBUG(10, ("GETXATTR failed: %s\n", strerror(errno)));
83 DEBUG(10, ("got wrong buffer content: '%c'\n", buf));
90 static bool mark_file_valid(vfs_handle_struct *handle, const char *path)
95 DEBUG(10, ("marking file %s as valid\n", path));
97 ret = SMB_VFS_SETXATTR(handle->conn, path, SAMBA_XATTR_MARKER,
98 &buf, sizeof(buf), 0);
101 DEBUG(10, ("SETXATTR failed: %s\n", strerror(errno)));
109 * Given an smb_filename, determine the stream directory using the file's
112 static char *stream_dir(vfs_handle_struct *handle,
113 const struct smb_filename *smb_fname,
114 const SMB_STRUCT_STAT *base_sbuf, bool create_it)
117 struct smb_filename *smb_fname_hash = NULL;
119 SMB_STRUCT_STAT base_sbuf_tmp;
120 uint8_t first, second;
127 struct smb_filename *rootdir_fname = NULL;
128 struct smb_filename *tmp_fname = NULL;
130 check_valid = lp_parm_bool(SNUM(handle->conn),
131 "streams_depot", "check_valid", true);
133 tmp = talloc_asprintf(talloc_tos(), "%s/.streams", handle->conn->cwd);
140 rootdir = lp_parm_const_string(
141 SNUM(handle->conn), "streams_depot", "directory",
144 rootdir_fname = synthetic_smb_fname(talloc_tos(),
148 if (rootdir_fname == NULL) {
153 /* Stat the base file if it hasn't already been done. */
154 if (base_sbuf == NULL) {
155 struct smb_filename *smb_fname_base;
157 smb_fname_base = synthetic_smb_fname(
158 talloc_tos(), smb_fname->base_name, NULL, NULL);
159 if (smb_fname_base == NULL) {
163 if (SMB_VFS_NEXT_STAT(handle, smb_fname_base) == -1) {
164 TALLOC_FREE(smb_fname_base);
167 base_sbuf_tmp = smb_fname_base->st;
168 TALLOC_FREE(smb_fname_base);
170 base_sbuf_tmp = *base_sbuf;
173 id = SMB_VFS_FILE_ID_CREATE(handle->conn, &base_sbuf_tmp);
175 push_file_id_16((char *)id_buf, &id);
177 hash = hash_fn(data_blob_const(id_buf, sizeof(id_buf)));
180 second = (hash >> 8) & 0xff;
182 id_hex = hex_encode_talloc(talloc_tos(), id_buf, sizeof(id_buf));
184 if (id_hex == NULL) {
189 result = talloc_asprintf(talloc_tos(), "%s/%2.2X/%2.2X/%s", rootdir,
190 first, second, id_hex);
194 if (result == NULL) {
199 smb_fname_hash = synthetic_smb_fname(talloc_tos(), result, NULL, NULL);
200 if (smb_fname_hash == NULL) {
205 if (SMB_VFS_NEXT_STAT(handle, smb_fname_hash) == 0) {
206 struct smb_filename *smb_fname_new = NULL;
210 if (!S_ISDIR(smb_fname_hash->st.st_ex_mode)) {
216 file_is_valid(handle, smb_fname->base_name)) {
221 * Someone has recreated a file under an existing inode
222 * without deleting the streams directory.
223 * Move it away or remove if streams_depot:delete_lost is set.
227 delete_lost = lp_parm_bool(SNUM(handle->conn), "streams_depot",
228 "delete_lost", false);
231 DEBUG(3, ("Someone has recreated a file under an "
232 "existing inode. Removing: %s\n",
233 smb_fname_hash->base_name));
234 recursive_rmdir(talloc_tos(), handle->conn,
236 SMB_VFS_NEXT_RMDIR(handle, smb_fname_hash->base_name);
238 newname = talloc_asprintf(talloc_tos(), "lost-%lu",
240 DEBUG(3, ("Someone has recreated a file under an "
241 "existing inode. Renaming: %s to: %s\n",
242 smb_fname_hash->base_name,
244 if (newname == NULL) {
249 smb_fname_new = synthetic_smb_fname(
250 talloc_tos(), newname, NULL, NULL);
251 TALLOC_FREE(newname);
252 if (smb_fname_new == NULL) {
257 if (SMB_VFS_NEXT_RENAME(handle, smb_fname_hash,
258 smb_fname_new) == -1) {
259 TALLOC_FREE(smb_fname_new);
260 if ((errno == EEXIST) || (errno == ENOTEMPTY)) {
266 TALLOC_FREE(smb_fname_new);
275 if ((SMB_VFS_NEXT_MKDIR(handle, rootdir_fname, 0755) != 0)
276 && (errno != EEXIST)) {
280 tmp = talloc_asprintf(result, "%s/%2.2X", rootdir, first);
286 tmp_fname = synthetic_smb_fname(talloc_tos(), tmp, NULL, NULL);
287 if (tmp_fname == NULL) {
292 if ((SMB_VFS_NEXT_MKDIR(handle, tmp_fname, 0755) != 0)
293 && (errno != EEXIST)) {
298 TALLOC_FREE(tmp_fname);
300 tmp = talloc_asprintf(result, "%s/%2.2X/%2.2X", rootdir, first,
307 tmp_fname = synthetic_smb_fname(talloc_tos(), tmp, NULL, NULL);
308 if (tmp_fname == NULL) {
313 if ((SMB_VFS_NEXT_MKDIR(handle, tmp_fname, 0755) != 0)
314 && (errno != EEXIST)) {
319 TALLOC_FREE(tmp_fname);
321 /* smb_fname_hash is the struct smb_filename version of 'result' */
322 if ((SMB_VFS_NEXT_MKDIR(handle, smb_fname_hash, 0755) != 0)
323 && (errno != EEXIST)) {
327 if (check_valid && !mark_file_valid(handle, smb_fname->base_name)) {
331 TALLOC_FREE(rootdir_fname);
332 TALLOC_FREE(tmp_fname);
333 TALLOC_FREE(smb_fname_hash);
337 TALLOC_FREE(rootdir_fname);
338 TALLOC_FREE(tmp_fname);
339 TALLOC_FREE(smb_fname_hash);
344 * Given a stream name, populate smb_fname_out with the actual location of the
347 static NTSTATUS stream_smb_fname(vfs_handle_struct *handle,
348 const struct smb_filename *smb_fname,
349 struct smb_filename **smb_fname_out,
352 char *dirname, *stream_fname;
356 *smb_fname_out = NULL;
358 stype = strchr_m(smb_fname->stream_name + 1, ':');
361 if (strcasecmp_m(stype, ":$DATA") != 0) {
362 return NT_STATUS_INVALID_PARAMETER;
366 dirname = stream_dir(handle, smb_fname, NULL, create_dir);
368 if (dirname == NULL) {
369 status = map_nt_error_from_unix(errno);
373 stream_fname = talloc_asprintf(talloc_tos(), "%s/%s", dirname,
374 smb_fname->stream_name);
376 if (stream_fname == NULL) {
377 status = NT_STATUS_NO_MEMORY;
382 /* Append an explicit stream type if one wasn't specified. */
383 stream_fname = talloc_asprintf(talloc_tos(), "%s:$DATA",
385 if (stream_fname == NULL) {
386 status = NT_STATUS_NO_MEMORY;
390 /* Normalize the stream type to upercase. */
391 if (!strupper_m(strrchr_m(stream_fname, ':') + 1)) {
392 status = NT_STATUS_INVALID_PARAMETER;
397 DEBUG(10, ("stream filename = %s\n", stream_fname));
399 /* Create an smb_filename with stream_name == NULL. */
400 *smb_fname_out = synthetic_smb_fname(
401 talloc_tos(), stream_fname, NULL, NULL);
402 if (*smb_fname_out == NULL) {
403 return NT_STATUS_NO_MEMORY;
409 DEBUG(5, ("stream_name failed: %s\n", strerror(errno)));
410 TALLOC_FREE(*smb_fname_out);
414 static NTSTATUS walk_streams(vfs_handle_struct *handle,
415 struct smb_filename *smb_fname_base,
417 bool (*fn)(const char *dirname,
423 DIR *dirhandle = NULL;
424 const char *dirent = NULL;
425 char *talloced = NULL;
427 dirname = stream_dir(handle, smb_fname_base, &smb_fname_base->st,
430 if (dirname == NULL) {
431 if (errno == ENOENT) {
437 return map_nt_error_from_unix(errno);
440 DEBUG(10, ("walk_streams: dirname=%s\n", dirname));
442 dirhandle = SMB_VFS_NEXT_OPENDIR(handle, dirname, NULL, 0);
444 if (dirhandle == NULL) {
445 TALLOC_FREE(dirname);
446 return map_nt_error_from_unix(errno);
449 while ((dirent = vfs_readdirname(handle->conn, dirhandle, NULL,
450 &talloced)) != NULL) {
452 if (ISDOT(dirent) || ISDOTDOT(dirent)) {
453 TALLOC_FREE(talloced);
457 DEBUG(10, ("walk_streams: dirent=%s\n", dirent));
459 if (!fn(dirname, dirent, private_data)) {
460 TALLOC_FREE(talloced);
463 TALLOC_FREE(talloced);
466 SMB_VFS_NEXT_CLOSEDIR(handle, dirhandle);
468 if (pdirname != NULL) {
472 TALLOC_FREE(dirname);
479 * Helper to stat/lstat the base file of an smb_fname. This will actually
480 * fills in the stat struct in smb_filename.
482 static int streams_depot_stat_base(vfs_handle_struct *handle,
483 struct smb_filename *smb_fname,
486 char *tmp_stream_name;
489 tmp_stream_name = smb_fname->stream_name;
490 smb_fname->stream_name = NULL;
492 result = SMB_VFS_NEXT_STAT(handle, smb_fname);
494 result = SMB_VFS_NEXT_LSTAT(handle, smb_fname);
496 smb_fname->stream_name = tmp_stream_name;
500 static int streams_depot_stat(vfs_handle_struct *handle,
501 struct smb_filename *smb_fname)
503 struct smb_filename *smb_fname_stream = NULL;
507 DEBUG(10, ("streams_depot_stat called for [%s]\n",
508 smb_fname_str_dbg(smb_fname)));
510 if (!is_ntfs_stream_smb_fname(smb_fname)) {
511 return SMB_VFS_NEXT_STAT(handle, smb_fname);
514 /* If the default stream is requested, just stat the base file. */
515 if (is_ntfs_default_stream_smb_fname(smb_fname)) {
516 return streams_depot_stat_base(handle, smb_fname, true);
519 /* Stat the actual stream now. */
520 status = stream_smb_fname(handle, smb_fname, &smb_fname_stream,
522 if (!NT_STATUS_IS_OK(status)) {
524 errno = map_errno_from_nt_status(status);
528 ret = SMB_VFS_NEXT_STAT(handle, smb_fname_stream);
530 /* Update the original smb_fname with the stat info. */
531 smb_fname->st = smb_fname_stream->st;
533 TALLOC_FREE(smb_fname_stream);
539 static int streams_depot_lstat(vfs_handle_struct *handle,
540 struct smb_filename *smb_fname)
542 struct smb_filename *smb_fname_stream = NULL;
546 DEBUG(10, ("streams_depot_lstat called for [%s]\n",
547 smb_fname_str_dbg(smb_fname)));
549 if (!is_ntfs_stream_smb_fname(smb_fname)) {
550 return SMB_VFS_NEXT_LSTAT(handle, smb_fname);
553 /* If the default stream is requested, just stat the base file. */
554 if (is_ntfs_default_stream_smb_fname(smb_fname)) {
555 return streams_depot_stat_base(handle, smb_fname, false);
558 /* Stat the actual stream now. */
559 status = stream_smb_fname(handle, smb_fname, &smb_fname_stream,
561 if (!NT_STATUS_IS_OK(status)) {
563 errno = map_errno_from_nt_status(status);
567 ret = SMB_VFS_NEXT_LSTAT(handle, smb_fname_stream);
570 TALLOC_FREE(smb_fname_stream);
574 static int streams_depot_open(vfs_handle_struct *handle,
575 struct smb_filename *smb_fname,
576 files_struct *fsp, int flags, mode_t mode)
578 struct smb_filename *smb_fname_stream = NULL;
579 struct smb_filename *smb_fname_base = NULL;
583 if (!is_ntfs_stream_smb_fname(smb_fname)) {
584 return SMB_VFS_NEXT_OPEN(handle, smb_fname, fsp, flags, mode);
587 /* If the default stream is requested, just open the base file. */
588 if (is_ntfs_default_stream_smb_fname(smb_fname)) {
589 char *tmp_stream_name;
591 tmp_stream_name = smb_fname->stream_name;
592 smb_fname->stream_name = NULL;
593 ret = SMB_VFS_NEXT_OPEN(handle, smb_fname, fsp, flags, mode);
594 smb_fname->stream_name = tmp_stream_name;
599 /* Ensure the base file still exists. */
600 smb_fname_base = synthetic_smb_fname(
601 talloc_tos(), smb_fname->base_name, NULL, NULL);
602 if (smb_fname_base == NULL) {
608 ret = SMB_VFS_NEXT_STAT(handle, smb_fname_base);
613 /* Determine the stream name, and then open it. */
614 status = stream_smb_fname(handle, smb_fname, &smb_fname_stream, true);
615 if (!NT_STATUS_IS_OK(status)) {
617 errno = map_errno_from_nt_status(status);
621 ret = SMB_VFS_NEXT_OPEN(handle, smb_fname_stream, fsp, flags, mode);
624 TALLOC_FREE(smb_fname_stream);
625 TALLOC_FREE(smb_fname_base);
629 static int streams_depot_unlink(vfs_handle_struct *handle,
630 const struct smb_filename *smb_fname)
632 struct smb_filename *smb_fname_base = NULL;
635 DEBUG(10, ("streams_depot_unlink called for %s\n",
636 smb_fname_str_dbg(smb_fname)));
638 /* If there is a valid stream, just unlink the stream and return. */
639 if (is_ntfs_stream_smb_fname(smb_fname) &&
640 !is_ntfs_default_stream_smb_fname(smb_fname)) {
641 struct smb_filename *smb_fname_stream = NULL;
644 status = stream_smb_fname(handle, smb_fname, &smb_fname_stream,
646 if (!NT_STATUS_IS_OK(status)) {
647 errno = map_errno_from_nt_status(status);
651 ret = SMB_VFS_NEXT_UNLINK(handle, smb_fname_stream);
653 TALLOC_FREE(smb_fname_stream);
658 * We potentially need to delete the per-inode streams directory
661 smb_fname_base = synthetic_smb_fname(
662 talloc_tos(), smb_fname->base_name, NULL, NULL);
663 if (smb_fname_base == NULL) {
668 if (lp_posix_pathnames()) {
669 ret = SMB_VFS_NEXT_LSTAT(handle, smb_fname_base);
671 ret = SMB_VFS_NEXT_STAT(handle, smb_fname_base);
675 TALLOC_FREE(smb_fname_base);
679 ret = SMB_VFS_NEXT_UNLINK(handle, smb_fname);
681 char *dirname = stream_dir(handle, smb_fname_base,
682 &smb_fname_base->st, false);
684 if (dirname != NULL) {
685 SMB_VFS_NEXT_RMDIR(handle, dirname);
687 TALLOC_FREE(dirname);
690 TALLOC_FREE(smb_fname_base);
694 static int streams_depot_rmdir(vfs_handle_struct *handle, const char *path)
696 struct smb_filename *smb_fname_base = NULL;
699 DEBUG(10, ("streams_depot_rmdir called for %s\n", path));
702 * We potentially need to delete the per-inode streams directory
705 smb_fname_base = synthetic_smb_fname(talloc_tos(), path, NULL, NULL);
706 if (smb_fname_base == NULL) {
711 if (lp_posix_pathnames()) {
712 ret = SMB_VFS_NEXT_LSTAT(handle, smb_fname_base);
714 ret = SMB_VFS_NEXT_STAT(handle, smb_fname_base);
718 TALLOC_FREE(smb_fname_base);
722 ret = SMB_VFS_NEXT_RMDIR(handle, path);
724 char *dirname = stream_dir(handle, smb_fname_base,
725 &smb_fname_base->st, false);
727 if (dirname != NULL) {
728 SMB_VFS_NEXT_RMDIR(handle, dirname);
730 TALLOC_FREE(dirname);
733 TALLOC_FREE(smb_fname_base);
737 static int streams_depot_rename(vfs_handle_struct *handle,
738 const struct smb_filename *smb_fname_src,
739 const struct smb_filename *smb_fname_dst)
741 struct smb_filename *smb_fname_src_stream = NULL;
742 struct smb_filename *smb_fname_dst_stream = NULL;
743 bool src_is_stream, dst_is_stream;
747 DEBUG(10, ("streams_depot_rename called for %s => %s\n",
748 smb_fname_str_dbg(smb_fname_src),
749 smb_fname_str_dbg(smb_fname_dst)));
751 src_is_stream = is_ntfs_stream_smb_fname(smb_fname_src);
752 dst_is_stream = is_ntfs_stream_smb_fname(smb_fname_dst);
754 if (!src_is_stream && !dst_is_stream) {
755 return SMB_VFS_NEXT_RENAME(handle, smb_fname_src,
759 /* for now don't allow renames from or to the default stream */
760 if (is_ntfs_default_stream_smb_fname(smb_fname_src) ||
761 is_ntfs_default_stream_smb_fname(smb_fname_dst)) {
766 status = stream_smb_fname(handle, smb_fname_src, &smb_fname_src_stream,
768 if (!NT_STATUS_IS_OK(status)) {
769 errno = map_errno_from_nt_status(status);
773 status = stream_smb_fname(handle, smb_fname_dst,
774 &smb_fname_dst_stream, false);
775 if (!NT_STATUS_IS_OK(status)) {
776 errno = map_errno_from_nt_status(status);
780 ret = SMB_VFS_NEXT_RENAME(handle, smb_fname_src_stream,
781 smb_fname_dst_stream);
784 TALLOC_FREE(smb_fname_src_stream);
785 TALLOC_FREE(smb_fname_dst_stream);
789 static bool add_one_stream(TALLOC_CTX *mem_ctx, unsigned int *num_streams,
790 struct stream_struct **streams,
791 const char *name, off_t size,
794 struct stream_struct *tmp;
796 tmp = talloc_realloc(mem_ctx, *streams, struct stream_struct,
802 tmp[*num_streams].name = talloc_strdup(tmp, name);
803 if (tmp[*num_streams].name == NULL) {
807 tmp[*num_streams].size = size;
808 tmp[*num_streams].alloc_size = alloc_size;
815 struct streaminfo_state {
817 vfs_handle_struct *handle;
818 unsigned int num_streams;
819 struct stream_struct *streams;
823 static bool collect_one_stream(const char *dirname,
827 struct streaminfo_state *state =
828 (struct streaminfo_state *)private_data;
829 struct smb_filename *smb_fname = NULL;
833 sname = talloc_asprintf(talloc_tos(), "%s/%s", dirname, dirent);
835 state->status = NT_STATUS_NO_MEMORY;
840 smb_fname = synthetic_smb_fname(talloc_tos(), sname, NULL, NULL);
841 if (smb_fname == NULL) {
842 state->status = NT_STATUS_NO_MEMORY;
847 if (SMB_VFS_NEXT_STAT(state->handle, smb_fname) == -1) {
848 DEBUG(10, ("Could not stat %s: %s\n", sname,
854 if (!add_one_stream(state->mem_ctx,
855 &state->num_streams, &state->streams,
856 dirent, smb_fname->st.st_ex_size,
857 SMB_VFS_GET_ALLOC_SIZE(state->handle->conn, NULL,
859 state->status = NT_STATUS_NO_MEMORY;
867 TALLOC_FREE(smb_fname);
871 static NTSTATUS streams_depot_streaminfo(vfs_handle_struct *handle,
872 struct files_struct *fsp,
875 unsigned int *pnum_streams,
876 struct stream_struct **pstreams)
878 struct smb_filename *smb_fname_base;
881 struct streaminfo_state state;
883 smb_fname_base = synthetic_smb_fname(talloc_tos(), fname, NULL, NULL);
884 if (smb_fname_base == NULL) {
885 return NT_STATUS_NO_MEMORY;
888 if ((fsp != NULL) && (fsp->fh->fd != -1)) {
889 ret = SMB_VFS_NEXT_FSTAT(handle, fsp, &smb_fname_base->st);
892 if (lp_posix_pathnames()) {
893 ret = SMB_VFS_NEXT_LSTAT(handle, smb_fname_base);
895 ret = SMB_VFS_NEXT_STAT(handle, smb_fname_base);
900 status = map_nt_error_from_unix(errno);
904 state.streams = *pstreams;
905 state.num_streams = *pnum_streams;
906 state.mem_ctx = mem_ctx;
907 state.handle = handle;
908 state.status = NT_STATUS_OK;
910 if (S_ISLNK(smb_fname_base->st.st_ex_mode)) {
912 * Currently we do't have SMB_VFS_LLISTXATTR
913 * inside the VFS which means there's no way
914 * to cope with a symlink when lp_posix_pathnames().
915 * returns true. For now ignore links.
916 * FIXME - by adding SMB_VFS_LLISTXATTR. JRA.
918 status = NT_STATUS_OK;
920 status = walk_streams(handle, smb_fname_base, NULL, collect_one_stream,
924 if (!NT_STATUS_IS_OK(status)) {
925 TALLOC_FREE(state.streams);
929 if (!NT_STATUS_IS_OK(state.status)) {
930 TALLOC_FREE(state.streams);
931 status = state.status;
935 *pnum_streams = state.num_streams;
936 *pstreams = state.streams;
937 status = SMB_VFS_NEXT_STREAMINFO(handle, fsp, fname, mem_ctx, pnum_streams, pstreams);
940 TALLOC_FREE(smb_fname_base);
944 static uint32_t streams_depot_fs_capabilities(struct vfs_handle_struct *handle,
945 enum timestamp_set_resolution *p_ts_res)
947 return SMB_VFS_NEXT_FS_CAPABILITIES(handle, p_ts_res) | FILE_NAMED_STREAMS;
950 static struct vfs_fn_pointers vfs_streams_depot_fns = {
951 .fs_capabilities_fn = streams_depot_fs_capabilities,
952 .open_fn = streams_depot_open,
953 .stat_fn = streams_depot_stat,
954 .lstat_fn = streams_depot_lstat,
955 .unlink_fn = streams_depot_unlink,
956 .rmdir_fn = streams_depot_rmdir,
957 .rename_fn = streams_depot_rename,
958 .streaminfo_fn = streams_depot_streaminfo,
961 NTSTATUS vfs_streams_depot_init(void);
962 NTSTATUS vfs_streams_depot_init(void)
964 return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "streams_depot",
965 &vfs_streams_depot_fns);