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/praudit/token.c
          +++ new/usr/src/cmd/praudit/token.c
↓ 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  
  27   29  #include <ctype.h>
  28   30  #include <dirent.h>
  29   31  #include <grp.h>
  30   32  #include <libintl.h>
  31   33  #include <limits.h>
  32   34  #include <locale.h>
  33   35  #include <pwd.h>
↓ open down ↓ 2333 lines elided ↑ open up ↑
2367 2369  
2368 2370          /* Set name */
2369 2371          returnstat = process_tag(context, TAG_SETTYPE, 0, 0);
2370 2372  
2371 2373          /* Done with attributes; force end of token open */
2372 2374          if (returnstat == 0)
2373 2375                  returnstat = finish_open_tag(context);
2374 2376  
2375 2377          /* set */
2376 2378          return (pa_adr_string(context, returnstat, 1));
     2379 +}
     2380 +
     2381 +/*
     2382 + * -----------------------------------------------------------------------
     2383 + * access_mask_token()  : Process access_mask token and display contents
     2384 + * return codes         : -1 - error
     2385 + *                      :  0 - successful
     2386 + * NOTE: At the time of call, the access_mask token id has been retrieved
     2387 + *
     2388 + * Format of access_mask token:
     2389 + *      access_mask token id    adr_char
     2390 + *      access_mask             adr_u_int32
     2391 + * -----------------------------------------------------------------------
     2392 + */
     2393 +int
     2394 +access_mask_token(pr_context_t *context)
     2395 +{
     2396 +        return (pa_access_mask(context, 0, 1));
     2397 +}
     2398 +
     2399 +/*
     2400 + * -----------------------------------------------------------------------
     2401 + * wsid_token() : Process wsid token and display contents
     2402 + * return codes         : -1 - error
     2403 + *                      :  0 - successful
     2404 + * NOTE: At the time of call, the wsid token id has been retrieved
     2405 + *
     2406 + * Format of wsid token:
     2407 + *      wsid token id   adr_char
     2408 + *      wsid            adr_string
     2409 + * -----------------------------------------------------------------------
     2410 + */
     2411 +int
     2412 +wsid_token(pr_context_t *context)
     2413 +{
     2414 +        return (pa_wsid(context, 0, 1));
2377 2415  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX