1sasl_auxprop(S3iSmApSlLe)Authentication Security Layer Library Funscatsilo_nasuxprop(3SASL)
2
3
4
6 sasl_auxprop, prop_new, prop_dup, prop_request, prop_get, prop_get‐
7 names, prop_clear, prop_erase, prop_dispose, prop_format, prop_set,
8 prop_setvals - SASL auxilliary properties
9
11 cc [ flag ... ] file ... -lsasl [ library ... ]
12 #include <sasl/prop.h>
13
14 struct propctx *prop_new(unsigned estimate);
15
16
17 int prop_dup(struct propctx *src_ctx, struct propctx *dst_ctx
18
19
20 int prop_request(struct propctx *ctx, const char **names
21
22
23 const struct propval *prop_get(struct propctx *ctx
24
25
26 int prop_getnames(struct propctx *ctx, const char **names,
27 struct propval *vals
28
29
30 void prop_clear(struct propctx *ctx, int requests
31
32
33 void prop_erase(struct propctx *ctx, const char *name
34
35
36 void prop_dispose(struct propctx *ctx
37
38
39 int prop_format(struct propctx *ctx, const char *sep, int seplen,
40 char *outbuf, unsigned outmax, unsigned *outlen
41
42
43 int prop_set(struct propctx *ctx, const char *name, const char *value,
44 int vallen
45
46
47 int prop_setvals(struct propctx *ctx, const char *name,
48 const char **values
49
50
52 The SASL auxilliary properties are used to obtain properties from
53 external sources during the authentication process. For example, a
54 mechanizm might need to query an LDAP server to obtain the authentica‐
55 tion secret. The application probably needs other information from the
56 LDAP server as well, such as the home directory of the UID. The auxil‐
57 liary property interface allows the two to cooperate and results in
58 only a single query against the property sources.
59
60
61 Property lookups take place directly after user canonicalization
62 occurs. Therefore, all request should be registered with the context
63 before user canonicalization occurs. Requests can calso be registered
64 by using the sasl_auxprop_request(3SASL) function. Most of the auxil‐
65 liary property functions require a property context that can be
66 obtained by calling sasl_auxprop_getctx(3SASL).
67
68 prop_new()
69 The prop_new() function creates a new property context. It is unlikely
70 that application developers will use this call.
71
72 prop_dup()
73 The prop_dup() function duplicates a given property context.
74
75 prop_request()
76 The prop_request() function adds properties to the request list of a
77 given context.
78
79 prop_get()
80 The prop_get() function returns a null-terminated array of struct prop‐
81 val from the given context.
82
83 prop_getnames()
84 The prop_getnames() function fills in an array of struct propval based
85 on a list of property names. The vals array is at least as long as the
86 names array. The values that are filled in by this call persist until
87 the next call on the context to prop_request(), prop_clear(), or
88 prop_dispose(). If a name specified was never requested, then its asso‐
89 ciated values entry will be set to NULL.
90
91
92 The prop_getnames() function returns the number of matching properties
93 that were found or a SASL error code.
94
95 prop_clear()
96 The prop_clear() function clears values and requests from a property
97 context. If the value of requests is 1, then requests is cleared. Oth‐
98 erwise, the value of requests is 0.
99
100 prop_erase()
101 The prop_erase() function securely erases the value of a property. name
102 is the name of the property to erase.
103
104 prop_dispose()
105 The prop_dispose() function disposes of a property context and nulli‐
106 fies the pointer.
107
108 prop_format()
109 The prop_format() function formats the requested property names into a
110 string. The prop_format() function is not intended to be used by the
111 application. The function is used only by auxprop plug-ins.
112
113 prop_set()
114 The prop_set() functions adds a property value to the context. The
115 prop_set() function is used only by auxprop plug-ins.
116
117 prop_setvals()
118 The prop_setvals() function adds multiple values to a single property.
119 The prop_setvals() function is used only by auxprop plug-ins.
120
122 conn The sasl_conn_t for which the request is being made
123
124
125 ctx The property context.
126
127
128 estimate The estimate of the total storage needed for requests and
129 responses. The library default is implied by a value of 0.
130
131
132 names The null-terminated array of property names. names must
133 persist until the requests are cleared or the context is
134 disposed of with a call to prop_dispose().
135
136
137 name The name of the property.
138
139 For prop_set(), name is the named of the property to
140 receive the new value, or NULL. The value will be added to
141 the same property as the last call to either prop_set() or
142 prop_setvals().
143
144
145 outbuf The caller-allocated buffer of length outmax that the
146 resulting string, including the NULL terminator, will be
147 placed in.
148
149
150 outlen If non-NULL, contains the length of the resulting sting,
151 excluding the NULL terminator.
152
153
154 outmax The maximum length of the output buffer, including the NULL
155 terminator.
156
157
158 requests The request list for a given context.
159
160
161 sep The separator to use for the string.
162
163
164 seplen The length of the separator. The the values is less than 0,
165 then strlen will be used as sep.
166
167
168 vallen The length of the property.
169
170
171 vals The value string.
172
173
174 value A value for the property of length vallen.
175
176
177 values A null-terminated array of values to be added to the prop‐
178 erty.
179
180
182 The sasl_auxprop() functions that return an int will return a SASL
183 error code. See sasl_errors(3SASL). Those sasl_auxprop() functions that
184 return a pointer will return a valid pointer upon success and return
185 NULL upon failure.
186
188 See attributes(5) for descriptions of the following attributes:
189
190
191
192
193 ┌─────────────────────────────┬─────────────────────────────┐
194 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
195 ├─────────────────────────────┼─────────────────────────────┤
196 │Availability │SUNWlibsasl │
197 ├─────────────────────────────┼─────────────────────────────┤
198 │Interface Stability │Evolving │
199 ├─────────────────────────────┼─────────────────────────────┤
200 │MT-Level │MT-Safe │
201 └─────────────────────────────┴─────────────────────────────┘
202
204 sasl_auxprop_getctx(3SASL), sasl_auxprop_request(3SASL),
205 sasl_errors(3SASL), attributes(5)
206
207
208
209SunOS 5.11 14 Oct 2003 sasl_auxprop(3SASL)