Print this page
9728 3secdb man pages need some tlc
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3secdb/getuserattr.3secdb.man.txt
+++ new/usr/src/man/man3secdb/getuserattr.3secdb.man.txt
1 1 GETUSERATTR(3SECDB) Security Attributes Database Library Functions
2 2
3 3
4 4
5 5 NAME
6 6 getuserattr, getusernam, getuseruid, free_userattr, setuserattr,
7 7 enduserattr, fgetuserattr - get user_attr entry
8 8
9 9 SYNOPSIS
10 10 cc [ flag... ] file... -lsecdb -lsocket -lnsl [ library... ]
11 11 #include <user_attr.h>
12 12
13 13 userattr_t *getuserattr(void);
14 14
15 15
16 16 userattr_t *getusernam(const char *name);
17 17
18 18
19 19 userattr_t *getuseruid(uid_t uid);
20 20
21 21
22 22 void free_userattr(userattr_t *userattr);
23 23
24 24
25 25 void setuserattr(void);
26 26
27 27
28 28 void enduserattr(void);
29 29
30 30
31 31 userattr_t *fgetuserattr(FILE *f);
32 32
33 33
34 34 DESCRIPTION
35 35 The getuserattr(), getusernam(), and getuseruid() functions each return
36 36 a user_attr(4) entry. Entries can come from any of the sources
37 37 specified in the nsswitch.conf(4) file. The getuserattr() function
38 38 enumerates user_attr entries. The getusernam() function searches for a
39 39 user_attr entry with a given user name name. The getuseruid() function
40 40 searches for a user_attr entry with a given user ID uid. Successive
41 41 calls to these functions return either successive user_attr entries or
42 42 NULL.
43 43
44 44
45 45 The fgetuserattr() function does not use nsswitch.conf but reads and
46 46 parses the next line from the stream f. This stream is assumed to have
47 47 the format of the user_attr files.
48 48
49 49
50 50 The free_userattr() function releases memory allocated by the
51 51 getusernam(), getuserattr(), and fgetuserattr() functions.
52 52
53 53
54 54 The internal representation of a user_attr entry is a userattr_t
55 55 structure defined in <user_attr.h> with the following members:
56 56
57 57 char *name; /* name of the user */
58 58 char *qualifier; /* reserved for future use */
59 59 char *res1; /* reserved for future use */
60 60 char *res2; /* reserved for future use */
61 61 kva_t *attr; /* list of attributes */
62 62
63 63
64 64
65 65 The setuserattr() function "rewinds" to the beginning of the
66 66 enumeration of user_attr entries. Calls to getusernam() may leave the
67 67 enumeration in an indeterminate state, so setuserattr() should be
68 68 called before the first call to getuserattr().
69 69
70 70
71 71 The enduserattr() function may be called to indicate that user_attr
72 72 processing is complete; the library may then close any open user_attr
73 73 file, deallocate any internal storage, and so forth.
74 74
75 75 RETURN VALUES
76 76 The getuserattr() function returns a pointer to a userattr_t if it
77 77 successfully enumerates an entry; otherwise it returns NULL, indicating
78 78 the end of the enumeration.
79 79
80 80
81 81 The getusernam() function returns a pointer to a userattr_t if it
82 82 successfully locates the requested entry; otherwise it returns NULL.
↓ open down ↓ |
82 lines elided |
↑ open up ↑ |
83 83
84 84 USAGE
85 85 The getuserattr() and getusernam() functions both allocate memory for
86 86 the pointers they return. This memory should be deallocated with the
87 87 free_userattr() function.
88 88
89 89
90 90 Individual attributes can be referenced in the attr structure by
91 91 calling the kva_match(3SECDB) function.
92 92
93 -WARININGS
94 - Because the list of legal keys is likely to expand, code must be
93 +WARNINGS
94 + Because the list of legal keys is likely to expand, code must be
95 95 written to ignore unknown key-value pairs without error.
96 96
97 97 FILES
98 98 /etc/user_attr
99 99 extended user attributes
100 100
101 101
102 102 /etc/nsswitch.conf
103 103 configuration file lookup information for the
104 - name server switch
104 + name service switch
105 105
106 106
107 107 ATTRIBUTES
108 108 See attributes(5) for descriptions of the following attributes:
109 109
110 110
111 111
112 112
113 113 +---------------+-----------------+
114 114 |ATTRIBUTE TYPE | ATTRIBUTE VALUE |
115 115 +---------------+-----------------+
116 116 |MT-Level | MT-Safe |
117 117 +---------------+-----------------+
118 118
119 119 SEE ALSO
120 120 getauthattr(3SECDB), getexecattr(3SECDB), getprofattr(3SECDB),
121 - user_attr(4), attributes(5)
121 + kva_match(3SECDB), user_attr(4), attributes(5)
122 122
123 123
124 124
125 - March 31, 2005 GETUSERATTR(3SECDB)
125 + August 13, 2018 GETUSERATTR(3SECDB)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX