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>
    
      
        | Split | 
	Close | 
      
      | Expand all | 
      | Collapse all | 
    
    
          --- old/usr/src/cmd/auditreduce/auditrd.h
          +++ new/usr/src/cmd/auditreduce/auditrd.h
   1    1  /*
   2    2   * CDDL HEADER START
   3    3   *
   4    4   * The contents of this file are subject to the terms of the
   5    5   * Common Development and Distribution License (the "License").
   6    6   * You may not use this file except in compliance with the License.
   7    7   *
   8    8   * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9    9   * or http://www.opensolaris.org/os/licensing.
  10   10   * See the License for the specific language governing permissions
  11   11   * and limitations under the License.
  12   12   *
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  
    | 
      ↓ open down ↓ | 
    13 lines elided | 
    
      ↑ open up ↑ | 
  
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
       24 + *
       25 + * Copyright 2018 Nexenta Systems, Inc.  All rights reserved.
  24   26   */
  25   27  
  26   28  #ifndef _AUDITRD_H
  27   29  #define _AUDITRD_H
  28   30  
  29   31  #ifdef  __cplusplus
  30   32  extern "C" {
  31   33  #endif
  32   34  
  33   35  /*
  34   36   * Global data for auditreduce
  35   37   */
  36   38  
  37   39  /*
  38   40   * Message selection options
  39   41   */
  40   42  unsigned short  m_type;         /* 'm' message type */
  41   43  gid_t   m_groupr;               /* 'g' group-id */
  42   44  gid_t   m_groupe;               /* 'f' effective group-id */
  43   45  uid_t   m_usera;                /* 'u' user id */
  44   46  uid_t   m_usere;                /* 'e' effective user-id */
  45   47  uid_t   m_userr;                /* 'r' real user-id */
  46   48  au_asid_t m_sid;                /* 's' session-id */
  47   49  time_t  m_after;                /* 'a' after a time */
  48   50  time_t  m_before;               /* 'b' before a time */
  49   51  audit_state_t mask;             /* used with m_class */
  50   52  char    *zonename;              /* 'z' zonename */
  51   53  m_range_t *m_label;             /* 'l' mandatory label range */
  52   54  int     flags;
  53   55  int     checkflags;
  54   56  int     socket_flag;
  
    | 
      ↓ open down ↓ | 
    21 lines elided | 
    
      ↑ open up ↑ | 
  
  55   57  int     ip_type;
  56   58  uchar_t ip_ipv6[16];            /* ipv6 type object */
  57   59  int     obj_flag;               /* 'o' object type */
  58   60  int     obj_id;                 /* object identifier */
  59   61  gid_t   obj_group;              /* object group */
  60   62  uid_t   obj_owner;              /* object owner */
  61   63  int     subj_id;                /* subject identifier  */
  62   64  char    ipc_type;               /* 'o' object type - tell what type of IPC */
  63   65  scf_pattern_t fmri;             /* 'o' fmri value */
  64   66  uid_t   obj_user;               /* 'o' user value */
       67 +char    *wsid;                  /* 'o' wsid value */
  65   68  
  66   69  /*
  67   70   * File selection options
  68   71   */
  69   72  char    *f_machine;             /* 'M' machine (suffix) type */
  70   73  char    *f_root;                /* 'R' audit root */
  71   74  char    *f_server;              /* 'S' server */
  72   75  char    *f_outfile;             /* 'W' output file */
  73   76  static char     *f_outtemp;     /* 'W' temporary file name */
  74   77  int     f_all;                  /* 'A' all records from a file */
  75   78  int     f_complete;             /* 'C' only completed files */
  76   79  int     f_delete;               /* 'D' delete when done */
  
    | 
      ↓ open down ↓ | 
    2 lines elided | 
    
      ↑ open up ↑ | 
  
  77   80  int     f_quiet;                /* 'Q' sshhhh! */
  78   81  int     f_verbose;              /* 'V' verbose */
  79   82  int     f_stdin;                /* '-' read from stdin */
  80   83  int     f_cmdline;              /* files specified on the command line */
  81   84  int     new_mode;               /* 'N' new object selection mode */
  82   85  
  83   86  /*
  84   87   * Global error reporting
  85   88   */
  86   89  char    *error_str;             /* current error message */
  87      -char    errbuf[256];            /* for creating error messages with sprintf */
  88   90  char    *ar = "auditreduce:";
  89   91  static int      root_pid;       /* remember original process's pid */
  90   92  
  91   93  /*
  92   94   * Global control blocks
  93   95   */
  94   96  audit_pcb_t *audit_pcbs; /* ptr to array of pcbs that hold files (fcbs) */
  95   97  
  96   98  int     pcbsize;                /* size of audit_pcb[] */
  97   99  int     pcbnum;         /* number of pcbs in audit_pcb[] that are active */
  98  100  
  99  101  /*
 100  102   * Time values
 101  103   */
 102  104  time_t f_start;         /* time of first record written */
 103  105  time_t f_end;           /* time of last record written */
 104  106  time_t time_now;        /* time the program began */
 105  107  
 106  108  /*
 107  109   * Global counting vars
 108  110   */
 109  111  int     filenum;                /* number of files to process */
 110  112  
 111  113  /*
 112  114   * Global variable, class of current record being processed.
 113  115   */
 114  116  int global_class;
 115  117  
 116  118  #ifdef __cplusplus
 117  119  }
 118  120  #endif
 119  121  
 120  122  #endif  /* _AUDITRD_H */
  
    | 
      ↓ open down ↓ | 
    23 lines elided | 
    
      ↑ open up ↑ | 
  
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX