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/main.c
          +++ new/usr/src/cmd/auditreduce/main.c
↓ open down ↓ 14 lines elided ↑ open up ↑
  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  /*
  23   23   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
       25 + *
       26 + * Copyright 2018 Nexenta Systems, Inc.  All rights reserved.
  25   27   */
  26   28  
  27   29  /*
  28   30   * The Secure SunOS audit reduction tool - auditreduce.
  29   31   * Document SM0071 is the primary source of information on auditreduce.
  30   32   *
  31   33   * Composed of 4 source modules:
  32   34   * main.c - main driver.
  33   35   * option.c - command line option processing.
  34   36   * process.c - record/file/process functions.
↓ open down ↓ 39 lines elided ↑ open up ↑
  74   76  static int      write_file_token(time_t);
  75   77  static int      write_trailer(void);
  76   78  
  77   79  /*
  78   80   * File globals.
  79   81   */
  80   82  static int      max_sproc;      /* maximum number of subprocesses per process */
  81   83  static int      total_procs;    /* number of processes in the process tree */
  82   84  static int      total_layers;   /* number of layers in the process tree */
  83   85  
       86 +char    errbuf[ERRBUF_SZ];      /* for creating error messages with sprintf */
       87 +
  84   88  /*
  85   89   * .func main - main.
  86   90   * .desc The beginning. Main() calls each of the initialization routines
  87   91   *      and then allocates the root pcb. Then it calls mfork() to get
  88   92   *      the work done.
  89   93   * .call        main(argc, argv).
  90   94   * .arg argc    - number of arguments.
  91   95   * .arg argv    - array of pointers to arguments.
  92   96   * .ret 0       - via exit() - no errors detected.
  93   97   * .ret 1       - via exit() - errors detected (messages printed).
↓ open down ↓ 986 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX