SASL_AUXPROP(3) Cyrus SASL SASL_AUXPROP(3)
NAME
sasl_auxprop - Cyrus SASL documentation
SYNOPSIS
#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
SASL auxiliary properties are used to obtain properties from external
sources during the authentication process. For example, a mechanism
might need to query an LDAP server to obtain the authentication secret.
The application probably needs other information from there as well,
such as home directory or UID. The auxiliary property interface al-
lows the two to cooperate, and only results in a single query against
the LDAP server (or other property sources).
Property lookups take place directly after user canonicalization oc-
curs. Therefore, all requests should be registered with the context
before that time. Note that requests can also be registered using the
sasl_auxprop_request(3) function. Most of the functions listed be-
low, however, require a property context which can be obtained by call-
ing sasl_auxprop_getctx(3).
API DESCRIPTION
struct propctx *prop_new(unsigned estimate)
Create a new property context. Probably unnecessary for appli-
cation developers to call this at any point.
Parameters
o estimate is the estimate of storage needed in total
for requests & responses. A value of 0 implies the li-
brary default.
Returns
a new property context: propctx
int prop_dup(struct propctx *src_ctx, struct propctx *dst_ctx)
Duplicate a given property context.
Parameters
o src_ctx (propctx) Property context to copy.
o dst_ctx (propctx) Destination context to copy into.
Returns
SASL error code.
int prop_request(struct propctx *ctx, const char **names)
Add properties to the request list of a given context.
Parameters
o ctx (propctx) The property context to add add the re-
quest list to.
o names is the NULL-terminated array of property names,
and must persist until the requests are cleared or the
context is disposed of with a call to prop_dispose().
Returns
SASL error code
const struct propval *prop_get(struct propctx *ctx)
Fetch out the property values from a context.
Parameters
o ctx (propctx) The property context to fetch from.
Returns
a NULL-terminated array of property values from the given
context.
int prop_getnames(struct propctx *ctx, const char **names, struct
propval *vals)
Fill in a (provided) array of property values based on a list of
property names. This implies that the vals array is at least as
long as the names array. The values that are filled in by this
call persist until next call to prop_request(),
prop_clear(), or prop_dispose() on context. If a name specified
here was never requested, then its associated values entry will
be set to NULL.
Parameters
o ctx (propctx) The property context to fill in.
Returns
number of matching properties that were found, or a SASL
error code.
void prop_clear(struct propctx *ctx, int requests)
Clear values and (optionally) requests from a property context.
Parameters
o ctx (propctx) The property context to clear.
o requests set to 1 if the requests should be cleared, 0
otherwise.
void prop_erase(struct propctx *ctx, const char *name)
Securely erase the value of a property from a context.
Parameters
o ctx (propctx) The property context to find the prop-
erty in.
o name is the name of the property to erase.
void prop_dispose(struct propctx **ctx)
Disposes of a property context and NULLifys the pointer.
Parameters
o ctx (propctx) The property context to clear.
int prop_format(struct propctx *ctx, const char *sep, int seplen, char
*outbuf, unsigned outmax, unsigned *outlen)
Format the requested property names into a string. This not in-
tended for use by the application (only by auxprop plugins).
Parameters
o ctx (propctx) The property context to extract values
from.
o sep the separator to use for the string
o outbuf destination string. Caller must allocate the
buffer of length outmax (including NUL terminator).
o outlen if non-NULL, will contain the length of the re-
sulting string (excluding NUL terminator).
Returns
SASL error code.
int prop_set(struct propctx *ctx, const char *name, const char *value,
int vallen)
Adds a property value to the context. This is intended for use
by auxprop plugins only.
Parameters
o ctx (propctx) The property context to add a value to.
o name the name of the property to receive the new
value, or NULL, which implies that the value will be
added to the same property as the last call to either
prop_set() or prop_setvals().
o value the new value (of length vallen)
o vallen the length of the string value.
Returns
SASL error code
int prop_setvals(struct propctx *ctx, const char *name, const char
**values)
Adds multiple values to a single property. This is intended for
use by auxprop plugins only.
Parameters
o ctx (propctx) The property context to add values to.
o name The name of the property to receive the new
value, or NULL, whi.
SASL_AUXPROP(3) Cyrus SASL SASL_AUXPROP(3)
NAME
sasl_auxprop - Cyrus SASL documentation
SYNOPSIS
#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,
2.1.27 February 25, 2022 SASL_AUXPROP(3)
Czas wygenerowania: 0.00015 sek.
Created with the man page lookup class by Andrew Collington.
Based on a C man page viewer by Vadim Pavlov
Unicode soft-hyphen fix (as used by RedHat) by Dan Edwards
Some optimisations by Eli Argon
Caching idea and code contribution by James Richardson
Copyright © 2003-2025 Linux.pl
Hosted by Hosting Linux.pl