2 Unix SMB/Netbios implementation.
3 VFS module to get and set Solaris ACLs
4 Copyright (C) Michael Adam 2006
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.
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, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 /* typedef struct acl SOLARIS_ACE_T; */
26 typedef aclent_t SOLARIS_ACE_T
;
27 typedef aclent_t
*SOLARIS_ACL_T
;
28 typedef int SOLARIS_ACL_TAG_T
; /* the type of an ACL entry */
29 typedef o_mode_t SOLARIS_PERM_T
;
31 /* for convenience: check if solaris acl entry is a default entry? */
32 #define _IS_DEFAULT(ace) ((ace).a_type & ACL_DEFAULT)
33 #define _IS_OF_TYPE(ace, type) ( \
34 (((type) == SMB_ACL_TYPE_ACCESS) && !_IS_DEFAULT(ace)) \
36 (((type) == SMB_ACL_TYPE_DEFAULT) && _IS_DEFAULT(ace)) \
40 /* prototypes for private functions */
42 static SOLARIS_ACL_T
solaris_acl_init(int count
);
43 static BOOL
smb_acl_to_solaris_acl(SMB_ACL_T smb_acl
,
44 SOLARIS_ACL_T
*solariacl
, int *count
,
46 static SMB_ACL_T
solaris_acl_to_smb_acl(SOLARIS_ACL_T solarisacl
, int count
,
48 static SOLARIS_ACL_TAG_T
smb_tag_to_solaris_tag(SMB_ACL_TAG_T smb_tag
);
49 static SMB_ACL_TAG_T
solaris_tag_to_smb_tag(SOLARIS_ACL_TAG_T solaris_tag
);
50 static BOOL
solaris_add_to_acl(SOLARIS_ACL_T
*solaris_acl
, int *count
,
51 SOLARIS_ACL_T add_acl
, int add_count
, SMB_ACL_TYPE_T type
);
52 static BOOL
solaris_acl_get_file(const char *name
, SOLARIS_ACL_T
*solarisacl
,
54 static BOOL
solaris_acl_get_fd(int fd
, SOLARIS_ACL_T
*solarisacl
, int *count
);
55 static BOOL
solaris_acl_sort(SOLARIS_ACL_T acl
, int count
);
56 static SMB_ACL_PERM_T
solaris_perm_to_smb_perm(const SOLARIS_PERM_T perm
);
57 static SOLARIS_PERM_T
smb_perm_to_solaris_perm(const SMB_ACL_PERM_T perm
);
58 static BOOL
solaris_acl_check(SOLARIS_ACL_T solaris_acl
, int count
);
61 /* public functions - the api */
63 SMB_ACL_T
solarisacl_sys_acl_get_file(vfs_handle_struct
*handle
,
67 SMB_ACL_T result
= NULL
;
69 SOLARIS_ACL_T solaris_acl
= NULL
;
71 DEBUG(10, ("solarisacl_sys_acl_get_file called for file '%s'.\n",
74 if (type
!= SMB_ACL_TYPE_ACCESS
&& type
!= SMB_ACL_TYPE_DEFAULT
) {
75 DEBUG(10, ("invalid SMB_ACL_TYPE given (%d)\n", type
));
80 DEBUGADD(10, ("getting %s acl\n",
81 ((type
== SMB_ACL_TYPE_ACCESS
) ? "access" : "default")));
83 if (!solaris_acl_get_file(path_p
, &solaris_acl
, &count
)) {
86 result
= solaris_acl_to_smb_acl(solaris_acl
, count
, type
);
88 DEBUG(10, ("conversion solaris_acl -> smb_acl failed (%s).\n",
93 DEBUG(10, ("solarisacl_sys_acl_get_file %s.\n",
94 ((result
== NULL
) ? "failed" : "succeeded" )));
95 SAFE_FREE(solaris_acl
);
101 * get the access ACL of a file referred to by a fd
103 SMB_ACL_T
solarisacl_sys_acl_get_fd(vfs_handle_struct
*handle
,
107 SMB_ACL_T result
= NULL
;
109 SOLARIS_ACL_T solaris_acl
= NULL
;
111 DEBUG(10, ("entering solarisacl_sys_acl_get_fd.\n"));
113 if (!solaris_acl_get_fd(fd
, &solaris_acl
, &count
)) {
117 * The facl call returns both ACCESS and DEFAULT acls (as present).
118 * The posix acl_get_fd function returns only the
119 * access acl. So we need to filter this out here.
121 result
= solaris_acl_to_smb_acl(solaris_acl
, count
,
122 SMB_ACL_TYPE_ACCESS
);
123 if (result
== NULL
) {
124 DEBUG(10, ("conversion solaris_acl -> smb_acl failed (%s).\n",
129 DEBUG(10, ("solarisacl_sys_acl_get_fd %s.\n",
130 ((result
== NULL
) ? "failed" : "succeeded")));
131 SAFE_FREE(solaris_acl
);
135 int solarisacl_sys_acl_set_file(vfs_handle_struct
*handle
,
142 SOLARIS_ACL_T solaris_acl
= NULL
;
145 DEBUG(10, ("solarisacl_sys_acl_set_file called for file '%s'\n",
148 if ((type
!= SMB_ACL_TYPE_ACCESS
) && (type
!= SMB_ACL_TYPE_DEFAULT
)) {
150 DEBUG(10, ("invalid smb acl type given (%d).\n", type
));
153 DEBUGADD(10, ("setting %s acl\n",
154 ((type
== SMB_ACL_TYPE_ACCESS
) ? "access" : "default")));
156 if(!smb_acl_to_solaris_acl(theacl
, &solaris_acl
, &count
, type
)) {
157 DEBUG(10, ("conversion smb_acl -> solaris_acl failed (%s).\n",
163 * if the file is a directory, there is extra work to do:
164 * since the solaris acl call stores both the access acl and
165 * the default acl as provided, we have to get the acl part
166 * that has not been specified in "type" from the file first
167 * and concatenate it with the acl provided.
169 if (SMB_VFS_STAT(handle
->conn
, name
, &s
) != 0) {
170 DEBUG(10, ("Error in stat call: %s\n", strerror(errno
)));
173 if (S_ISDIR(s
.st_mode
)) {
174 SOLARIS_ACL_T other_acl
;
176 SMB_ACL_TYPE_T other_type
;
178 other_type
= (type
== SMB_ACL_TYPE_ACCESS
)
179 ? SMB_ACL_TYPE_DEFAULT
180 : SMB_ACL_TYPE_ACCESS
;
181 DEBUGADD(10, ("getting acl from filesystem\n"));
182 if (!solaris_acl_get_file(name
, &other_acl
, &other_count
)) {
183 DEBUG(10, ("error getting acl from directory\n"));
186 DEBUG(10, ("adding %s part of fs acl to given acl\n",
187 ((other_type
== SMB_ACL_TYPE_ACCESS
)
190 if (!solaris_add_to_acl(&solaris_acl
, &count
, other_acl
,
191 other_count
, other_type
))
193 DEBUG(10, ("error adding other acl.\n"));
194 SAFE_FREE(other_acl
);
197 SAFE_FREE(other_acl
);
199 else if (type
!= SMB_ACL_TYPE_ACCESS
) {
204 if (!solaris_acl_sort(solaris_acl
, count
)) {
205 DEBUG(10, ("resulting acl is not valid!\n"));
209 ret
= acl(name
, SETACL
, count
, solaris_acl
);
212 DEBUG(10, ("solarisacl_sys_acl_set_file %s.\n",
213 ((ret
!= 0) ? "failed" : "succeeded")));
214 SAFE_FREE(solaris_acl
);
219 * set the access ACL on the file referred to by a fd
221 int solarisacl_sys_acl_set_fd(vfs_handle_struct
*handle
,
223 int fd
, SMB_ACL_T theacl
)
225 SOLARIS_ACL_T solaris_acl
= NULL
;
226 SOLARIS_ACL_T default_acl
= NULL
;
227 int count
, default_count
;
230 DEBUG(10, ("entering solarisacl_sys_acl_set_fd\n"));
233 * the posix acl_set_fd call sets the access acl of the
234 * file referred to by fd. the solaris facl-SETACL call
235 * sets the access and default acl as provided, so we
236 * have to retrieve the default acl of the file and
237 * concatenate it with the access acl provided.
239 if (!smb_acl_to_solaris_acl(theacl
, &solaris_acl
, &count
,
240 SMB_ACL_TYPE_ACCESS
))
242 DEBUG(10, ("conversion smb_acl -> solaris_acl failed (%s).\n",
246 if (!solaris_acl_get_fd(fd
, &default_acl
, &default_count
)) {
247 DEBUG(10, ("error getting (default) acl from fd\n"));
250 if (!solaris_add_to_acl(&solaris_acl
, &count
,
251 default_acl
, default_count
,
252 SMB_ACL_TYPE_DEFAULT
))
254 DEBUG(10, ("error adding default acl to solaris acl\n"));
257 if (!solaris_acl_sort(solaris_acl
, count
)) {
258 DEBUG(10, ("resulting acl is not valid!\n"));
262 ret
= facl(fd
, SETACL
, count
, solaris_acl
);
264 DEBUG(10, ("call of facl failed (%s).\n", strerror(errno
)));
268 DEBUG(10, ("solarisacl_sys_acl_st_fd %s.\n",
269 ((ret
== 0) ? "succeded" : "failed" )));
270 SAFE_FREE(solaris_acl
);
271 SAFE_FREE(default_acl
);
276 * delete the default ACL of a directory
278 * This is achieved by fetching the access ACL and rewriting it
279 * directly, via the solaris system call: the SETACL call on
280 * directories writes both the access and the default ACL as provided.
282 * XXX: posix acl_delete_def_file returns an error if
283 * the file referred to by path is not a directory.
284 * this function does not complain but the actions
285 * have no effect on a file other than a directory.
286 * But sys_acl_delete_default_file is only called in
287 * smbd/posixacls.c after having checked that the file
288 * is a directory, anyways. So implementing the extra
289 * check is considered unnecessary. --- Agreed? XXX
291 int solarisacl_sys_acl_delete_def_file(vfs_handle_struct
*handle
,
296 SOLARIS_ACL_T solaris_acl
= NULL
;
299 DEBUG(10, ("entering solarisacl_sys_acl_delete_def_file.\n"));
301 smb_acl
= solarisacl_sys_acl_get_file(handle
, path
,
302 SMB_ACL_TYPE_ACCESS
);
303 if (smb_acl
== NULL
) {
304 DEBUG(10, ("getting file acl failed!\n"));
307 if (!smb_acl_to_solaris_acl(smb_acl
, &solaris_acl
, &count
,
308 SMB_ACL_TYPE_ACCESS
))
310 DEBUG(10, ("conversion smb_acl -> solaris_acl failed.\n"));
313 if (!solaris_acl_sort(solaris_acl
, count
)) {
314 DEBUG(10, ("resulting acl is not valid!\n"));
317 ret
= acl(path
, SETACL
, count
, solaris_acl
);
319 DEBUG(10, ("settinge file acl failed!\n"));
323 DEBUG(10, ("solarisacl_sys_acl_delete_def_file %s.\n",
324 ((ret
!= 0) ? "failed" : "succeeded" )));
330 /* private functions */
332 static SOLARIS_ACL_T
solaris_acl_init(int count
)
334 SOLARIS_ACL_T solaris_acl
=
335 (SOLARIS_ACL_T
)SMB_MALLOC(sizeof(aclent_t
) * count
);
336 if (solaris_acl
== NULL
) {
343 * Convert the SMB acl to the ACCESS or DEFAULT part of a
344 * solaris ACL, as desired.
346 static BOOL
smb_acl_to_solaris_acl(SMB_ACL_T smb_acl
,
347 SOLARIS_ACL_T
*solaris_acl
, int *count
,
352 int check_which
, check_rc
;
354 DEBUG(10, ("entering smb_acl_to_solaris_acl\n"));
359 for (i
= 0; i
< smb_acl
->count
; i
++) {
360 const struct smb_acl_entry
*smb_entry
= &(smb_acl
->acl
[i
]);
361 SOLARIS_ACE_T solaris_entry
;
363 ZERO_STRUCT(solaris_entry
);
365 solaris_entry
.a_type
= smb_tag_to_solaris_tag(smb_entry
->a_type
);
366 if (solaris_entry
.a_type
== 0) {
367 DEBUG(10, ("smb_tag to solaris_tag failed\n"));
370 switch(solaris_entry
.a_type
) {
372 DEBUG(10, ("got tag type USER with uid %d\n",
374 solaris_entry
.a_id
= (uid_t
)smb_entry
->uid
;
377 DEBUG(10, ("got tag type GROUP with gid %d\n",
379 solaris_entry
.a_id
= (uid_t
)smb_entry
->gid
;
384 if (type
== SMB_ACL_TYPE_DEFAULT
) {
385 DEBUG(10, ("adding default bit to solaris ace\n"));
386 solaris_entry
.a_type
|= ACL_DEFAULT
;
389 solaris_entry
.a_perm
=
390 smb_perm_to_solaris_perm(smb_entry
->a_perm
);
391 DEBUG(10, ("assembled the following solaris ace:\n"));
392 DEBUGADD(10, (" - type: 0x%04x\n", solaris_entry
.a_type
));
393 DEBUGADD(10, (" - id: %d\n", solaris_entry
.a_id
));
394 DEBUGADD(10, (" - perm: o%o\n", solaris_entry
.a_perm
));
395 if (!solaris_add_to_acl(solaris_acl
, count
, &solaris_entry
,
398 DEBUG(10, ("error adding acl entry\n"));
401 DEBUG(10, ("count after adding: %d (i: %d)\n", *count
, i
));
402 DEBUG(10, ("test, if entry has been copied into acl:\n"));
403 DEBUGADD(10, (" - type: 0x%04x\n",
404 (*solaris_acl
)[(*count
)-1].a_type
));
405 DEBUGADD(10, (" - id: %d\n",
406 (*solaris_acl
)[(*count
)-1].a_id
));
407 DEBUGADD(10, (" - perm: o%o\n",
408 (*solaris_acl
)[(*count
)-1].a_perm
));
415 SAFE_FREE(*solaris_acl
);
417 DEBUG(10, ("smb_acl_to_solaris_acl %s\n",
418 ((ret
== True
) ? "succeeded" : "failed")));
423 * convert either the access or the default part of a
424 * soaris acl to the SMB_ACL format.
426 static SMB_ACL_T
solaris_acl_to_smb_acl(SOLARIS_ACL_T solaris_acl
, int count
,
432 if ((result
= sys_acl_init(0)) == NULL
) {
433 DEBUG(10, ("error allocating memory for SMB_ACL\n"));
436 for (i
= 0; i
< count
; i
++) {
437 SMB_ACL_ENTRY_T smb_entry
;
438 SMB_ACL_PERM_T smb_perm
;
440 if (!_IS_OF_TYPE(solaris_acl
[i
], type
)) {
443 result
= SMB_REALLOC(result
,
444 sizeof(struct smb_acl_t
) +
445 (sizeof(struct smb_acl_entry
) *
446 (result
->count
+ 1)));
447 if (result
== NULL
) {
448 DEBUG(10, ("error reallocating memory for SMB_ACL\n"));
451 smb_entry
= &result
->acl
[result
->count
];
452 if (sys_acl_set_tag_type(smb_entry
,
453 solaris_tag_to_smb_tag(solaris_acl
[i
].a_type
)) != 0)
455 DEBUG(10, ("invalid tag type given: 0x%04x\n",
456 solaris_acl
[i
].a_type
));
459 /* intentionally not checking return code here: */
460 sys_acl_set_qualifier(smb_entry
, (void *)&solaris_acl
[i
].a_id
);
461 smb_perm
= solaris_perm_to_smb_perm(solaris_acl
[i
].a_perm
);
462 if (sys_acl_set_permset(smb_entry
, &smb_perm
) != 0) {
463 DEBUG(10, ("invalid permset given: %d\n",
464 solaris_acl
[i
].a_perm
));
474 DEBUG(10, ("solaris_acl_to_smb_acl %s\n",
475 ((result
== NULL
) ? "failed" : "succeeded")));
481 static SOLARIS_ACL_TAG_T
smb_tag_to_solaris_tag(SMB_ACL_TAG_T smb_tag
)
483 SOLARIS_ACL_TAG_T solaris_tag
= 0;
485 DEBUG(10, ("smb_tag_to_solaris_tag\n"));
486 DEBUGADD(10, (" --> got smb tag 0x%04x\n", smb_tag
));
492 case SMB_ACL_USER_OBJ
:
493 solaris_tag
= USER_OBJ
;
498 case SMB_ACL_GROUP_OBJ
:
499 solaris_tag
= GROUP_OBJ
;
502 solaris_tag
= OTHER_OBJ
;
505 solaris_tag
= CLASS_OBJ
;
508 DEBUGADD(10, (" !!! unknown smb tag type 0x%04x\n", smb_tag
));
512 DEBUGADD(10, (" --> determined solaris tag 0x%04x\n", solaris_tag
));
517 static SMB_ACL_TAG_T
solaris_tag_to_smb_tag(SOLARIS_ACL_TAG_T solaris_tag
)
519 SMB_ACL_TAG_T smb_tag
= 0;
521 DEBUG(10, ("solaris_tag_to_smb_tag:\n"));
522 DEBUGADD(10, (" --> got solaris tag 0x%04x\n", solaris_tag
));
524 solaris_tag
&= ~ACL_DEFAULT
;
526 switch (solaris_tag
) {
528 smb_tag
= SMB_ACL_USER
;
531 smb_tag
= SMB_ACL_USER_OBJ
;
534 smb_tag
= SMB_ACL_GROUP
;
537 smb_tag
= SMB_ACL_GROUP_OBJ
;
540 smb_tag
= SMB_ACL_OTHER
;
543 smb_tag
= SMB_ACL_MASK
;
546 DEBUGADD(10, (" !!! unknown solaris tag type: 0x%04x\n",
551 DEBUGADD(10, (" --> determined smb tag 0x%04x\n", smb_tag
));
557 static SMB_ACL_PERM_T
solaris_perm_to_smb_perm(const SOLARIS_PERM_T perm
)
559 SMB_ACL_PERM_T smb_perm
= 0;
560 smb_perm
|= ((perm
& SMB_ACL_READ
) ? SMB_ACL_READ
: 0);
561 smb_perm
|= ((perm
& SMB_ACL_WRITE
) ? SMB_ACL_WRITE
: 0);
562 smb_perm
|= ((perm
& SMB_ACL_EXECUTE
) ? SMB_ACL_EXECUTE
: 0);
567 static SOLARIS_PERM_T
smb_perm_to_solaris_perm(const SMB_ACL_PERM_T perm
)
569 SOLARIS_PERM_T solaris_perm
= 0;
570 solaris_perm
|= ((perm
& SMB_ACL_READ
) ? SMB_ACL_READ
: 0);
571 solaris_perm
|= ((perm
& SMB_ACL_WRITE
) ? SMB_ACL_WRITE
: 0);
572 solaris_perm
|= ((perm
& SMB_ACL_EXECUTE
) ? SMB_ACL_EXECUTE
: 0);
577 static BOOL
solaris_acl_get_file(const char *name
, SOLARIS_ACL_T
*solaris_acl
,
582 DEBUG(10, ("solaris_acl_get_file called for file '%s'\n", name
));
585 * The original code tries some INITIAL_ACL_SIZE
586 * and only did the GETACLCNT call upon failure
587 * (for performance reasons).
588 * For the sake of simplicity, I skip this for now.
590 *count
= acl(name
, GETACLCNT
, 0, NULL
);
592 DEBUG(10, ("acl GETACLCNT failed: %s\n", strerror(errno
)));
595 *solaris_acl
= solaris_acl_init(*count
);
596 if (*solaris_acl
== NULL
) {
597 DEBUG(10, ("error allocating memory for solaris acl...\n"));
600 *count
= acl(name
, GETACL
, *count
, *solaris_acl
);
602 DEBUG(10, ("acl GETACL failed: %s\n", strerror(errno
)));
608 DEBUG(10, ("solaris_acl_get_file %s.\n",
609 ((result
== True
) ? "succeeded" : "failed" )));
614 static BOOL
solaris_acl_get_fd(int fd
, SOLARIS_ACL_T
*solaris_acl
, int *count
)
618 DEBUG(10, ("entering solaris_acl_get_fd\n"));
621 * see solaris_acl_get_file for comment about omission
622 * of INITIAL_ACL_SIZE...
624 *count
= facl(fd
, GETACLCNT
, 0, NULL
);
626 DEBUG(10, ("facl GETACLCNT failed: %s\n", strerror(errno
)));
629 *solaris_acl
= solaris_acl_init(*count
);
630 if (*solaris_acl
== NULL
) {
631 DEBUG(10, ("error allocating memory for solaris acl...\n"));
634 *count
= facl(fd
, GETACL
, *count
, *solaris_acl
);
636 DEBUG(10, ("facl GETACL failed: %s\n", strerror(errno
)));
642 DEBUG(10, ("solaris_acl_get_fd %s\n",
643 ((ret
== True
) ? "succeeded" : "failed")));
650 * Add entries to a solaris ACL.
652 * Entries are directly added to the solarisacl parameter.
653 * if memory allocation fails, this may result in solarisacl
654 * being NULL. if the resulting acl is to be checked and is
655 * not valid, it is kept in solarisacl but False is returned.
657 * The type of ACEs (access/default) to be added to the ACL can
658 * be selected via the type parameter.
659 * I use the SMB_ACL_TYPE_T type here. Since SMB_ACL_TYPE_ACCESS
660 * is defined as "0", this means that one can only add either
661 * access or default ACEs, not both at the same time. If it
662 * should become necessary to add all of an ACL, one would have
663 * to replace this parameter by another type.
665 static BOOL
solaris_add_to_acl(SOLARIS_ACL_T
*solaris_acl
, int *count
,
666 SOLARIS_ACL_T add_acl
, int add_count
,
671 if ((type
!= SMB_ACL_TYPE_ACCESS
) && (type
!= SMB_ACL_TYPE_DEFAULT
))
673 DEBUG(10, ("invalid acl type given: %d\n", type
));
677 for (i
= 0; i
< add_count
; i
++) {
678 if (!_IS_OF_TYPE(add_acl
[i
], type
)) {
681 ADD_TO_ARRAY(NULL
, SOLARIS_ACE_T
, add_acl
[i
],
683 if (solaris_acl
== NULL
) {
684 DEBUG(10, ("error enlarging acl.\n"));
694 * sort the ACL and check it for validity
696 * [original comment from lib/sysacls.c:]
698 * if it's a minimal ACL with only 4 entries then we
699 * need to recalculate the mask permissions to make
700 * sure that they are the same as the GROUP_OBJ
701 * permissions as required by the UnixWare acl() system call.
703 * (note: since POSIX allows minimal ACLs which only contain
704 * 3 entries - ie there is no mask entry - we should, in theory,
705 * check for this and add a mask entry if necessary - however
706 * we "know" that the caller of this interface always specifies
707 * a mask, so in practice "this never happens" (tm) - if it *does*
708 * happen aclsort() will fail and return an error and someone will
711 static BOOL
solaris_acl_sort(SOLARIS_ACL_T solaris_acl
, int count
)
713 int fixmask
= (count
<= 4);
715 if (aclsort(count
, fixmask
, solaris_acl
) != 0) {
723 * acl check function:
724 * unused at the moment but could be used to get more
725 * concrete error messages for debugging...
726 * (acl sort just says that the acl is invalid...)
728 static BOOL
solaris_acl_check(SOLARIS_ACL_T solaris_acl
, int count
)
733 check_rc
= aclcheck(solaris_acl
, count
, &check_which
);
735 DEBUG(10, ("acl is not valid:\n"));
736 DEBUGADD(10, (" - return code: %d\n", check_rc
));
737 DEBUGADD(10, (" - which: %d\n", check_which
));
738 if (check_which
!= -1) {
739 DEBUGADD(10, (" - invalid entry:\n"));
740 DEBUGADD(10, (" * type: %d:\n",
741 solaris_acl
[check_which
].a_type
));
742 DEBUGADD(10, (" * id: %d\n",
743 solaris_acl
[check_which
].a_id
));
744 DEBUGADD(10, (" * perm: 0o%o\n",
745 solaris_acl
[check_which
].a_perm
));
753 /* VFS operations structure */
755 static vfs_op_tuple solarisacl_op_tuples
[] = {
756 /* Disk operations */
757 {SMB_VFS_OP(solarisacl_sys_acl_get_file
),
758 SMB_VFS_OP_SYS_ACL_GET_FILE
,
759 SMB_VFS_LAYER_TRANSPARENT
},
761 {SMB_VFS_OP(solarisacl_sys_acl_get_fd
),
762 SMB_VFS_OP_SYS_ACL_GET_FD
,
763 SMB_VFS_LAYER_TRANSPARENT
},
765 {SMB_VFS_OP(solarisacl_sys_acl_set_file
),
766 SMB_VFS_OP_SYS_ACL_SET_FILE
,
767 SMB_VFS_LAYER_TRANSPARENT
},
769 {SMB_VFS_OP(solarisacl_sys_acl_set_fd
),
770 SMB_VFS_OP_SYS_ACL_SET_FD
,
771 SMB_VFS_LAYER_TRANSPARENT
},
773 {SMB_VFS_OP(solarisacl_sys_acl_delete_def_file
),
774 SMB_VFS_OP_SYS_ACL_DELETE_DEF_FILE
,
775 SMB_VFS_LAYER_TRANSPARENT
},
782 NTSTATUS
vfs_solarisacl_init(void);
783 NTSTATUS
vfs_solarisacl_init(void)
785 return smb_register_vfs(SMB_VFS_INTERFACE_VERSION
, "solarisacl",
786 solarisacl_op_tuples
);