Merge branch 'master' of ssh://git.samba.org/data/git/samba
[samba.git] / source3 / modules / vfs_acl_xattr.c
1 /*
2  * Store Windows ACLs in xattrs.
3  *
4  * Copyright (C) Volker Lendecke, 2008
5  * Copyright (C) Jeremy Allison, 2008
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 /* NOTE: This is an experimental module, not yet finished. JRA. */
22
23 #include "includes.h"
24 #include "librpc/gen_ndr/xattr.h"
25 #include "librpc/gen_ndr/ndr_xattr.h"
26
27 #undef DBGC_CLASS
28 #define DBGC_CLASS DBGC_VFS
29
30 /*******************************************************************
31  Parse out a struct security_descriptor from a DATA_BLOB.
32 *******************************************************************/
33
34 static NTSTATUS parse_acl_blob(const DATA_BLOB *pblob,
35                                 uint32 security_info,
36                                 struct security_descriptor **ppdesc)
37 {
38         TALLOC_CTX *ctx = talloc_tos();
39         struct xattr_NTACL xacl;
40         enum ndr_err_code ndr_err;
41         size_t sd_size;
42
43         ndr_err = ndr_pull_struct_blob(pblob, ctx, NULL, &xacl,
44                         (ndr_pull_flags_fn_t)ndr_pull_xattr_NTACL);
45
46         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
47                 DEBUG(5, ("parse_acl_blob: ndr_pull_xattr_NTACL failed: %s\n",
48                         ndr_errstr(ndr_err)));
49                 return ndr_map_error2ntstatus(ndr_err);;
50         }
51
52         if (xacl.version != 2) {
53                 return NT_STATUS_REVISION_MISMATCH;
54         }
55
56         *ppdesc = make_sec_desc(ctx, SEC_DESC_REVISION, xacl.info.sd_ts->sd->type | SEC_DESC_SELF_RELATIVE,
57                         (security_info & OWNER_SECURITY_INFORMATION)
58                         ? xacl.info.sd_ts->sd->owner_sid : NULL,
59                         (security_info & GROUP_SECURITY_INFORMATION)
60                         ? xacl.info.sd_ts->sd->group_sid : NULL,
61                         (security_info & SACL_SECURITY_INFORMATION)
62                         ? xacl.info.sd_ts->sd->sacl : NULL,
63                         (security_info & DACL_SECURITY_INFORMATION)
64                         ? xacl.info.sd_ts->sd->dacl : NULL,
65                         &sd_size);
66
67         TALLOC_FREE(xacl.info.sd);
68
69         return (*ppdesc != NULL) ? NT_STATUS_OK : NT_STATUS_NO_MEMORY;
70 }
71
72 /*******************************************************************
73  Pull a security descriptor into a DATA_BLOB from a xattr.
74 *******************************************************************/
75
76 static NTSTATUS get_acl_blob(TALLOC_CTX *ctx,
77                         vfs_handle_struct *handle,
78                         files_struct *fsp,
79                         const char *name,
80                         DATA_BLOB *pblob)
81 {
82         size_t size = 1024;
83         uint8_t *val = NULL;
84         uint8_t *tmp;
85         ssize_t sizeret;
86         int saved_errno = 0;
87
88         ZERO_STRUCTP(pblob);
89
90   again:
91
92         tmp = TALLOC_REALLOC_ARRAY(ctx, val, uint8_t, size);
93         if (tmp == NULL) {
94                 TALLOC_FREE(val);
95                 return NT_STATUS_NO_MEMORY;
96         }
97         val = tmp;
98
99         become_root();
100         if (fsp && fsp->fh->fd != -1) {
101                 sizeret = SMB_VFS_FGETXATTR(fsp, XATTR_NTACL_NAME, val, size);
102         } else {
103                 sizeret = SMB_VFS_GETXATTR(handle->conn, name,
104                                         XATTR_NTACL_NAME, val, size);
105         }
106         if (sizeret == -1) {
107                 saved_errno = errno;
108         }
109         unbecome_root();
110
111         /* Max ACL size is 65536 bytes. */
112         if (sizeret == -1) {
113                 errno = saved_errno;
114                 if ((errno == ERANGE) && (size != 65536)) {
115                         /* Too small, try again. */
116                         size = 65536;
117                         goto again;
118                 }
119
120                 /* Real error - exit here. */
121                 TALLOC_FREE(val);
122                 return map_nt_error_from_unix(errno);
123         }
124
125         pblob->data = val;
126         pblob->length = sizeret;
127         return NT_STATUS_OK;
128 }
129
130 /*******************************************************************
131  Create a DATA_BLOB from a security descriptor.
132 *******************************************************************/
133
134 static NTSTATUS create_acl_blob(const struct security_descriptor *psd, DATA_BLOB *pblob)
135 {
136         struct xattr_NTACL xacl;
137         struct security_descriptor_timestamp sd_ts;
138         enum ndr_err_code ndr_err;
139         TALLOC_CTX *ctx = talloc_tos();
140         struct timespec curr = timespec_current();
141
142         ZERO_STRUCT(xacl);
143         ZERO_STRUCT(sd_ts);
144
145         /* Horrid hack as setting an xattr changes the ctime
146          * on Linux. This gives a race of 1 second during
147          * which we would not see a POSIX ACL set.
148          */
149         curr.tv_sec += 1;
150
151         xacl.version = 2;
152         xacl.info.sd_ts = &sd_ts;
153         xacl.info.sd_ts->sd = CONST_DISCARD(struct security_descriptor *, psd);
154         unix_timespec_to_nt_time(&xacl.info.sd_ts->last_changed, curr);
155
156         DEBUG(10, ("create_acl_blob: timestamp stored as %s\n",
157                 timestring(ctx, curr.tv_sec) ));
158
159         ndr_err = ndr_push_struct_blob(
160                         pblob, ctx, NULL, &xacl,
161                         (ndr_push_flags_fn_t)ndr_push_xattr_NTACL);
162
163         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
164                 DEBUG(5, ("create_acl_blob: ndr_push_xattr_NTACL failed: %s\n",
165                         ndr_errstr(ndr_err)));
166                 return ndr_map_error2ntstatus(ndr_err);;
167         }
168
169         return NT_STATUS_OK;
170 }
171
172 /*******************************************************************
173  Store a DATA_BLOB into an xattr given an fsp pointer.
174 *******************************************************************/
175
176 static NTSTATUS store_acl_blob_fsp(vfs_handle_struct *handle,
177                                 files_struct *fsp,
178                                 DATA_BLOB *pblob)
179 {
180         int ret;
181         int saved_errno = 0;
182
183         DEBUG(10,("store_acl_blob_fsp: storing blob length %u on file %s\n",
184                         (unsigned int)pblob->length, fsp->fsp_name));
185
186         become_root();
187         if (fsp->fh->fd != -1) {
188                 ret = SMB_VFS_FSETXATTR(fsp, XATTR_NTACL_NAME,
189                         pblob->data, pblob->length, 0);
190         } else {
191                 ret = SMB_VFS_SETXATTR(fsp->conn, fsp->fsp_name,
192                                 XATTR_NTACL_NAME,
193                                 pblob->data, pblob->length, 0);
194         }
195         if (ret) {
196                 saved_errno = errno;
197         }
198         unbecome_root();
199         if (ret) {
200                 errno = saved_errno;
201                 DEBUG(5, ("store_acl_blob_fsp: setting attr failed for file %s"
202                         "with error %s\n",
203                         fsp->fsp_name,
204                         strerror(errno) ));
205                 return map_nt_error_from_unix(errno);
206         }
207         return NT_STATUS_OK;
208 }
209
210 /*******************************************************************
211  Store a DATA_BLOB into an xattr given a pathname.
212 *******************************************************************/
213
214 static NTSTATUS store_acl_blob_pathname(vfs_handle_struct *handle,
215                                         const char *fname,
216                                         DATA_BLOB *pblob)
217 {
218         connection_struct *conn = handle->conn;
219         int ret;
220         int saved_errno = 0;
221
222         DEBUG(10,("store_acl_blob_pathname: storing blob "
223                         "length %u on file %s\n",
224                         (unsigned int)pblob->length, fname));
225
226         become_root();
227         ret = SMB_VFS_SETXATTR(conn, fname,
228                                 XATTR_NTACL_NAME,
229                                 pblob->data, pblob->length, 0);
230         if (ret) {
231                 saved_errno = errno;
232         }
233         unbecome_root();
234         if (ret) {
235                 errno = saved_errno;
236                 DEBUG(5, ("store_acl_blob_pathname: setting attr failed "
237                         "for file %s with error %s\n",
238                         fname,
239                         strerror(errno) ));
240                 return map_nt_error_from_unix(errno);
241         }
242         return NT_STATUS_OK;
243 }
244
245 /*******************************************************************
246  Store a DATA_BLOB into an xattr given a pathname.
247 *******************************************************************/
248
249 static NTSTATUS get_nt_acl_xattr_internal(vfs_handle_struct *handle,
250                                         files_struct *fsp,
251                                         const char *name,
252                                         uint32 security_info,
253                                         struct security_descriptor **ppdesc)
254 {
255         TALLOC_CTX *ctx = talloc_tos();
256         DATA_BLOB blob;
257         NTSTATUS status;
258
259         if (fsp && name == NULL) {
260                 name = fsp->fsp_name;
261         }
262
263         DEBUG(10, ("get_nt_acl_xattr_internal: name=%s\n", name));
264
265         status = get_acl_blob(ctx, handle, fsp, name, &blob);
266         if (!NT_STATUS_IS_OK(status)) {
267                 DEBUG(10, ("get_acl_blob returned %s\n", nt_errstr(status)));
268                 return status;
269         }
270
271         status = parse_acl_blob(&blob, security_info, ppdesc);
272         if (!NT_STATUS_IS_OK(status)) {
273                 DEBUG(10, ("parse_acl_blob returned %s\n",
274                                 nt_errstr(status)));
275                 return status;
276         }
277
278         TALLOC_FREE(blob.data);
279         return status;
280 }
281
282 /*********************************************************************
283  Create a default security descriptor for a file in case no inheritance
284  exists. All permissions to the owner and SYSTEM.
285 *********************************************************************/
286
287 static struct security_descriptor *default_file_sd(TALLOC_CTX *mem_ctx,
288                                                 SMB_STRUCT_STAT *psbuf)
289 {
290         struct dom_sid owner_sid, group_sid;
291         size_t sd_size;
292         struct security_ace *pace = NULL;
293         struct security_acl *pacl = NULL;
294
295         uid_to_sid(&owner_sid, psbuf->st_uid);
296         gid_to_sid(&group_sid, psbuf->st_gid);
297
298         pace = TALLOC_ARRAY(mem_ctx, struct security_ace, 2);
299         if (!pace) {
300                 return NULL;
301         }
302
303         init_sec_ace(&pace[0], &owner_sid, SEC_ACE_TYPE_ACCESS_ALLOWED,
304                         SEC_RIGHTS_FILE_ALL, 0);
305         init_sec_ace(&pace[1], &global_sid_System, SEC_ACE_TYPE_ACCESS_ALLOWED,
306                         SEC_RIGHTS_FILE_ALL, 0);
307
308         pacl = make_sec_acl(mem_ctx,
309                                 NT4_ACL_REVISION,
310                                 2,
311                                 pace);
312         if (!pacl) {
313                 return NULL;
314         }
315         return make_sec_desc(mem_ctx,
316                         SECURITY_DESCRIPTOR_REVISION_1,
317                         SEC_DESC_SELF_RELATIVE|SEC_DESC_DACL_PRESENT,
318                         &owner_sid,
319                         &group_sid,
320                         NULL,
321                         pacl,
322                         &sd_size);
323 }
324
325 /*********************************************************************
326 *********************************************************************/
327
328 static NTSTATUS inherit_new_acl(vfs_handle_struct *handle,
329                                         const char *fname,
330                                         files_struct *fsp,
331                                         bool container)
332 {
333         TALLOC_CTX *ctx = talloc_tos();
334         NTSTATUS status;
335         struct security_descriptor *parent_desc = NULL;
336         struct security_descriptor *psd = NULL;
337         DATA_BLOB blob;
338         size_t size;
339         char *parent_name;
340
341         if (!parent_dirname_talloc(ctx,
342                                 fname,
343                                 &parent_name,
344                                 NULL)) {
345                 return NT_STATUS_NO_MEMORY;
346         }
347
348         DEBUG(10,("inherit_new_acl: check directory %s\n",
349                         parent_name));
350
351         status = get_nt_acl_xattr_internal(handle,
352                                         NULL,
353                                         parent_name,
354                                         (OWNER_SECURITY_INFORMATION |
355                                          GROUP_SECURITY_INFORMATION |
356                                          DACL_SECURITY_INFORMATION),
357                                         &parent_desc);
358         if (NT_STATUS_IS_OK(status)) {
359                 /* Create an inherited descriptor from the parent. */
360
361                 if (DEBUGLEVEL >= 10) {
362                         DEBUG(10,("inherit_new_acl: parent acl is:\n"));
363                         NDR_PRINT_DEBUG(security_descriptor, parent_desc);
364                 }
365
366                 status = se_create_child_secdesc(ctx,
367                                 &psd,
368                                 &size,
369                                 parent_desc,
370                                 &handle->conn->server_info->ptok->user_sids[PRIMARY_USER_SID_INDEX],
371                                 &handle->conn->server_info->ptok->user_sids[PRIMARY_GROUP_SID_INDEX],
372                                 container);
373                 if (!NT_STATUS_IS_OK(status)) {
374                         return status;
375                 }
376
377                 if (DEBUGLEVEL >= 10) {
378                         DEBUG(10,("inherit_new_acl: child acl is:\n"));
379                         NDR_PRINT_DEBUG(security_descriptor, psd);
380                 }
381
382         } else {
383                 DEBUG(10,("inherit_new_acl: directory %s failed "
384                         "to get acl %s\n",
385                         parent_name,
386                         nt_errstr(status) ));
387         }
388
389         if (!psd || psd->dacl == NULL) {
390                 SMB_STRUCT_STAT sbuf;
391                 int ret;
392
393                 TALLOC_FREE(psd);
394                 if (fsp && !fsp->is_directory && fsp->fh->fd != -1) {
395                         ret = SMB_VFS_FSTAT(fsp, &sbuf);
396                 } else {
397                         ret = SMB_VFS_STAT(handle->conn,fname, &sbuf);
398                 }
399                 if (ret == -1) {
400                         return map_nt_error_from_unix(errno);
401                 }
402                 psd = default_file_sd(ctx, &sbuf);
403                 if (!psd) {
404                         return NT_STATUS_NO_MEMORY;
405                 }
406
407                 if (DEBUGLEVEL >= 10) {
408                         DEBUG(10,("inherit_new_acl: default acl is:\n"));
409                         NDR_PRINT_DEBUG(security_descriptor, psd);
410                 }
411         }
412
413         status = create_acl_blob(psd, &blob);
414         if (!NT_STATUS_IS_OK(status)) {
415                 return status;
416         }
417         if (fsp) {
418                 return store_acl_blob_fsp(handle, fsp, &blob);
419         } else {
420                 return store_acl_blob_pathname(handle, fname, &blob);
421         }
422 }
423
424 /*********************************************************************
425  Check ACL on open. For new files inherit from parent directory.
426 *********************************************************************/
427
428 static int open_acl_xattr(vfs_handle_struct *handle,
429                                         const char *fname,
430                                         files_struct *fsp,
431                                         int flags,
432                                         mode_t mode)
433 {
434         uint32_t access_granted = 0;
435         struct security_descriptor *pdesc = NULL;
436         bool file_existed = true;
437         NTSTATUS status = get_nt_acl_xattr_internal(handle,
438                                         NULL,
439                                         fname,
440                                         (OWNER_SECURITY_INFORMATION |
441                                          GROUP_SECURITY_INFORMATION |
442                                          DACL_SECURITY_INFORMATION),
443                                         &pdesc);
444         if (NT_STATUS_IS_OK(status)) {
445                 /* See if we can access it. */
446                 status = smb1_file_se_access_check(pdesc,
447                                         handle->conn->server_info->ptok,
448                                         fsp->access_mask,
449                                         &access_granted);
450                 if (!NT_STATUS_IS_OK(status)) {
451                         DEBUG(10,("open_acl_xattr: file %s open "
452                                 "refused with error %s\n",
453                                 fname,
454                                 nt_errstr(status) ));
455                         errno = map_errno_from_nt_status(status);
456                         return -1;
457                 }
458         } else if (NT_STATUS_EQUAL(status,NT_STATUS_OBJECT_NAME_NOT_FOUND)) {
459                 file_existed = false;
460         }
461
462         DEBUG(10,("open_acl_xattr: get_nt_acl_attr_internal for "
463                 "file %s returned %s\n",
464                 fname,
465                 nt_errstr(status) ));
466
467         fsp->fh->fd = SMB_VFS_NEXT_OPEN(handle, fname, fsp, flags, mode);
468
469         if (!file_existed && fsp->fh->fd != -1) {
470                 /* File was created. Inherit from parent directory. */
471                 string_set(&fsp->fsp_name, fname);
472                 inherit_new_acl(handle, fname, fsp, false);
473         }
474
475         return fsp->fh->fd;
476 }
477
478 static int mkdir_acl_xattr(vfs_handle_struct *handle, const char *path, mode_t mode)
479 {
480         int ret = SMB_VFS_NEXT_MKDIR(handle, path, mode);
481
482         if (ret == -1) {
483                 return ret;
484         }
485         /* New directory - inherit from parent. */
486         inherit_new_acl(handle, path, NULL, true);
487         return ret;
488 }
489
490 /*********************************************************************
491  Fetch a security descriptor given an fsp.
492 *********************************************************************/
493
494 static NTSTATUS fget_nt_acl_xattr(vfs_handle_struct *handle, files_struct *fsp,
495         uint32 security_info, struct security_descriptor **ppdesc)
496 {
497         NTSTATUS status = get_nt_acl_xattr_internal(handle, fsp,
498                                 NULL, security_info, ppdesc);
499         if (NT_STATUS_IS_OK(status)) {
500                 if (DEBUGLEVEL >= 10) {
501                         DEBUG(10,("fget_nt_acl_xattr: returning xattr sd for file %s\n",
502                                 fsp->fsp_name));
503                         NDR_PRINT_DEBUG(security_descriptor, *ppdesc);
504                 }
505                 return NT_STATUS_OK;
506         }
507
508         DEBUG(10,("fget_nt_acl_xattr: failed to get xattr sd for file %s, Error %s\n",
509                         fsp->fsp_name,
510                         nt_errstr(status) ));
511
512         return SMB_VFS_NEXT_FGET_NT_ACL(handle, fsp,
513                         security_info, ppdesc);
514 }
515
516 /*********************************************************************
517  Fetch a security descriptor given a pathname.
518 *********************************************************************/
519
520 static NTSTATUS get_nt_acl_xattr(vfs_handle_struct *handle,
521         const char *name, uint32 security_info, struct security_descriptor **ppdesc)
522 {
523         NTSTATUS status = get_nt_acl_xattr_internal(handle, NULL,
524                                 name, security_info, ppdesc);
525         if (NT_STATUS_IS_OK(status)) {
526                 if (DEBUGLEVEL >= 10) {
527                         DEBUG(10,("get_nt_acl_xattr: returning xattr sd for file %s\n",
528                                 name));
529                         NDR_PRINT_DEBUG(security_descriptor, *ppdesc);
530                 }
531                 return NT_STATUS_OK;
532         }
533
534         DEBUG(10,("get_nt_acl_xattr: failed to get xattr sd for file %s, Error %s\n",
535                         name,
536                         nt_errstr(status) ));
537
538         return SMB_VFS_NEXT_GET_NT_ACL(handle, name,
539                         security_info, ppdesc);
540 }
541
542 /*********************************************************************
543  Store a security descriptor given an fsp.
544 *********************************************************************/
545
546 static NTSTATUS fset_nt_acl_xattr(vfs_handle_struct *handle, files_struct *fsp,
547         uint32 security_info_sent, const struct security_descriptor *psd)
548 {
549         NTSTATUS status;
550         DATA_BLOB blob;
551
552         if (DEBUGLEVEL >= 10) {
553                 DEBUG(10,("fset_nt_acl_xattr: incoming sd for file %s\n",
554                         fsp->fsp_name));
555                 NDR_PRINT_DEBUG(security_descriptor,
556                         CONST_DISCARD(struct security_descriptor *,psd));
557         }
558
559         status = SMB_VFS_NEXT_FSET_NT_ACL(handle, fsp, security_info_sent, psd);
560         if (!NT_STATUS_IS_OK(status)) {
561                 return status;
562         }
563
564         /* Ensure owner and group are set. */
565         if (!psd->owner_sid || !psd->group_sid) {
566                 int ret;
567                 SMB_STRUCT_STAT sbuf;
568                 DOM_SID owner_sid, group_sid;
569                 struct security_descriptor *nc_psd = dup_sec_desc(talloc_tos(), psd);
570
571                 if (!nc_psd) {
572                         return NT_STATUS_OK;
573                 }
574                 if (fsp->is_directory || fsp->fh->fd == -1) {
575                         ret = SMB_VFS_STAT(fsp->conn,fsp->fsp_name, &sbuf);
576                 } else {
577                         ret = SMB_VFS_FSTAT(fsp, &sbuf);
578                 }
579                 if (ret == -1) {
580                         /* Lower level acl set succeeded,
581                          * so still return OK. */
582                         return NT_STATUS_OK;
583                 }
584                 create_file_sids(&sbuf, &owner_sid, &group_sid);
585                 /* This is safe as nc_psd is discarded at fn exit. */
586                 nc_psd->owner_sid = &owner_sid;
587                 nc_psd->group_sid = &group_sid;
588                 security_info_sent |= (OWNER_SECURITY_INFORMATION|GROUP_SECURITY_INFORMATION);
589                 psd = nc_psd;
590         }
591
592         if ((security_info_sent & DACL_SECURITY_INFORMATION) &&
593                         psd->dacl != NULL &&
594                         (psd->type & (SE_DESC_DACL_AUTO_INHERITED|
595                                 SE_DESC_DACL_AUTO_INHERIT_REQ))==
596                                 (SE_DESC_DACL_AUTO_INHERITED|
597                                 SE_DESC_DACL_AUTO_INHERIT_REQ) ) {
598                 struct security_descriptor *new_psd = NULL;
599                 status = append_parent_acl(fsp, psd, &new_psd);
600                 if (!NT_STATUS_IS_OK(status)) {
601                         /* Lower level acl set succeeded,
602                          * so still return OK. */
603                         return NT_STATUS_OK;
604                 }
605                 psd = new_psd;
606         }
607
608         if (DEBUGLEVEL >= 10) {
609                 DEBUG(10,("fset_nt_acl_xattr: storing xattr sd for file %s\n",
610                         fsp->fsp_name));
611                 NDR_PRINT_DEBUG(security_descriptor,
612                         CONST_DISCARD(struct security_descriptor *,psd));
613         }
614         create_acl_blob(psd, &blob);
615         store_acl_blob_fsp(handle, fsp, &blob);
616
617         return NT_STATUS_OK;
618 }
619
620 /* VFS operations structure */
621
622 static vfs_op_tuple skel_op_tuples[] =
623 {
624         {SMB_VFS_OP(mkdir_acl_xattr), SMB_VFS_OP_MKDIR, SMB_VFS_LAYER_TRANSPARENT},
625         {SMB_VFS_OP(open_acl_xattr),  SMB_VFS_OP_OPEN,  SMB_VFS_LAYER_TRANSPARENT},
626
627         /* NT File ACL operations */
628
629         {SMB_VFS_OP(fget_nt_acl_xattr),SMB_VFS_OP_FGET_NT_ACL,SMB_VFS_LAYER_TRANSPARENT},
630         {SMB_VFS_OP(get_nt_acl_xattr), SMB_VFS_OP_GET_NT_ACL, SMB_VFS_LAYER_TRANSPARENT},
631         {SMB_VFS_OP(fset_nt_acl_xattr),SMB_VFS_OP_FSET_NT_ACL,SMB_VFS_LAYER_TRANSPARENT},
632
633         {SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
634 };
635
636 NTSTATUS vfs_acl_xattr_init(void)
637 {
638         return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "acl_xattr", skel_op_tuples);
639 }