Manual Pages for UNIX Darwin command on man sasl_auxprop
MyWebUniversity

Manual Pages for UNIX Darwin command on man sasl_auxprop

saslauxprop(10 July 2001) saslauxprop(10 July 2001)

NAME

saslauxprop - How to work with SASL auxilliary properties

SYNOPSIS

##iinncclluuddee <>

ssttrruucctt pprrooppccttxx **pprrooppnneeww((uunnssiiggnneedd estimate)) iinntt pprrooppdduupp((ssttrruucctt pprrooppccttxx *srcctx,, ssttrruucctt pprrooppccttxx *dstctx)) iinntt pprroopprreeqquueesstt((ssttrruucctt pprrooppccttxx *ctx,, ccoonnsstt cchhaarr **names)) ccoonnsstt ssttrruucctt pprrooppvvaall **pprrooppggeett((ssttrruucctt pprrooppccttxx *ctx)) iinntt pprrooppggeettnnaammeess((ssttrruucctt pprrooppccttxx *ctx,, ccoonnsstt cchhaarr **names,, ssttrruucctt ppoorrppvvaall *vals)) vvooiidd pprrooppcclleeaarr((ssttrruucctt pprrooppccttxx *ctx,, iinntt requests)) vvooiidd pprrooppeerraassee((ssttrruucctt pprrooppccttxx *ctx,, ccoonnsstt cchhaarr *name)) vvooiidd pprrooppddiissppoossee((ssttrruucctt pprrooppccttxx **ctx)) iinntt pprrooppffoorrmmaatt((ssttrruucctt pprrooppccttxx *ctx,, ccoonnsstt cchhaarr *sep,, iinntt seplen,, cchhaarr *outbuf,, uunnssiiggnneedd outmax,, uunnssiiggnneedd *outlen)) iinntt pprrooppsseett((ssttrruucctt pprrooppccttxx *ctx,, ccoonnsstt cchhaarr *name,, ccoonnsstt cchhaarr *value,, iinntt vallen)) iinntt pprrooppsseettvvaallss((ssttrruucctt pprrooppccttxx *ctx,, ccoonnsstt cchhaarr *name,, ccoonnsstt cchhaarr **values))

DESCRIPTION

SSAASSLL aauuxxiilllliiaarryy pprrooppeerrttiieess 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 probabally needs other information from there as well, such as home directory or UID. The auxilliary property interface allows the two to cooperate, and only results in a single query agains the LDAP server (or other property sources). Property lookups take place directly after user canonicalization occurs. Therefore, all requests should be registered witht he context before that time. Note that requests can also be registered using the saslauxproprequest(3) function. Most of the functions listed below, however, require a property context whch can be obtained by calling saslauxpropgetctx(3). AAPPII DDeessccrriippttiioonn struct propctx *propnew(unsigned estimate)

Create a new property context. Probabally unnecessary for app-

plication developers to call this at any point. estimate is the estimate of storage needed total for requests & responses. A value of 0 will imply the library default. int propdup(struct propctx *srcctx, struct propctx *dstctx) Duplicate a given property context. int proprequest(struct propctx *ctx, const char **names) Add properties to the request list of a given context.

names is the NULL-terminated array of property names, and must

persist until the requests are cleared or the context is dis-

posed of with a call to propdispose. const struct propval *propget(struct propctx *ctx)

Returns a NULL-terminated array of struct propval from the

given context. int propgetnames(struct propctx *ctx, const char **names, struct porpval *vals) Fill in a (provided) array of struct propval 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 proprequest, propclear, or propdispose on context. If a name secified here was never requested, that its associated values entry will be set to NULL. Returns number of matching properties that were found, or a SASL error code. void propclear(struct propctx *ctx, int requests) Clear values and optionally requests from a property context. requests is 1 if the requests should be cleared, 0 otherwise. void properase(struct propctx *ctx, const char *name) Securely erase the value of a property. name is the name of the property to erase. void propdispose(struct propctx **ctx) Disposes of a property context and NULLifys the pointer. int propformat(struct propctx *ctx, const char *sep, int seplen, char *outbuf, unsigned outmax, unsigned *outlen) Format the requested property names into a string. This not intended for use by the application (only by auxprop plugins). sep Is the seperator to use for the string

outbuf Is the caller-allocated buffer of length outmax that the

resulting string will be placed in (including NUL terminator).

outlen if non-NULL, will contain the length of the resulting

string (excluding NUL terminator). int propset(struct propctx *ctx, const char *name, const char *value, int vallen) Adds a property vaue to the context. This is intended for use by auxprop plugins only. name is the name of the property to recieve the new value, or NULL, which implies that the value will be added to the same property as the last call to either propset or propsetvals. value is a value for the property of length vallen int propsetvals(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. name has the same meaning as in pprrooppsseett

values are a NULL-terminated array of values to be added the

property. RREETTUURRNN VVAALLUUEE The property functions that return an int return SASL error codes. See saslerrors(3). Those that return pointers will return a valid pointer on success, or NULL on any error. CCOONNFFOORRMMIINNGG TTOO RFC 2222

SEE ALSO

sasl(3), saslerrors(3), saslauxproprequest(3), saslaux-

propgetctx(3) SASL man pages SASL saslauxprop(10 July 2001)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™