Simple Authentication Security Layer Library Functions
sasl_auxprop(3SASL)
NAME
sasl_auxprop, prop_new, prop_dup, prop_request, prop_get,
prop_getnames, prop_clear, prop_erase, prop_dispose,
prop_format, prop_set, prop_setvals - SASL auxilliary pro-
pertiesSYNOPSIS
cc [ flag ... ] file ... -lsasl [ library ... ]
#include
struct propctx *prop_new(unsigned estimate);
int prop_dup(struct propctx *src_ctx, struct propctx *dst_ctx
int prop_request(struct propctx *ctx, const char **names
const struct propval *prop_get(struct propctx *ctx
int prop_getnames(struct propctx *ctx, const char **names,
struct propval *valsvoid prop_clear(struct propctx *ctx, int requests
void prop_erase(struct propctx *ctx, const char *name
void prop_dispose(struct propctx *ctx
int prop_format(struct propctx *ctx, const char *sep, int seplen,
char *outbuf, unsigned outmax, unsigned *outlenint prop_set(struct propctx *ctx, const char *name, const char *value,
int vallenint prop_setvals(struct propctx *ctx, const char *name,
const char **valuesDESCRIPTION
The SASL auxilliary properties are used to obtain properties from external sources during the authentication process. For example, a mechanizm might need to query an LDAP server toSunOS 5.11 Last change: 14 Oct 2003 1
Simple Authentication Security Layer Library Functionssasl_auxprop(3SASL)
obtain the authentication secret. The application probably needs other information from the LDAP server as well, such as the home directory of the UID. The auxilliary property interface allows the two to cooperate and results in only a single query against the property sources.Property lookups take place directly after user canonicali-
zation occurs. Therefore, all request should be registered with the context before user canonicalization occurs. Requests can calso be registered by using thesasl_auxprop_request(3SASL) function. Most of the auxilliary
property functions require a property context that can beobtained by calling sasl_auxprop_getctx(3SASL).
prop_new()
The prop_new() function creates a new property context. It
is unlikely that application developers will use this call.prop_dup()
The prop_dup() function duplicates a given property context.
prop_request()
The prop_request() function adds properties to the request
list of a given context.prop_get()
The prop_get() function returns a null-terminated array of
struct propval from the given context.prop_getnames()
The prop_getnames() function fills in an array of struct
propval based on a list of property names. The vals array is at least as long as the names array. The values that are filled in by this call persist until the next call on thecontext to prop_request(), prop_clear(), or prop_dispose().
If a name specified was never requested, then its associated values entry will be set to NULL.The prop_getnames() function returns the number of matching
properties that were found or a SASL error code.prop_clear()
The prop_clear() function clears values and requests from a
property context. If the value of requests is 1, then requests is cleared. Otherwise, the value of requests is 0.prop_erase()
The prop_erase() function securely erases the value of a
property. name is the name of the property to erase.SunOS 5.11 Last change: 14 Oct 2003 2
Simple Authentication Security Layer Library Functionssasl_auxprop(3SASL)
prop_dispose()
The prop_dispose() function disposes of a property context
and nullifies the pointer.prop_format()
The prop_format() function formats the requested property
names into a string. The prop_format() function is not
intended to be used by the application. The function is usedonly by auxprop plug-ins.
prop_set()
The prop_set() functions adds a property value to the con-
text. The prop_set() function is used only by auxprop plug-
ins.prop_setvals()
The prop_setvals() function adds multiple values to a single
property. The prop_setvals() function is used only by aux-
prop plug-ins.
PARAMETERS
conn The sasl_conn_t for which the request is being
made ctx The property context. estimate The estimate of the total storage needed for requests and responses. The library default is implied by a value of 0.names The null-terminated array of property names.
names must persist until the requests are cleared or the context is disposed of with acall to prop_dispose().
name The name of the property.For prop_set(), name is the named of the pro-
perty to receive the new value, or NULL. The value will be added to the same property as thelast call to either prop_set() or
prop_setvals().
outbuf The caller-allocated buffer of length outmax
that the resulting string, including the NULL terminator, will be placed in.SunOS 5.11 Last change: 14 Oct 2003 3
Simple Authentication Security Layer Library Functionssasl_auxprop(3SASL)
outlen If non-NULL, contains the length of the result-
ing sting, excluding the NULL terminator.outmax The maximum length of the output buffer, includ-
ing the NULL terminator. requests The request list for a given context. sep The separator to use for the string. seplen The length of the separator. The the values is less than 0, then strlen will be used as sep. vallen The length of the property. vals The value string. value A value for the property of length vallen.values A null-terminated array of values to be added to
the property.ERRORS
The sasl_auxprop() functions that return an int will return
a SASL error code. See sasl_errors(3SASL). Those
sasl_auxprop() functions that return a pointer will return a
valid pointer upon success and return NULL upon failure.ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:SunOS 5.11 Last change: 14 Oct 2003 4
Simple Authentication Security Layer Library Functionssasl_auxprop(3SASL)
_________________________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|________________________________|
| Availability | system/library/security/libsasl||_____________________________|________________________________|
| Interface Stability | Committed ||_____________________________|________________________________|
| MT-Level | MT-Safe |
|_____________________________|________________________________|
SEE ALSO
sasl_auxprop_getctx(3SASL), sasl_auxprop_request(3SASL),
sasl_errors(3SASL), attributes(5)
SunOS 5.11 Last change: 14 Oct 2003 5
Simple Authentication Security Layer Library Functionssasl_auxprop(3SASL)
SunOS 5.11 Last change: 14 Oct 2003 6