Print this page
NEX-13644 File access audit logging
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
Reviewed by: Roman Strashkin <roman.strashkin@nexenta.com>
Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Reviewed by: Rick McNeal <rick.mcneal@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
SMB-50 User-mode SMB server
 Includes work by these authors:
 Thomas Keiser <thomas.keiser@nexenta.com>
 Albert Lee <trisk@nexenta.com>
SUP-642 Regression leading to AD usernames not being displayed by zfs userspace command.


   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 (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  23  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
  24  */
  25 
  26 /*
  27  * Header File for Clients of Native Identity Mapping Service
  28  */
  29 
  30 #ifndef _IDMAP_H
  31 #define _IDMAP_H
  32 
  33 
  34 #include <stdlib.h>
  35 #include <ctype.h>
  36 #include <sys/param.h>
  37 #include <sys/types.h>
  38 #include <sys/stat.h>
  39 #include <sys/idmap.h>
  40 
  41 #ifdef __cplusplus
  42 extern "C" {
  43 #endif


 111 
 112 /* Process the batched requests */
 113 extern idmap_stat idmap_get_mappings(idmap_get_handle_t *);
 114 
 115 /* Destroy the handle */
 116 extern void idmap_get_destroy(idmap_get_handle_t *);
 117 
 118 
 119 /*
 120  * API to get Windows name by UID/GID and vice-versa
 121  */
 122 /* Given UID, get Windows name */
 123 extern idmap_stat idmap_getwinnamebyuid(uid_t, int, char **, char **);
 124 
 125 /* Given GID, get Windows name */
 126 extern idmap_stat idmap_getwinnamebygid(gid_t, int, char **, char **);
 127 
 128 /* Given PID, get Windows name */
 129 extern idmap_stat idmap_getwinnamebypid(uid_t, int, int, char **, char **);
 130 



 131 /* Given Windows name, get UID */
 132 extern idmap_stat idmap_getuidbywinname(const char *, const char *,
 133         int, uid_t *);
 134 
 135 /* Given Windows name, get GID */
 136 extern idmap_stat idmap_getgidbywinname(const char *, const char *,
 137         int, gid_t *);
 138 
 139 
 140 /* Logger */
 141 extern void idmap_set_logger(idmap_logger_t funct);
 142 
 143 #ifdef __cplusplus
 144 }
 145 #endif
 146 
 147 #endif /* _IDMAP_H */


   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 (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  23  * Copyright 2018 Nexenta Systems, Inc.  All rights reserved.
  24  */
  25 
  26 /*
  27  * Header File for Clients of Native Identity Mapping Service
  28  */
  29 
  30 #ifndef _IDMAP_H
  31 #define _IDMAP_H
  32 
  33 
  34 #include <stdlib.h>
  35 #include <ctype.h>
  36 #include <sys/param.h>
  37 #include <sys/types.h>
  38 #include <sys/stat.h>
  39 #include <sys/idmap.h>
  40 
  41 #ifdef __cplusplus
  42 extern "C" {
  43 #endif


 111 
 112 /* Process the batched requests */
 113 extern idmap_stat idmap_get_mappings(idmap_get_handle_t *);
 114 
 115 /* Destroy the handle */
 116 extern void idmap_get_destroy(idmap_get_handle_t *);
 117 
 118 
 119 /*
 120  * API to get Windows name by UID/GID and vice-versa
 121  */
 122 /* Given UID, get Windows name */
 123 extern idmap_stat idmap_getwinnamebyuid(uid_t, int, char **, char **);
 124 
 125 /* Given GID, get Windows name */
 126 extern idmap_stat idmap_getwinnamebygid(gid_t, int, char **, char **);
 127 
 128 /* Given PID, get Windows name */
 129 extern idmap_stat idmap_getwinnamebypid(uid_t, int, int, char **, char **);
 130 
 131 /* Given SID, get Windows name */
 132 extern idmap_stat idmap_getwinnamebysid(char *, int, char **);
 133 
 134 /* Given Windows name, get UID */
 135 extern idmap_stat idmap_getuidbywinname(const char *, const char *,
 136         int, uid_t *);
 137 
 138 /* Given Windows name, get GID */
 139 extern idmap_stat idmap_getgidbywinname(const char *, const char *,
 140         int, gid_t *);
 141 
 142 
 143 /* Logger */
 144 extern void idmap_set_logger(idmap_logger_t funct);
 145 
 146 #ifdef __cplusplus
 147 }
 148 #endif
 149 
 150 #endif /* _IDMAP_H */