1 /*
   2  * CDDL HEADER START
   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  *      Copyright 2006 Sun Microsystems, Inc.
  23  *      All rights reserved.
  24  *      Use is subject to license terms.
  25  */
  26 /*
  27  * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
  28  */
  29 
  30 #ifndef _NFS_NFS_ACL_H
  31 #define _NFS_NFS_ACL_H
  32 
  33 #ifdef  __cplusplus
  34 extern "C" {
  35 #endif
  36 
  37 #define NFS_ACL_MAX_ENTRIES     1024
  38 
  39 typedef ushort_t o_mode;
  40 
  41 struct aclent {
  42         int type;
  43         uid32_t id;
  44         o_mode perm;
  45 };
  46 typedef struct aclent aclent;
  47 
  48 #define NA_USER_OBJ     0x1
 
 363 extern int acl_getacl2(vnode_t *, vsecattr_t *, int, cred_t *);
 364 extern int acl_setacl2(vnode_t *, vsecattr_t *, int, cred_t *);
 365 extern int acl_getattr2_otw(vnode_t *, vattr_t *, cred_t *);
 366 extern int acl_access2(vnode_t *, int, int, cred_t *);
 367 extern int acl_getxattrdir2(vnode_t *, vnode_t **, bool_t, cred_t *, int);
 368 extern int acl_getacl3(vnode_t *, vsecattr_t *, int, cred_t *);
 369 extern int acl_setacl3(vnode_t *, vsecattr_t *, int, cred_t *);
 370 extern int acl_getxattrdir3(vnode_t *, vnode_t **, bool_t, cred_t *, int);
 371 extern int acl2call(mntinfo_t *, rpcproc_t, xdrproc_t, caddr_t, xdrproc_t,
 372                         caddr_t, cred_t *, int *, enum nfsstat *, int,
 373                         failinfo_t *);
 374 extern int acl3call(mntinfo_t *, rpcproc_t, xdrproc_t, caddr_t, xdrproc_t,
 375                         caddr_t, cred_t *, int *, nfsstat3 *, int,
 376                         failinfo_t *);
 377 extern void nfs_acl_free(vsecattr_t *);
 378 #endif
 379 
 380 #ifdef _KERNEL
 381 /* server and client data structures */
 382 extern kstat_named_t    *aclproccnt_v2_ptr;
 383 extern kstat_named_t    *aclproccnt_v3_ptr;
 384 
 385 extern char             *aclnames_v2[];
 386 extern uchar_t          acl_call_type_v2[];
 387 extern uchar_t          acl_ss_call_type_v2[];
 388 extern uchar_t          acl_timer_type_v2[];
 389 
 390 extern char             *aclnames_v3[];
 391 extern uchar_t          acl_call_type_v3[];
 392 extern uchar_t          acl_ss_call_type_v3[];
 393 extern uchar_t          acl_timer_type_v3[];
 394 #endif
 395 
 396 #ifdef  __cplusplus
 397 }
 398 #endif
 399 
 400 #endif  /* _NFS_NFS_ACL_H */
  | 
   1 /*
   2  * CDDL HEADER START
   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright 2016 Nexenta Systems, Inc.  All rights reserved.
  24  */
  25 
  26 /*
  27  *      Copyright 2006 Sun Microsystems, Inc.
  28  *      All rights reserved.
  29  *      Use is subject to license terms.
  30  */
  31 
  32 #ifndef _NFS_NFS_ACL_H
  33 #define _NFS_NFS_ACL_H
  34 
  35 #ifdef  __cplusplus
  36 extern "C" {
  37 #endif
  38 
  39 #define NFS_ACL_MAX_ENTRIES     1024
  40 
  41 typedef ushort_t o_mode;
  42 
  43 struct aclent {
  44         int type;
  45         uid32_t id;
  46         o_mode perm;
  47 };
  48 typedef struct aclent aclent;
  49 
  50 #define NA_USER_OBJ     0x1
 
 365 extern int acl_getacl2(vnode_t *, vsecattr_t *, int, cred_t *);
 366 extern int acl_setacl2(vnode_t *, vsecattr_t *, int, cred_t *);
 367 extern int acl_getattr2_otw(vnode_t *, vattr_t *, cred_t *);
 368 extern int acl_access2(vnode_t *, int, int, cred_t *);
 369 extern int acl_getxattrdir2(vnode_t *, vnode_t **, bool_t, cred_t *, int);
 370 extern int acl_getacl3(vnode_t *, vsecattr_t *, int, cred_t *);
 371 extern int acl_setacl3(vnode_t *, vsecattr_t *, int, cred_t *);
 372 extern int acl_getxattrdir3(vnode_t *, vnode_t **, bool_t, cred_t *, int);
 373 extern int acl2call(mntinfo_t *, rpcproc_t, xdrproc_t, caddr_t, xdrproc_t,
 374                         caddr_t, cred_t *, int *, enum nfsstat *, int,
 375                         failinfo_t *);
 376 extern int acl3call(mntinfo_t *, rpcproc_t, xdrproc_t, caddr_t, xdrproc_t,
 377                         caddr_t, cred_t *, int *, nfsstat3 *, int,
 378                         failinfo_t *);
 379 extern void nfs_acl_free(vsecattr_t *);
 380 #endif
 381 
 382 #ifdef _KERNEL
 383 /* server and client data structures */
 384 extern kstat_named_t    *aclproccnt_v2_ptr;
 385 extern kstat_t          **aclprocio_v2_ptr;
 386 extern kstat_named_t    *aclproccnt_v3_ptr;
 387 extern kstat_t          **aclprocio_v3_ptr;
 388 
 389 extern char             *aclnames_v2[];
 390 extern uchar_t          acl_call_type_v2[];
 391 extern uchar_t          acl_ss_call_type_v2[];
 392 extern uchar_t          acl_timer_type_v2[];
 393 
 394 extern char             *aclnames_v3[];
 395 extern uchar_t          acl_call_type_v3[];
 396 extern uchar_t          acl_ss_call_type_v3[];
 397 extern uchar_t          acl_timer_type_v3[];
 398 #endif
 399 
 400 #ifdef  __cplusplus
 401 }
 402 #endif
 403 
 404 #endif  /* _NFS_NFS_ACL_H */
  |