Content-type: text/html Man page of sasl_auxprop

sasl_auxprop

Section: Simple Authentication Security Layer Library Functions (3SASL)
Updated: 14 Oct 2003
Index Return to Main Contents
 

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 properties  

SYNOPSIS

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);  

DESCRIPTION

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).  

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 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.  

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.  

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 used only by auxprop plug-ins.  

prop_set()

The prop_set() functions adds a property value to the context. 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 auxprop 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 a call to prop_dispose().

name 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().

outbuf The caller-allocated buffer of length outmax that the resulting string, including the NULL terminator, will be placed in.

outlen If non-NULL, contains the length of the resulting sting, excluding the NULL terminator.

outmax The maximum length of the output buffer, including 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 attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
AvailabilitySUNWlibsasl
Interface StabilityEvolving
MT-LevelMT-Safe

 

SEE ALSO

sasl_auxprop_getctx(3SASL), sasl_auxprop_request(3SASL), sasl_errors(3SASL), attributes(5)


 

Index

NAME
SYNOPSIS
DESCRIPTION
prop_new()
prop_dup()
prop_request()
prop_get()
prop_getnames()
prop_clear()
prop_erase()
prop_dispose()
prop_format()
prop_set()
prop_setvals()
PARAMETERS
ERRORS
ATTRIBUTES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 02:39:13 GMT, October 02, 2010