Print this page
remove support for non-ANSI compilation
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/head/auth_attr.h
+++ new/usr/src/head/auth_attr.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License, Version 1.0 only
6 6 * (the "License"). You may not use this file except in compliance
7 7 * with the License.
8 8 *
9 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 10 * or http://www.opensolaris.org/os/licensing.
11 11 * See the License for the specific language governing permissions
12 12 * and limitations under the License.
↓ open down ↓ |
12 lines elided |
↑ open up ↑ |
13 13 *
14 14 * When distributing Covered Code, include this CDDL HEADER in each
15 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 16 * If applicable, add the following below this CDDL HEADER, with the
17 17 * fields enclosed by brackets "[]" replaced with your own identifying
18 18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 19 *
20 20 * CDDL HEADER END
21 21 */
22 22 /*
23 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
23 24 * Copyright (c) 1999 by Sun Microsystems, Inc. All rights reserved.
24 25 */
25 26
26 27 #ifndef _AUTH_ATTR_H
27 28 #define _AUTH_ATTR_H
28 29
29 -#pragma ident "%Z%%M% %I% %E% SMI"
30 -
31 30 #ifdef __cplusplus
32 31 extern "C" {
33 32 #endif
34 33
35 34 #include <sys/types.h>
36 35 #include <secdb.h>
37 36
38 37 /*
39 38 * Some macros used internally by the nsswitch code
40 39 */
41 40 #define AUTH_MMAPLEN 1024
42 41 #define AUTH_POLICY "/etc/security/policy.conf"
43 42 #define DEF_AUTH "AUTHS_GRANTED="
44 43 #define AUTHATTR_FILENAME "/etc/security/auth_attr"
45 44 #define AUTHATTR_DB_NAME "auth_attr.org_dir"
46 45 #define AUTHATTR_DB_NCOL 6 /* total columns */
47 46 #define AUTHATTR_DB_NKEYCOL 1 /* total searchable columns */
48 47 #define AUTHATTR_DB_TBLT "auth_attr_tbl"
49 48 #define AUTHATTR_NAME_DEFAULT_KW "nobody"
50 49
51 50 #define AUTHATTR_COL0_KW "name"
52 51 #define AUTHATTR_COL1_KW "res1"
53 52 #define AUTHATTR_COL2_KW "res2"
54 53 #define AUTHATTR_COL3_KW "short_desc"
55 54 #define AUTHATTR_COL4_KW "long_desc"
56 55 #define AUTHATTR_COL5_KW "attr"
57 56
58 57 /*
59 58 * indices of searchable columns
60 59 */
61 60 #define AUTHATTR_KEYCOL0 0 /* name */
62 61
63 62
64 63 /*
65 64 * Key words used in the auth_attr database
66 65 */
67 66 #define AUTHATTR_HELP_KW "help"
68 67
69 68 /*
70 69 * Nsswitch internal representation of authorization attributes.
71 70 */
72 71 typedef struct authstr_s {
73 72 char *name; /* authorization name */
74 73 char *res1; /* reserved for future use */
75 74 char *res2; /* reserved for future use */
76 75 char *short_desc; /* short description */
77 76 char *long_desc; /* long description */
78 77 char *attr; /* string of key-value pair attributes */
79 78 } authstr_t;
80 79
81 80 /*
82 81 * API representation of authorization attributes.
↓ open down ↓ |
42 lines elided |
↑ open up ↑ |
83 82 */
84 83 typedef struct authattr_s {
85 84 char *name; /* authorization name */
86 85 char *res1; /* reserved for future use */
87 86 char *res2; /* reserved for future use */
88 87 char *short_desc; /* short description */
89 88 char *long_desc; /* long description */
90 89 kva_t *attr; /* array of key-value pair attributes */
91 90 } authattr_t;
92 91
93 -#ifdef __STDC__
94 92 extern authattr_t *getauthnam(const char *);
95 93 extern authattr_t *getauthattr(void);
96 94 extern void setauthattr(void);
97 95 extern void endauthattr(void);
98 96 extern void free_authattr(authattr_t *);
99 97 extern int chkauthattr(const char *, const char *);
100 98
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 99 #ifdef __cplusplus
112 100 }
113 101 #endif
114 102
115 103 #endif /* _AUTH_ATTR_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX