Print this page
remove support for non-ANSI compilation


   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License, Version 1.0 only
   6  * (the "License").  You may not use this file except in compliance
   7  * with the License.
   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 /*

  23  * Copyright (c) 1999 by Sun Microsystems, Inc. All rights reserved.
  24  */
  25 
  26 #ifndef _AUTH_ATTR_H
  27 #define _AUTH_ATTR_H
  28 
  29 #pragma ident   "%Z%%M% %I%     %E% SMI"
  30 
  31 #ifdef  __cplusplus
  32 extern "C" {
  33 #endif
  34 
  35 #include <sys/types.h>
  36 #include <secdb.h>
  37 
  38 /*
  39  * Some macros used internally by the nsswitch code
  40  */
  41 #define AUTH_MMAPLEN                    1024
  42 #define AUTH_POLICY                     "/etc/security/policy.conf"
  43 #define DEF_AUTH                        "AUTHS_GRANTED="
  44 #define AUTHATTR_FILENAME               "/etc/security/auth_attr"
  45 #define AUTHATTR_DB_NAME                "auth_attr.org_dir"
  46 #define AUTHATTR_DB_NCOL                6       /* total columns */
  47 #define AUTHATTR_DB_NKEYCOL             1       /* total searchable columns */
  48 #define AUTHATTR_DB_TBLT                "auth_attr_tbl"
  49 #define AUTHATTR_NAME_DEFAULT_KW        "nobody"
  50 


  73         char   *name;           /* authorization name */
  74         char   *res1;           /* reserved for future use */
  75         char   *res2;           /* reserved for future use */
  76         char   *short_desc;     /* short description */
  77         char   *long_desc;      /* long description */
  78         char   *attr;           /* string of key-value pair attributes */
  79 } authstr_t;
  80 
  81 /*
  82  * API representation of authorization attributes.
  83  */
  84 typedef struct authattr_s {
  85         char   *name;           /* authorization name */
  86         char   *res1;           /* reserved for future use */
  87         char   *res2;           /* reserved for future use */
  88         char   *short_desc;     /* short description */
  89         char   *long_desc;      /* long description */
  90         kva_t  *attr;           /* array of key-value pair attributes */
  91 } authattr_t;
  92 
  93 #ifdef __STDC__
  94 extern authattr_t *getauthnam(const char *);
  95 extern authattr_t *getauthattr(void);
  96 extern void setauthattr(void);
  97 extern void endauthattr(void);
  98 extern void free_authattr(authattr_t *);
  99 extern int chkauthattr(const char *, const char *);
 100 
 101 #else                           /* not __STDC__ */
 102 
 103 extern authattr_t *getauthnam();
 104 extern authattr_t *getauthattr();
 105 extern void setauthattr();
 106 extern void endauthattr();
 107 extern void free_authattr();
 108 extern int chkauthattr();
 109 #endif
 110 
 111 #ifdef  __cplusplus
 112 }
 113 #endif
 114 
 115 #endif  /* _AUTH_ATTR_H */


   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License, Version 1.0 only
   6  * (the "License").  You may not use this file except in compliance
   7  * with the License.
   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 /*
  23  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  24  * Copyright (c) 1999 by Sun Microsystems, Inc. All rights reserved.
  25  */
  26 
  27 #ifndef _AUTH_ATTR_H
  28 #define _AUTH_ATTR_H
  29 


  30 #ifdef  __cplusplus
  31 extern "C" {
  32 #endif
  33 
  34 #include <sys/types.h>
  35 #include <secdb.h>
  36 
  37 /*
  38  * Some macros used internally by the nsswitch code
  39  */
  40 #define AUTH_MMAPLEN                    1024
  41 #define AUTH_POLICY                     "/etc/security/policy.conf"
  42 #define DEF_AUTH                        "AUTHS_GRANTED="
  43 #define AUTHATTR_FILENAME               "/etc/security/auth_attr"
  44 #define AUTHATTR_DB_NAME                "auth_attr.org_dir"
  45 #define AUTHATTR_DB_NCOL                6       /* total columns */
  46 #define AUTHATTR_DB_NKEYCOL             1       /* total searchable columns */
  47 #define AUTHATTR_DB_TBLT                "auth_attr_tbl"
  48 #define AUTHATTR_NAME_DEFAULT_KW        "nobody"
  49 


  72         char   *name;           /* authorization name */
  73         char   *res1;           /* reserved for future use */
  74         char   *res2;           /* reserved for future use */
  75         char   *short_desc;     /* short description */
  76         char   *long_desc;      /* long description */
  77         char   *attr;           /* string of key-value pair attributes */
  78 } authstr_t;
  79 
  80 /*
  81  * API representation of authorization attributes.
  82  */
  83 typedef struct authattr_s {
  84         char   *name;           /* authorization name */
  85         char   *res1;           /* reserved for future use */
  86         char   *res2;           /* reserved for future use */
  87         char   *short_desc;     /* short description */
  88         char   *long_desc;      /* long description */
  89         kva_t  *attr;           /* array of key-value pair attributes */
  90 } authattr_t;
  91 

  92 extern authattr_t *getauthnam(const char *);
  93 extern authattr_t *getauthattr(void);
  94 extern void setauthattr(void);
  95 extern void endauthattr(void);
  96 extern void free_authattr(authattr_t *);
  97 extern int chkauthattr(const char *, const char *);
  98 










  99 #ifdef  __cplusplus
 100 }
 101 #endif
 102 
 103 #endif  /* _AUTH_ATTR_H */