Print this page
remove support for non-ANSI compilation


   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 (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  23  */
  24 
  25 #ifndef _SYS_PRIV_H
  26 #define _SYS_PRIV_H
  27 
  28 #include <sys/types.h>
  29 #include <sys/cred.h>
  30 #include <sys/priv_names.h>
  31 
  32 #ifdef  __cplusplus
  33 extern "C" {
  34 #endif
  35 
  36 typedef uint32_t priv_chunk_t;
  37 typedef struct priv_set priv_set_t;
  38 
  39 #ifdef _KERNEL
  40 
  41 /*
  42  * Kernel type definitions.
  43  */
  44 typedef int priv_ptype_t;
  45 typedef int priv_t;
  46 
  47 #else /* _KERNEL */
  48 
  49 /*
  50  * Userland type definitions.
  51  */
  52 
  53 #ifdef __STDC__
  54 typedef const char *priv_ptype_t;
  55 typedef const char *priv_t;
  56 #else
  57 typedef char *priv_ptype_t;
  58 typedef char *priv_t;
  59 #endif
  60 
  61 #endif /* _KERNEL */
  62 
  63 /*
  64  * priv_op_t indicates a privilege operation type
  65  */
  66 typedef enum priv_op {
  67         PRIV_ON,
  68         PRIV_OFF,
  69         PRIV_SET
  70 } priv_op_t;
  71 
  72 /*
  73  * Privilege system call subcodes.
  74  */
  75 
  76 #define PRIVSYS_SETPPRIV        0
  77 #define PRIVSYS_GETPPRIV        1
  78 #define PRIVSYS_GETIMPLINFO     2
  79 #define PRIVSYS_SETPFLAGS       3




   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 2014 Garrett D'Amore <garrett@damore.org>
  23  *
  24  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  25  */
  26 
  27 #ifndef _SYS_PRIV_H
  28 #define _SYS_PRIV_H
  29 
  30 #include <sys/types.h>
  31 #include <sys/cred.h>
  32 #include <sys/priv_names.h>
  33 
  34 #ifdef  __cplusplus
  35 extern "C" {
  36 #endif
  37 
  38 typedef uint32_t priv_chunk_t;
  39 typedef struct priv_set priv_set_t;
  40 
  41 #ifdef _KERNEL
  42 
  43 /*
  44  * Kernel type definitions.
  45  */
  46 typedef int priv_ptype_t;
  47 typedef int priv_t;
  48 
  49 #else /* _KERNEL */
  50 
  51 /*
  52  * Userland type definitions.
  53  */
  54 

  55 typedef const char *priv_ptype_t;
  56 typedef const char *priv_t;




  57 
  58 #endif /* _KERNEL */
  59 
  60 /*
  61  * priv_op_t indicates a privilege operation type
  62  */
  63 typedef enum priv_op {
  64         PRIV_ON,
  65         PRIV_OFF,
  66         PRIV_SET
  67 } priv_op_t;
  68 
  69 /*
  70  * Privilege system call subcodes.
  71  */
  72 
  73 #define PRIVSYS_SETPPRIV        0
  74 #define PRIVSYS_GETPPRIV        1
  75 #define PRIVSYS_GETIMPLINFO     2
  76 #define PRIVSYS_SETPFLAGS       3