xref: /titanic_52/usr/src/man/man3sasl/sasl_auxprop.3sasl (revision 263f549e5da8b32c4922f586afb365b8ae388a6c)
te
Copyright (C) 1998-2003, Carnegie Mellon Univeristy. All Rights Reserved.
Portions Copyright (C) 2003, Sun Microsystems,
Inc. All Rights Reserved
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
SASL_AUXPROP 3SASL "Oct 14, 2003"
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 TYPE ATTRIBUTE VALUE
Interface Stability Evolving
MT-Level MT-Safe
SEE ALSO

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