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) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
  23  */
  24 
  25 #ifndef _USER_ATTR_H
  26 #define _USER_ATTR_H
  27 
  28 #ifdef  __cplusplus
  29 extern "C" {
  30 #endif
  31 
  32 
  33 #include <sys/types.h>
  34 #include <secdb.h>
  35 
  36 
  37 struct __FILE;          /* structure tag for type FILE defined in stdio.h */
  38 
  39 /*
  40  * Some macros used internally by the nsswitch code
  41  */


 112  */
 113 typedef struct userstr_s {
 114         char   *name;           /* user name */
 115         char   *qualifier;      /* reserved for future use */
 116         char   *res1;           /* reserved for future use */
 117         char   *res2;           /* reserved for future use */
 118         char   *attr;           /* string of key-value pair attributes */
 119 } userstr_t;
 120 
 121 /*
 122  * API representation of user attributes.
 123  */
 124 typedef struct userattr_s {
 125         char   *name;           /* user name */
 126         char   *qualifier;      /* reserved for future use */
 127         char   *res1;           /* reserved for future use */
 128         char   *res2;           /* reserved for future use */
 129         kva_t  *attr;           /* array of key-value pair attributes */
 130 } userattr_t;
 131 
 132 #ifdef  __STDC__
 133 extern userattr_t *getusernam(const char *);
 134 extern userattr_t *getuseruid(uid_t uid);
 135 extern userattr_t *getuserattr(void);
 136 extern userattr_t *fgetuserattr(struct __FILE *);
 137 extern void setuserattr(void);
 138 extern void enduserattr(void);
 139 extern void free_userattr(userattr_t *);
 140 
 141 #else                           /* not __STDC__ */
 142 
 143 extern userattr_t *getusernam();
 144 extern userattr_t *getuseruid();
 145 extern userattr_t *getuserattr();
 146 extern userattr_t *fgetuserattr();
 147 extern void setuserattr();
 148 extern void enduserattr();
 149 extern void free_userattr();
 150 #endif
 151 
 152 #ifdef  __cplusplus
 153 }
 154 #endif
 155 
 156 #endif  /* _USER_ATTR_H */


   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  * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
  24  */
  25 
  26 #ifndef _USER_ATTR_H
  27 #define _USER_ATTR_H
  28 
  29 #ifdef  __cplusplus
  30 extern "C" {
  31 #endif
  32 
  33 
  34 #include <sys/types.h>
  35 #include <secdb.h>
  36 
  37 
  38 struct __FILE;          /* structure tag for type FILE defined in stdio.h */
  39 
  40 /*
  41  * Some macros used internally by the nsswitch code
  42  */


 113  */
 114 typedef struct userstr_s {
 115         char   *name;           /* user name */
 116         char   *qualifier;      /* reserved for future use */
 117         char   *res1;           /* reserved for future use */
 118         char   *res2;           /* reserved for future use */
 119         char   *attr;           /* string of key-value pair attributes */
 120 } userstr_t;
 121 
 122 /*
 123  * API representation of user attributes.
 124  */
 125 typedef struct userattr_s {
 126         char   *name;           /* user name */
 127         char   *qualifier;      /* reserved for future use */
 128         char   *res1;           /* reserved for future use */
 129         char   *res2;           /* reserved for future use */
 130         kva_t  *attr;           /* array of key-value pair attributes */
 131 } userattr_t;
 132 

 133 extern userattr_t *getusernam(const char *);
 134 extern userattr_t *getuseruid(uid_t uid);
 135 extern userattr_t *getuserattr(void);
 136 extern userattr_t *fgetuserattr(struct __FILE *);
 137 extern void setuserattr(void);
 138 extern void enduserattr(void);
 139 extern void free_userattr(userattr_t *);
 140 











 141 #ifdef  __cplusplus
 142 }
 143 #endif
 144 
 145 #endif  /* _USER_ATTR_H */