|Skip Navigation Links|
|Exit Print View|
|man pages section 3: Networking Library Functions Oracle Solaris 11 Express 11/10|
- SASL auxilliary properties
cc [ flag ... ] file ... -lsasl [ library ... ] #include <sasl/prop.h> 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 *vals
void 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 *outlen
int prop_set(struct propctx *ctx, const char *name, const char *value, int vallen
int prop_setvals(struct propctx *ctx, const char *name, const char **values
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 to 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 canonicalization occurs. Therefore, all request should be registered with the context before user canonicalization occurs. Requests can calso be registered by using the sasl_auxprop_request(3SASL) function. Most of the auxilliary property functions require a property context that can be obtained by calling sasl_auxprop_getctx(3SASL).
The prop_new() function creates a new property context. It is unlikely that application developers will use this call.
The prop_dup() function duplicates a given property context.
The prop_request() function adds properties to the request list of a given context.
The prop_get() function returns a null-terminated array of struct propval from the given context.
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 the context 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.
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.
The prop_erase() function securely erases the value of a property. name is the name of the property to erase.
The prop_dispose() function disposes of a property context and nullifies the pointer.
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 used only by auxprop plug-ins.
The prop_set() functions adds a property value to the context. The prop_set() function is used only by auxprop plug-ins.
The prop_setvals() function adds multiple values to a single property. The prop_setvals() function is used only by auxprop plug-ins.
The sasl_conn_t for which the request is being made
The property context.
The estimate of the total storage needed for requests and responses. The library default is implied by a value of 0.
The null-terminated array of property names. names must persist until the requests are cleared or the context is disposed of with a call to prop_dispose().
The name of the property.
For prop_set(), name is the named of the property to receive the new value, or NULL. The value will be added to the same property as the last call to either prop_set() or prop_setvals().
The caller-allocated buffer of length outmax that the resulting string, including the NULL terminator, will be placed in.
If non-NULL, contains the length of the resulting sting, excluding the NULL terminator.
The maximum length of the output buffer, including the NULL terminator.
The request list for a given context.
The separator to use for the string.
The length of the separator. The the values is less than 0, then strlen will be used as sep.
The length of the property.
The value string.
A value for the property of length vallen.
A null-terminated array of values to be added to the property.
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.
See attributes(5) for descriptions of the following attributes: