ÿØÿà JFIF    ÿÛ „ ( %!1!%*+...983,7(-.- include/sasl/hmac-md5.h000064400000002530152342602460010701 0ustar00/* hmac-md5.h -- HMAC_MD5 functions */ #ifndef HMAC_MD5_H #define HMAC_MD5_H 1 #define HMAC_MD5_SIZE 16 /* intermediate MD5 context */ typedef struct HMAC_MD5_CTX_s { MD5_CTX ictx, octx; } HMAC_MD5_CTX; /* intermediate HMAC state * values stored in network byte order (Big Endian) */ typedef struct HMAC_MD5_STATE_s { UINT4 istate[4]; UINT4 ostate[4]; } HMAC_MD5_STATE; #ifdef __cplusplus extern "C" { #endif /* One step hmac computation * * digest may be same as text or key */ void _sasl_hmac_md5(const unsigned char *text, int text_len, const unsigned char *key, int key_len, unsigned char digest[HMAC_MD5_SIZE]); /* create context from key */ void _sasl_hmac_md5_init(HMAC_MD5_CTX *hmac, const unsigned char *key, int key_len); /* precalculate intermediate state from key */ void _sasl_hmac_md5_precalc(HMAC_MD5_STATE *hmac, const unsigned char *key, int key_len); /* initialize context from intermediate state */ void _sasl_hmac_md5_import(HMAC_MD5_CTX *hmac, HMAC_MD5_STATE *state); #define _sasl_hmac_md5_update(hmac, text, text_len) _sasl_MD5Update(&(hmac)->ictx, (text), (text_len)) /* finish hmac from intermediate result. Intermediate result is zeroed. */ void _sasl_hmac_md5_final(unsigned char digest[HMAC_MD5_SIZE], HMAC_MD5_CTX *hmac); #ifdef __cplusplus } #endif #endif /* HMAC_MD5_H */ include/sasl/md5global.h000064400000002002152342602460011146 0ustar00/* GLOBAL.H - RSAREF types and constants */ #ifndef MD5GLOBAL_H #define MD5GLOBAL_H /* PROTOTYPES should be set to one if and only if the compiler supports function argument prototyping. The following makes PROTOTYPES default to 0 if it has not already been defined with C compiler flags. */ #ifndef PROTOTYPES #define PROTOTYPES 0 #endif /* POINTER defines a generic pointer type */ typedef unsigned char *POINTER; typedef signed char INT1; /* 8 bits */ typedef short INT2; /* 16 bits */ typedef int INT4; /* 32 bits */ typedef long INT8; /* 64 bits */ typedef unsigned char UINT1; /* 8 bits */ typedef unsigned short UINT2; /* 16 bits */ typedef unsigned int UINT4; /* 32 bits */ typedef unsigned long UINT8; /* 64 bits */ /* PROTO_LIST is defined depending on how PROTOTYPES is defined above. If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it returns an empty list. */ #if PROTOTYPES #define PROTO_LIST(list) list #else #define PROTO_LIST(list) () #endif #endif /* MD5GLOBAL_H */ include/sasl/md5.h000064400000002571152342602460010000 0ustar00/* MD5.H - header file for MD5C.C */ /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All rights reserved. License to copy and use this software is granted provided that it is identified as the "RSA Data Security, Inc. MD5 Message-Digest Algorithm" in all material mentioning or referencing this software or this function. License is also granted to make and use derivative works provided that such works are identified as "derived from the RSA Data Security, Inc. MD5 Message-Digest Algorithm" in all material mentioning or referencing the derived work. RSA Data Security, Inc. makes no representations concerning either the merchantability of this software or the suitability of this software for any particular purpose. It is provided "as is" without express or implied warranty of any kind. These notices must be retained in any copies of any part of this documentation and/or software. */ /* MD5 context. */ typedef struct { UINT4 state[4]; /* state (ABCD) */ UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */ unsigned char buffer[64]; /* input buffer */ } MD5_CTX; #ifdef __cplusplus extern "C" { #endif void _sasl_MD5Init (MD5_CTX *); void _sasl_MD5Update (MD5_CTX *, const unsigned char *, unsigned int); void _sasl_MD5Final (unsigned char [16], MD5_CTX *); #ifdef __cplusplus } #endif include/sasl/saslutil.h000064400000005411152342602460011147 0ustar00/* saslutil.h -- various utility functions in SASL library */ #ifndef SASLUTIL_H #define SASLUTIL_H 1 #ifndef SASL_H #include "sasl.h" #endif #ifdef __cplusplus extern "C" { #endif /* base64 decode * in -- input data * inlen -- length of input data * out -- output data (may be same as in, must have enough space) * outmax -- max size of output buffer * result: * outlen -- actual output length * * returns SASL_BADPROT on bad base64, * SASL_BUFOVER if result won't fit * SASL_OK on success */ LIBSASL_API int sasl_decode64(const char *in, unsigned inlen, char *out, unsigned outmax, unsigned *outlen); /* base64 encode * in -- input data * inlen -- input data length * out -- output buffer (will be NUL terminated) * outmax -- max size of output buffer * result: * outlen -- gets actual length of output buffer (optional) * * Returns SASL_OK on success, SASL_BUFOVER if result won't fit */ LIBSASL_API int sasl_encode64(const char *in, unsigned inlen, char *out, unsigned outmax, unsigned *outlen); /* make a challenge string (NUL terminated) * buf -- buffer for result * maxlen -- max length of result * hostflag -- 0 = don't include hostname, 1 = include hostname * returns final length or 0 if not enough space */ LIBSASL_API int sasl_mkchal(sasl_conn_t *conn, char *buf, unsigned maxlen, unsigned hostflag); /* verify a string is valid UTF-8 * if len == 0, strlen(str) will be used. * returns SASL_BADPROT on error, SASL_OK on success */ LIBSASL_API int sasl_utf8verify(const char *str, unsigned len); /* create random pool seeded with OS-based params */ LIBSASL_API int sasl_randcreate(sasl_rand_t **rpool); /* free random pool from randcreate */ LIBSASL_API void sasl_randfree(sasl_rand_t **rpool); /* seed random number generator */ LIBSASL_API void sasl_randseed(sasl_rand_t *rpool, const char *seed, unsigned len); /* generate random octets */ LIBSASL_API void sasl_rand(sasl_rand_t *rpool, char *buf, unsigned len); /* churn data into random number generator */ LIBSASL_API void sasl_churn(sasl_rand_t *rpool, const char *data, unsigned len); /* erase a security sensitive buffer or password. * Implementation may use recovery-resistant erase logic. */ LIBSASL_API void sasl_erasebuffer(char *pass, unsigned len); /* Lowercase string in place */ LIBSASL_API char *sasl_strlower (char *val); LIBSASL_API int sasl_config_init(const char *filename); LIBSASL_API void sasl_config_done(void); #ifdef WIN32 /* Just in case a different DLL defines this as well */ #if defined(NEED_GETOPT) LIBSASL_API int getopt(int argc, char **argv, char *optstring); #endif LIBSASL_API char * getpass(const char *prompt); #endif /* WIN32 */ #ifdef __cplusplus } #endif #endif /* SASLUTIL_H */ include/sasl/prop.h000064400000016053152342602460010273 0ustar00/* prop.h -- property request/response management routines * * Author: Chris Newman * Removal of implementation-specific details by: Rob Siemborski * * This is intended to be used to create a list of properties to request, * and _then_ request values for all properties. Any change to the request * list will discard any existing values. This assumption allows a very * efficient and simple memory model. This was designed for SASL API auxiliary * property support, but would be fine for other contexts where this property * model is appropriate. * * The "struct propctx" is allocated by prop_new and is a fixed size structure. * If a prop_init() call were added, it would be reasonable to embed a "struct * propctx" in another structure. prop_new also allocates a pool of memory * (in the vbase field) which will be used for an array of "struct propval" * to list all the requested properties. * * Properties may be multi-valued. */ #ifndef PROP_H #define PROP_H 1 /* The following ifdef block is the standard way of creating macros * which make exporting from a DLL simpler. All files within this DLL * are compiled with the LIBSASL_EXPORTS symbol defined on the command * line. this symbol should not be defined on any project that uses * this DLL. This way any other project whose source files include * this file see LIBSASL_API functions as being imported from a DLL, * wheras this DLL sees symbols defined with this macro as being * exported. */ /* Under Unix, life is simpler: we just need to mark library functions * as extern. (Technically, we don't even have to do that.) */ #ifdef WIN32 # ifdef LIBSASL_EXPORTS # define LIBSASL_API extern __declspec(dllexport) # else /* LIBSASL_EXPORTS */ # define LIBSASL_API extern __declspec(dllimport) # endif /* LIBSASL_EXPORTS */ #else /* WIN32 */ # define LIBSASL_API extern #endif /* WIN32 */ /* Same as above, but used during a variable declaration. */ #ifdef WIN32 # ifdef LIBSASL_EXPORTS # define LIBSASL_VAR extern __declspec(dllexport) # else /* LIBSASL_EXPORTS */ # define LIBSASL_VAR extern __declspec(dllimport) # endif /* LIBSASL_EXPORTS */ #else /* WIN32 */ # define LIBSASL_VAR extern #endif /* WIN32 */ /* the resulting structure for property values */ struct propval { const char *name; /* name of property; NULL = end of list */ /* same pointer used in request will be used here */ const char **values; /* list of strings, values == NULL if property not * found, *values == NULL if property found with * no values */ unsigned nvalues; /* total number of value strings */ unsigned valsize; /* total size in characters of all value strings */ }; /* * private internal structure */ #define PROP_DEFAULT 4 /* default number of propvals to assume */ struct propctx; #ifdef __cplusplus extern "C" { #endif /* create a property context * estimate -- an estimate of the storage needed for requests & responses * 0 will use module default * returns a new property context on success and NULL on any error */ LIBSASL_API struct propctx *prop_new(unsigned estimate); /* create new propctx which duplicates the contents of an existing propctx * returns SASL_OK on success * possible other return values include: SASL_NOMEM, SASL_BADPARAM */ LIBSASL_API int prop_dup(struct propctx *src_ctx, struct propctx **dst_ctx); /* Add property names to request * ctx -- context from prop_new() * names -- list of property names; must persist until context freed * or requests cleared (This extends to other contexts that * are dup'ed from this one, and their children, etc) * * NOTE: may clear values from context as side-effect * returns SASL_OK on success * possible other return values include: SASL_NOMEM, SASL_BADPARAM */ LIBSASL_API int prop_request(struct propctx *ctx, const char **names); /* return array of struct propval from the context * return value persists until next call to * prop_request, prop_clear or prop_dispose on context * * returns NULL on error */ LIBSASL_API const struct propval *prop_get(struct propctx *ctx); /* Fill in an array of struct propval based on a list of property names * return value persists until next call to * prop_request, prop_clear or prop_dispose on context * returns number of matching properties which were found (values != NULL) * if a name requested here was never requested by a prop_request, then * the name field of the associated vals entry will be set to NULL * * The vals array MUST be atleast as long as the names array. * * returns # of matching properties on success * possible other return values include: SASL_BADPARAM */ LIBSASL_API int prop_getnames(struct propctx *ctx, const char **names, struct propval *vals); /* clear values and optionally requests from property context * ctx -- property context * requests -- 0 = don't clear requests, 1 = clear requests */ LIBSASL_API void prop_clear(struct propctx *ctx, int requests); /* erase the value of a property */ LIBSASL_API void prop_erase(struct propctx *ctx, const char *name); /* dispose of property context * ctx -- is disposed and set to NULL; noop if ctx or *ctx is NULL */ LIBSASL_API void prop_dispose(struct propctx **ctx); /****fetcher interfaces****/ /* format the requested property names into a string * ctx -- context from prop_new()/prop_request() * sep -- separator between property names (unused if none requested) * seplen -- length of separator, if < 0 then strlen(sep) will be used * outbuf -- output buffer * outmax -- maximum length of output buffer including NUL terminator * outlen -- set to length of output string excluding NUL terminator * returns SASL_OK on success * returns SASL_BADPARAM or amount of additional space needed on failure */ LIBSASL_API int prop_format(struct propctx *ctx, const char *sep, int seplen, char *outbuf, unsigned outmax, unsigned *outlen); /* add a property value to the context * ctx -- context from prop_new()/prop_request() * name -- name of property to which value will be added * if NULL, add to the same name as previous prop_set/setvals call * value -- a value for the property; will be copied into context * if NULL, remove existing values * vallen -- length of value, if <= 0 then strlen(value) will be used * returns SASL_OK on success * possible error return values include: SASL_BADPARAM, SASL_NOMEM */ LIBSASL_API int prop_set(struct propctx *ctx, const char *name, const char *value, int vallen); /* set the values for a property * ctx -- context from prop_new()/prop_request() * name -- name of property to which value will be added * if NULL, add to the same name as previous prop_set/setvals call * values -- array of values, ending in NULL. Each value is a NUL terminated * string * returns SASL_OK on success * possible error return values include: SASL_BADPARAM, SASL_NOMEM */ LIBSASL_API int prop_setvals(struct propctx *ctx, const char *name, const char **values); #ifdef __cplusplus } #endif #endif /* PROP_H */ include/sasl/sasl.h000064400000146242152342602460010261 0ustar00/* This is a proposed C API for support of SASL * *********************************IMPORTANT******************************* * send email to chris.newman@innosoft.com and cyrus-bugs@andrew.cmu.edu * * if you need to add new error codes, callback types, property values, * * etc. It is important to keep the multiple implementations of this * * API from diverging. * *********************************IMPORTANT******************************* * * Basic Type Summary: * sasl_conn_t Context for a SASL connection negotiation * sasl_ssf_t Security layer Strength Factor * sasl_callback_t A typed client/server callback function and context * sasl_interact_t A client interaction descriptor * sasl_secret_t A client password * sasl_rand_t Random data context structure * sasl_security_properties_t An application's required security level * * Callbacks: * sasl_getopt_t client/server: Get an option value * sasl_logmsg_t client/server: Log message handler * sasl_getsimple_t client: Get user/language list * sasl_getsecret_t client: Get authentication secret * sasl_chalprompt_t client: Display challenge and prompt for response * * Server only Callbacks: * sasl_authorize_t user authorization policy callback * sasl_getconfpath_t get path to search for config file * sasl_server_userdb_checkpass check password and auxprops in userdb * sasl_server_userdb_setpass set password in userdb * sasl_server_canon_user canonicalize username routine * * Client/Server Function Summary: * sasl_done Release all SASL global state * sasl_dispose Connection done: Dispose of sasl_conn_t * sasl_getprop Get property (e.g., user name, security layer info) * sasl_setprop Set property (e.g., external ssf) * sasl_errdetail Generate string from last error on connection * sasl_errstring Translate sasl error code to a string * sasl_encode Encode data to send using security layer * sasl_decode Decode data received using security layer * * Utility functions: * sasl_encode64 Encode data to send using MIME base64 encoding * sasl_decode64 Decode data received using MIME base64 encoding * sasl_erasebuffer Erase a buffer * * Client Function Summary: * sasl_client_init Load and initialize client plug-ins (call once) * sasl_client_new Initialize client connection context: sasl_conn_t * sasl_client_start Select mechanism for connection * sasl_client_step Perform one authentication step * * Server Function Summary * sasl_server_init Load and initialize server plug-ins (call once) * sasl_server_new Initialize server connection context: sasl_conn_t * sasl_listmech Create list of available mechanisms * sasl_server_start Begin an authentication exchange * sasl_server_step Perform one authentication exchange step * sasl_checkpass Check a plaintext passphrase * sasl_checkapop Check an APOP challenge/response (uses pseudo "APOP" * mechanism similar to CRAM-MD5 mechanism; optional) * sasl_user_exists Check if user exists * sasl_setpass Change a password or add a user entry * sasl_auxprop_request Request auxiliary properties * sasl_auxprop_getctx Get auxiliary property context for connection * sasl_auxprop_store Store a set of auxiliary properties * * Basic client model: * 1. client calls sasl_client_init() at startup to load plug-ins * 2. when connection formed, call sasl_client_new() * 3. once list of supported mechanisms received from server, client * calls sasl_client_start(). goto 4a * 4. client calls sasl_client_step() * [4a. If SASL_INTERACT, fill in prompts and goto 4 * -- doesn't happen if callbacks provided] * 4b. If SASL error, goto 7 or 3 * 4c. If SASL_OK, continue or goto 6 if last server response was success * 5. send message to server, wait for response * 5a. On data or success with server response, goto 4 * 5b. On failure goto 7 or 3 * 5c. On success with no server response continue * 6. continue with application protocol until connection closes * call sasl_getprop/sasl_encode/sasl_decode() if using security layer * 7. call sasl_dispose(), may return to step 2 * 8. call sasl_done() when program terminates * * Basic Server model: * 1. call sasl_server_init() at startup to load plug-ins * 2. On connection, call sasl_server_new() * 3. call sasl_listmech() and send list to client] * 4. after client AUTH command, call sasl_server_start(), goto 5a * 5. call sasl_server_step() * 5a. If SASL_CONTINUE, output to client, wait response, repeat 5 * 5b. If SASL error, then goto 7 * 5c. If SASL_OK, move on * 6. continue with application protocol until connection closes * call sasl_getprop to get username * call sasl_getprop/sasl_encode/sasl_decode() if using security layer * 7. call sasl_dispose(), may return to step 2 * 8. call sasl_done() when program terminates * ************************************************* * IMPORTANT NOTE: server realms / username syntax * * If a user name contains a "@", then the rightmost "@" in the user name * separates the account name from the realm in which this account is * located. A single server may support multiple realms. If the * server knows the realm at connection creation time (e.g., a server * with multiple IP addresses tightly binds one address to a specific * realm) then that realm must be passed in the user_realm field of * the sasl_server_new call. If user_realm is non-empty and an * unqualified user name is supplied, then the canon_user facility is * expected to append "@" and user_realm to the user name. The canon_user * facility may treat other characters such as "%" as equivalent to "@". * * If the server forbids the use of "@" in user names for other * purposes, this simplifies security validation. */ #ifndef SASL_H #define SASL_H 1 #include /* For size_t */ /* Keep in sync with win32/common.mak */ #define SASL_VERSION_MAJOR 2 #define SASL_VERSION_MINOR 1 #define SASL_VERSION_STEP 28 /* A convenience macro: same as was defined in the OpenLDAP LDAPDB */ #define SASL_VERSION_FULL ((SASL_VERSION_MAJOR << 16) |\ (SASL_VERSION_MINOR << 8) | SASL_VERSION_STEP) #include "prop.h" /************* * Basic API * *************/ /* SASL result codes: */ #define SASL_CONTINUE 1 /* another step is needed in authentication */ #define SASL_OK 0 /* successful result */ #define SASL_FAIL -1 /* generic failure */ #define SASL_NOMEM -2 /* memory shortage failure */ #define SASL_BUFOVER -3 /* overflowed buffer */ #define SASL_NOMECH -4 /* mechanism not supported */ #define SASL_BADPROT -5 /* bad protocol / cancel */ #define SASL_NOTDONE -6 /* can't request info until later in exchange */ #define SASL_BADPARAM -7 /* invalid parameter supplied */ #define SASL_TRYAGAIN -8 /* transient failure (e.g., weak key) */ #define SASL_BADMAC -9 /* integrity check failed */ #define SASL_NOTINIT -12 /* SASL library not initialized */ /* -- client only codes -- */ #define SASL_INTERACT 2 /* needs user interaction */ #define SASL_BADSERV -10 /* server failed mutual authentication step */ #define SASL_WRONGMECH -11 /* mechanism doesn't support requested feature */ /* -- server only codes -- */ #define SASL_BADAUTH -13 /* authentication failure */ #define SASL_NOAUTHZ -14 /* authorization failure */ #define SASL_TOOWEAK -15 /* mechanism too weak for this user */ #define SASL_ENCRYPT -16 /* encryption needed to use mechanism */ #define SASL_TRANS -17 /* One time use of a plaintext password will enable requested mechanism for user */ #define SASL_EXPIRED -18 /* passphrase expired, has to be reset */ #define SASL_DISABLED -19 /* account disabled */ #define SASL_NOUSER -20 /* user not found */ #define SASL_BADVERS -23 /* version mismatch with plug-in */ #define SASL_UNAVAIL -24 /* remote authentication server unavailable */ #define SASL_NOVERIFY -26 /* user exists, but no verifier for user */ /* -- codes for password setting -- */ #define SASL_PWLOCK -21 /* passphrase locked */ #define SASL_NOCHANGE -22 /* requested change was not needed */ #define SASL_WEAKPASS -27 /* passphrase is too weak for security policy */ #define SASL_NOUSERPASS -28 /* user supplied passwords not permitted */ #define SASL_NEED_OLD_PASSWD -29 /* sasl_setpass needs old password in order to perform password change */ #define SASL_CONSTRAINT_VIOLAT -30 /* a property can't be stored, because of some constrains/policy violation */ #define SASL_BADBINDING -32 /* channel binding failure */ #define SASL_CONFIGERR -100 /* error when parsing configuration file */ /* max size of a sasl mechanism name */ #define SASL_MECHNAMEMAX 20 #ifdef _WIN32 /* Define to have the same layout as a WSABUF */ #ifndef STRUCT_IOVEC_DEFINED #define STRUCT_IOVEC_DEFINED 1 struct iovec { long iov_len; char *iov_base; }; #endif #else struct iovec; /* Defined in OS headers */ #endif /* per-connection SASL negotiation state for client or server */ typedef struct sasl_conn sasl_conn_t; /* Plain text password structure. * len is the length of the password, data is the text. */ typedef struct sasl_secret { unsigned long len; unsigned char data[1]; /* variable sized */ } sasl_secret_t; /* random data context structure */ typedef struct sasl_rand_s sasl_rand_t; #ifdef __cplusplus extern "C" { #endif /**************************** * Configure Basic Services * ****************************/ /* the following functions are used to adjust how allocation and mutexes work * they must be called before all other SASL functions: */ #include /* memory allocation functions which may optionally be replaced: */ typedef void *sasl_malloc_t(size_t); typedef void *sasl_calloc_t(size_t, size_t); typedef void *sasl_realloc_t(void *, size_t); typedef void sasl_free_t(void *); LIBSASL_API void sasl_set_alloc(sasl_malloc_t *, sasl_calloc_t *, sasl_realloc_t *, sasl_free_t *); /* mutex functions which may optionally be replaced: * sasl_mutex_alloc allocates a mutex structure * sasl_mutex_lock blocks until mutex locked * returns -1 on deadlock or parameter error * returns 0 on success * sasl_mutex_unlock unlocks mutex if it's locked * returns -1 if not locked or parameter error * returns 0 on success * sasl_mutex_free frees a mutex structure */ typedef void *sasl_mutex_alloc_t(void); typedef int sasl_mutex_lock_t(void *mutex); typedef int sasl_mutex_unlock_t(void *mutex); typedef void sasl_mutex_free_t(void *mutex); LIBSASL_API void sasl_set_mutex(sasl_mutex_alloc_t *, sasl_mutex_lock_t *, sasl_mutex_unlock_t *, sasl_mutex_free_t *); /***************************** * Security preference types * *****************************/ /* security layer strength factor -- an unsigned integer usable by the caller * to specify approximate security layer strength desired. Roughly * correlated to effective key length for encryption. * 0 = no protection * 1 = integrity protection only * 40 = 40-bit DES or 40-bit RC2/RC4 * 56 = DES * 112 = triple-DES * 128 = 128-bit RC2/RC4/BLOWFISH * 256 = baseline AES */ typedef unsigned sasl_ssf_t; /* usage flags provided to sasl_server_new and sasl_client_new: */ #define SASL_SUCCESS_DATA 0x0004 /* server supports data on success */ #define SASL_NEED_PROXY 0x0008 /* require a mech that allows proxying */ #define SASL_NEED_HTTP 0x0010 /* require a mech that can do HTTP auth */ /*************************** * Security Property Types * ***************************/ /* Structure specifying the client or server's security policy * and optional additional properties. */ /* These are the various security flags apps can specify. */ /* NOPLAINTEXT -- don't permit mechanisms susceptible to simple * passive attack (e.g., PLAIN, LOGIN) * NOACTIVE -- protection from active (non-dictionary) attacks * during authentication exchange. * Authenticates server. * NODICTIONARY -- don't permit mechanisms susceptible to passive * dictionary attack * FORWARD_SECRECY -- require forward secrecy between sessions * (breaking one won't help break next) * NOANONYMOUS -- don't permit mechanisms that allow anonymous login * PASS_CREDENTIALS -- require mechanisms which pass client * credentials, and allow mechanisms which can pass * credentials to do so * MUTUAL_AUTH -- require mechanisms which provide mutual * authentication */ #define SASL_SEC_NOPLAINTEXT 0x0001 #define SASL_SEC_NOACTIVE 0x0002 #define SASL_SEC_NODICTIONARY 0x0004 #define SASL_SEC_FORWARD_SECRECY 0x0008 #define SASL_SEC_NOANONYMOUS 0x0010 #define SASL_SEC_PASS_CREDENTIALS 0x0020 #define SASL_SEC_MUTUAL_AUTH 0x0040 #define SASL_SEC_MAXIMUM 0xFFFF /* This is used when adding hash size to the security_flags field */ /* NB: hash size is in bits */ #define SASL_SET_HASH_STRENGTH_BITS(x) (((x) / 8) << 16) /* NB: This value is in bytes */ #define SASL_GET_HASH_STRENGTH(x) ((x) >> 16) typedef struct sasl_security_properties { /* security strength factor * min_ssf = minimum acceptable final level * max_ssf = maximum acceptable final level */ sasl_ssf_t min_ssf; sasl_ssf_t max_ssf; /* Maximum security layer receive buffer size. * 0=security layer not supported */ unsigned maxbufsize; /* bitfield for attacks to protect against */ unsigned security_flags; /* NULL terminated array of additional property names, values */ const char **property_names; const char **property_values; } sasl_security_properties_t; /****************** * Callback types * ******************/ /* * Extensible type for a client/server callbacks * id -- identifies callback type * proc -- procedure call arguments vary based on id * context -- context passed to procedure */ /* Note that any memory that is allocated by the callback needs to be * freed by the application, be it via function call or interaction. * * It may be freed after sasl_*_step returns SASL_OK. if the mechanism * requires this information to persist (for a security layer, for example) * it must maintain a private copy. */ typedef struct sasl_callback { /* Identifies the type of the callback function. * Mechanisms must ignore callbacks with id's they don't recognize. */ unsigned long id; int (*proc)(void); /* Callback function. Types of arguments vary by 'id' */ void *context; } sasl_callback_t; /* callback ids & functions: */ #define SASL_CB_LIST_END 0 /* end of list */ /* option reading callback -- this allows a SASL configuration to be * encapsulated in the caller's configuration system. Some implementations * may use default config file(s) if this is omitted. Configuration items * may be plugin-specific and are arbitrary strings. * * inputs: * context -- option context from callback record * plugin_name -- name of plugin (NULL = general SASL option) * option -- name of option * output: * result -- set to result which persists until next getopt in * same thread, unchanged if option not found * len -- length of result (may be NULL) * returns: * SASL_OK -- no error * SASL_FAIL -- error */ typedef int sasl_getopt_t(void *context, const char *plugin_name, const char *option, const char **result, unsigned *len); #define SASL_CB_GETOPT 1 /* Logging levels for use with the logging callback function. */ #define SASL_LOG_NONE 0 /* don't log anything */ #define SASL_LOG_ERR 1 /* log unusual errors (default) */ #define SASL_LOG_FAIL 2 /* log all authentication failures */ #define SASL_LOG_WARN 3 /* log non-fatal warnings */ #define SASL_LOG_NOTE 4 /* more verbose than LOG_WARN */ #define SASL_LOG_DEBUG 5 /* more verbose than LOG_NOTE */ #define SASL_LOG_TRACE 6 /* traces of internal protocols */ #define SASL_LOG_PASS 7 /* traces of internal protocols, including * passwords */ /* logging callback -- this allows plugins and the middleware to * log operations they perform. * inputs: * context -- logging context from the callback record * level -- logging level; see above * message -- message to log * returns: * SASL_OK -- no error * SASL_FAIL -- error */ typedef int sasl_log_t(void *context, int level, const char *message); #define SASL_CB_LOG 2 /* getpath callback -- this allows applications to specify the * colon-separated path to search for plugins (by default, * taken from an implementation-specific location). * inputs: * context -- getpath context from the callback record * outputs: * path -- colon seperated path * returns: * SASL_OK -- no error * SASL_FAIL -- error */ typedef int sasl_getpath_t(void *context, const char **path); #define SASL_CB_GETPATH 3 /* verify file callback -- this allows applications to check if they * want SASL to use files, file by file. This is intended to allow * applications to sanity check the environment to make sure plugins * or the configuration file can't be written to, etc. * inputs: * context -- verifypath context from the callback record * file -- full path to file to verify * type -- type of file to verify (see below) * returns: * SASL_OK -- no error (file can safely be used) * SASL_CONTINUE -- continue WITHOUT using this file * SASL_FAIL -- error */ /* these are the types of files libsasl will ask about */ typedef enum { SASL_VRFY_PLUGIN=0, /* a DLL/shared library plug-in */ SASL_VRFY_CONF=1, /* a configuration file */ SASL_VRFY_PASSWD=2, /* a password storage file/db */ SASL_VRFY_OTHER=3 /* some other file */ } sasl_verify_type_t; typedef int sasl_verifyfile_t(void *context, const char *file, sasl_verify_type_t type); #define SASL_CB_VERIFYFILE 4 /* getconfpath callback -- this allows applications to specify the * colon-separated path to search for config files (by default, * taken from the SASL_CONF_PATH environment variable). * inputs: * context -- getconfpath context from the callback record * outputs: * path -- colon seperated path (allocated on the heap; the * library will free it using the sasl_free_t * * passed to sasl_set_callback, or the standard free() * library call). * returns: * SASL_OK -- no error * SASL_FAIL -- error */ typedef int sasl_getconfpath_t(void *context, char **path); #define SASL_CB_GETCONFPATH 5 /* client/user interaction callbacks: */ /* Simple prompt -- result must persist until next call to getsimple on * same connection or until connection context is disposed * inputs: * context -- context from callback structure * id -- callback id * outputs: * result -- set to NUL terminated string * NULL = user cancel * len -- length of result * returns SASL_OK */ typedef int sasl_getsimple_t(void *context, int id, const char **result, unsigned *len); #define SASL_CB_USER 0x4001 /* client user identity to login as */ #define SASL_CB_AUTHNAME 0x4002 /* client authentication name */ #define SASL_CB_LANGUAGE 0x4003 /* comma separated list of RFC 1766 * language codes in order of preference * to be used to localize client prompts * or server error codes */ #define SASL_CB_CNONCE 0x4007 /* caller supplies client-nonce * primarily for testing purposes */ /* get a sasl_secret_t (plaintext password with length) * inputs: * conn -- connection context * context -- context from callback structure * id -- callback id * outputs: * psecret -- set to NULL to cancel * set to password structure which must persist until * next call to getsecret in same connection, but middleware * will erase password data when it's done with it. * returns SASL_OK */ typedef int sasl_getsecret_t(sasl_conn_t *conn, void *context, int id, sasl_secret_t **psecret); #define SASL_CB_PASS 0x4004 /* client passphrase-based secret */ /* prompt for input in response to a challenge. * input: * context -- context from callback structure * id -- callback id * challenge -- server challenge * output: * result -- NUL terminated result, NULL = user cancel * len -- length of result * returns SASL_OK */ typedef int sasl_chalprompt_t(void *context, int id, const char *challenge, const char *prompt, const char *defresult, const char **result, unsigned *len); #define SASL_CB_ECHOPROMPT 0x4005 /* challenge and client enterred result */ #define SASL_CB_NOECHOPROMPT 0x4006 /* challenge and client enterred result */ /* prompt (or autoselect) the realm to do authentication in. * may get a list of valid realms. * input: * context -- context from callback structure * id -- callback id * availrealms -- available realms; string list; NULL terminated * list may be empty. * output: * result -- NUL terminated realm; NULL is equivalent to "" * returns SASL_OK * result must persist until the next callback */ typedef int sasl_getrealm_t(void *context, int id, const char **availrealms, const char **result); #define SASL_CB_GETREALM (0x4008) /* realm to attempt authentication in */ /* server callbacks: */ /* improved callback to verify authorization; * canonicalization now handled elsewhere * conn -- connection context * requested_user -- the identity/username to authorize (NUL terminated) * rlen -- length of requested_user * auth_identity -- the identity associated with the secret (NUL terminated) * alen -- length of auth_identity * default_realm -- default user realm, as passed to sasl_server_new if * urlen -- length of default realm * propctx -- auxiliary properties * returns SASL_OK on success, * SASL_NOAUTHZ or other SASL response on failure */ typedef int sasl_authorize_t(sasl_conn_t *conn, void *context, const char *requested_user, unsigned rlen, const char *auth_identity, unsigned alen, const char *def_realm, unsigned urlen, struct propctx *propctx); #define SASL_CB_PROXY_POLICY 0x8001 /* functions for "userdb" based plugins to call to get/set passwords. * the location for the passwords is determined by the caller or middleware. * plug-ins may get passwords from other locations. */ /* callback to verify a plaintext password against the caller-supplied * user database. This is necessary to allow additional s for * encoding of the userPassword property. * user -- NUL terminated user name with user@realm syntax * pass -- password to check (may not be NUL terminated) * passlen -- length of password to check * propctx -- auxiliary properties for user */ typedef int sasl_server_userdb_checkpass_t(sasl_conn_t *conn, void *context, const char *user, const char *pass, unsigned passlen, struct propctx *propctx); #define SASL_CB_SERVER_USERDB_CHECKPASS (0x8005) /* callback to store/change a plaintext password in the user database * user -- NUL terminated user name with user@realm syntax * pass -- password to store (may not be NUL terminated) * passlen -- length of password to store * propctx -- auxiliary properties (not stored) * flags -- see SASL_SET_* flags below (SASL_SET_CREATE optional) */ typedef int sasl_server_userdb_setpass_t(sasl_conn_t *conn, void *context, const char *user, const char *pass, unsigned passlen, struct propctx *propctx, unsigned flags); #define SASL_CB_SERVER_USERDB_SETPASS (0x8006) /* callback for a server-supplied user canonicalization function. * * This function is called directly after the mechanism has the * authentication and authorization IDs. It is called before any * User Canonicalization plugin is called. It has the responsibility * of copying its output into the provided output buffers. * * in, inlen -- user name to canonicalize, may not be NUL terminated * may be same buffer as out * flags -- not currently used, supplied by auth mechanism * user_realm -- the user realm (may be NULL in case of client) * out -- buffer to copy user name * out_max -- max length of user name * out_len -- set to length of user name * * returns * SASL_OK on success * SASL_BADPROT username contains invalid character */ /* User Canonicalization Function Flags */ #define SASL_CU_NONE 0x00 /* Not a valid flag to pass */ /* One of the following two is required */ #define SASL_CU_AUTHID 0x01 #define SASL_CU_AUTHZID 0x02 /* Combine the following with SASL_CU_AUTHID, if you don't want to fail if auxprop returned SASL_NOUSER/SASL_NOMECH. */ #define SASL_CU_EXTERNALLY_VERIFIED 0x04 #define SASL_CU_OVERRIDE 0x08 /* mapped to SASL_AUXPROP_OVERRIDE */ /* The following CU flags are passed "as is" down to auxprop lookup */ #define SASL_CU_ASIS_MASK 0xFFF0 /* NOTE: Keep in sync with SASL_AUXPROP_ flags */ #define SASL_CU_VERIFY_AGAINST_HASH 0x10 typedef int sasl_canon_user_t(sasl_conn_t *conn, void *context, const char *in, unsigned inlen, unsigned flags, const char *user_realm, char *out, unsigned out_max, unsigned *out_len); #define SASL_CB_CANON_USER (0x8007) /********************************** * Common Client/server functions * **********************************/ /* Types of paths to set (see sasl_set_path below). */ #define SASL_PATH_TYPE_PLUGIN 0 #define SASL_PATH_TYPE_CONFIG 1 /* a simpler way to set plugin path or configuration file path * without the need to set sasl_getpath_t callback. * * This function can be called before sasl_server_init/sasl_client_init. */ LIBSASL_API int sasl_set_path (int path_type, char * path); /* get sasl library version information * implementation is a vendor-defined string * version is a vender-defined representation of the version #. * * This function is being deprecated in favor of sasl_version_info. */ LIBSASL_API void sasl_version(const char **implementation, int *version); /* Extended version of sasl_version(). * * This function is to be used * for library version display and logging * for bug workarounds in old library versions * * The sasl_version_info is not to be used for API feature detection. * * All parameters are optional. If NULL is specified, the value is not returned. */ LIBSASL_API void sasl_version_info (const char **implementation, const char **version_string, int *version_major, int *version_minor, int *version_step, int *version_patch); /* dispose of all SASL plugins. Connection * states have to be disposed of before calling this. * * This function is DEPRECATED in favour of sasl_server_done/ * sasl_client_done. */ LIBSASL_API void sasl_done(void); /* dispose of all SASL plugins. Connection * states have to be disposed of before calling this. * This function should be called instead of sasl_done(), whenever possible. */ LIBSASL_API int sasl_server_done(void); /* dispose of all SASL plugins. Connection * states have to be disposed of before calling this. * This function should be called instead of sasl_done(), whenever possible. */ LIBSASL_API int sasl_client_done(void); /* dispose connection state, sets it to NULL * checks for pointer to NULL */ LIBSASL_API void sasl_dispose(sasl_conn_t **pconn); /* translate an error number into a string * input: * saslerr -- the error number * langlist -- comma separated list of RFC 1766 languages (may be NULL) * results: * outlang -- the language actually used (may be NULL if don't care) * returns: * the error message in UTF-8 (only the US-ASCII subset if langlist is NULL) */ LIBSASL_API const char *sasl_errstring(int saslerr, const char *langlist, const char **outlang); /* get detail about the last error that occurred on a connection * text is sanitized so it's suitable to send over the wire * (e.g., no distinction between SASL_BADAUTH and SASL_NOUSER) * input: * conn -- mandatory connection context * returns: * the error message in UTF-8 (only the US-ASCII subset permitted if no * SASL_CB_LANGUAGE callback is present) */ LIBSASL_API const char *sasl_errdetail(sasl_conn_t *conn); /* set the error string which will be returned by sasl_errdetail() using * syslog()-style formatting (e.g. printf-style with %m as most recent * errno error) * * primarily for use by server callbacks such as the sasl_authorize_t * callback and internally to plug-ins * * This will also trigger a call to the SASL logging callback (if any) * with a level of SASL_LOG_FAIL unless the SASL_NOLOG flag is set. * * Messages should be sensitive to the current language setting. If there * is no SASL_CB_LANGUAGE callback messages MUST be US-ASCII otherwise UTF-8 * is used and use of RFC 2482 for mixed-language text is encouraged. * * if conn is NULL, function does nothing */ LIBSASL_API void sasl_seterror(sasl_conn_t *conn, unsigned flags, const char *fmt, ...); #define SASL_NOLOG 0x01 /* get property from SASL connection state * propnum -- property number * pvalue -- pointer to value * returns: * SASL_OK -- no error * SASL_NOTDONE -- property not available yet * SASL_BADPARAM -- bad property number */ LIBSASL_API int sasl_getprop(sasl_conn_t *conn, int propnum, const void **pvalue); #define SASL_USERNAME 0 /* pointer to NUL terminated user name */ #define SASL_SSF 1 /* security layer security strength factor, * if 0, call to sasl_encode, sasl_decode * unnecessary */ #define SASL_MAXOUTBUF 2 /* security layer max output buf unsigned */ #define SASL_DEFUSERREALM 3 /* default realm passed to server_new */ /* or set with setprop */ #define SASL_GETOPTCTX 4 /* context for getopt callback */ #define SASL_CALLBACK 7 /* current callback function list */ #define SASL_IPLOCALPORT 8 /* iplocalport string passed to server_new */ #define SASL_IPREMOTEPORT 9 /* ipremoteport string passed to server_new */ /* This returns a string which is either empty or has an error message * from sasl_seterror (e.g., from a plug-in or callback). It differs * from the result of sasl_errdetail() which also takes into account the * last return status code. */ #define SASL_PLUGERR 10 /* a handle to any delegated credentials or NULL if none is present * is returned by the mechanism. The user will probably need to know * which mechanism was used to actually known how to make use of them * currently only implemented for the gssapi mechanism */ #define SASL_DELEGATEDCREDS 11 #define SASL_SERVICE 12 /* service passed to sasl_*_new */ #define SASL_SERVERFQDN 13 /* serverFQDN passed to sasl_*_new */ #define SASL_AUTHSOURCE 14 /* name of auth source last used, useful * for failed authentication tracking */ #define SASL_MECHNAME 15 /* active mechanism name, if any */ #define SASL_AUTHUSER 16 /* authentication/admin user */ #define SASL_APPNAME 17 /* application name (used for logging/ configuration), same as appname parameter to sasl_server_init */ /* GSS-API credential handle for sasl_client_step() or sasl_server_step(). * The application is responsible for releasing this credential handle. */ #define SASL_GSS_CREDS 18 /* GSS name (gss_name_t) of the peer, as output by gss_inquire_context() * or gss_accept_sec_context(). * On server end this is similar to SASL_USERNAME, but the gss_name_t * structure can contain additional attributes associated with the peer. */ #define SASL_GSS_PEER_NAME 19 /* Local GSS name (gss_name_t) as output by gss_inquire_context(). This * is particularly useful for servers that respond to multiple names. */ #define SASL_GSS_LOCAL_NAME 20 /* Channel binding information. Memory is managed by the caller. */ typedef struct sasl_channel_binding { const char *name; int critical; unsigned long len; const unsigned char *data; } sasl_channel_binding_t; #define SASL_CHANNEL_BINDING 21 /* HTTP Request (RFC 2616) - ONLY used for HTTP Digest Auth (RFC 2617) */ typedef struct sasl_http_request { const char *method; /* HTTP Method */ const char *uri; /* request-URI */ const unsigned char *entity; /* entity-body */ unsigned long elen; /* entity-body length */ unsigned non_persist; /* Is it a non-persistent connection? */ } sasl_http_request_t; #define SASL_HTTP_REQUEST 22 /* set property in SASL connection state * returns: * SASL_OK -- value set * SASL_BADPARAM -- invalid property or value */ LIBSASL_API int sasl_setprop(sasl_conn_t *conn, int propnum, const void *value); #define SASL_SSF_EXTERNAL 100 /* external SSF active (sasl_ssf_t *) */ #define SASL_SEC_PROPS 101 /* sasl_security_properties_t */ #define SASL_AUTH_EXTERNAL 102 /* external authentication ID (const char *) */ /* If the SASL_AUTH_EXTERNAL value is non-NULL, then a special version of the * EXTERNAL mechanism is enabled (one for server-embedded EXTERNAL mechanisms). * Otherwise, the EXTERNAL mechanism will be absent unless a plug-in * including EXTERNAL is present. */ /* do precalculations during an idle period or network round trip * may pass NULL to precompute for some mechanisms prior to connect * returns 1 if action taken, 0 if no action taken */ LIBSASL_API int sasl_idle(sasl_conn_t *conn); /************** * Client API * **************/ /* list of client interactions with user for caller to fill in */ typedef struct sasl_interact { unsigned long id; /* same as client/user callback ID */ const char *challenge; /* presented to user (e.g. OTP challenge) */ const char *prompt; /* presented to user (e.g. "Username: ") */ const char *defresult; /* default result string */ const void *result; /* set to point to result */ unsigned len; /* set to length of result */ } sasl_interact_t; /* initialize the SASL client drivers * callbacks -- base callbacks for all client connections; * must include getopt callback * returns: * SASL_OK -- Success * SASL_NOMEM -- Not enough memory * SASL_BADVERS -- Mechanism version mismatch * SASL_BADPARAM -- missing getopt callback or error in config file * SASL_NOMECH -- No mechanisms available * ... */ LIBSASL_API int sasl_client_init(const sasl_callback_t *callbacks); /* initialize a client exchange based on the specified mechanism * service -- registered name of the service using SASL (e.g. "imap") * serverFQDN -- the fully qualified domain name of the server * iplocalport -- client IPv4/IPv6 domain literal string with port * (if NULL, then mechanisms requiring IPaddr are disabled) * ipremoteport -- server IPv4/IPv6 domain literal string with port * (if NULL, then mechanisms requiring IPaddr are disabled) * prompt_supp -- list of client interactions supported * may also include sasl_getopt_t context & call * NULL prompt_supp = user/pass via SASL_INTERACT only * NULL proc = interaction supported via SASL_INTERACT * flags -- server usage flags (see above) * in/out: * pconn -- connection negotiation structure * pointer to NULL => allocate new * * Returns: * SASL_OK -- success * SASL_NOMECH -- no mechanism meets requested properties * SASL_NOMEM -- not enough memory */ LIBSASL_API int sasl_client_new(const char *service, const char *serverFQDN, const char *iplocalport, const char *ipremoteport, const sasl_callback_t *prompt_supp, unsigned flags, sasl_conn_t **pconn); /* select a mechanism for a connection * mechlist -- mechanisms server has available (punctuation ignored) * if NULL, then discard cached info and retry last mech * output: * prompt_need -- on SASL_INTERACT, list of prompts needed to continue * may be NULL if callbacks provided * clientout -- the initial client response to send to the server * will be valid until next call to client_start/client_step * NULL if mech doesn't include initial client challenge * mech -- set to mechansm name of selected mechanism (may be NULL) * * Returns: * SASL_OK -- success * SASL_NOMEM -- not enough memory * SASL_NOMECH -- no mechanism meets requested properties * SASL_INTERACT -- user interaction needed to fill in prompt_need list */ LIBSASL_API int sasl_client_start(sasl_conn_t *conn, const char *mechlist, sasl_interact_t **prompt_need, const char **clientout, unsigned *clientoutlen, const char **mech); /* do a single authentication step. * serverin -- the server message received by the client, MUST have a NUL * sentinel, not counted by serverinlen * output: * prompt_need -- on SASL_INTERACT, list of prompts needed to continue * clientout -- the client response to send to the server * will be valid until next call to client_start/client_step * * returns: * SASL_OK -- success * SASL_INTERACT -- user interaction needed to fill in prompt_need list * SASL_BADPROT -- server protocol incorrect/cancelled * SASL_BADSERV -- server failed mutual auth */ LIBSASL_API int sasl_client_step(sasl_conn_t *conn, const char *serverin, unsigned serverinlen, sasl_interact_t **prompt_need, const char **clientout, unsigned *clientoutlen); /************** * Server API * **************/ /* initialize server drivers, done once per process * callbacks -- callbacks for all server connections; must include * getopt callback * appname -- name of calling application (for lower level logging) * results: * state -- server state * returns: * SASL_OK -- success * SASL_BADPARAM -- error in config file * SASL_NOMEM -- memory failure * SASL_BADVERS -- Mechanism version mismatch */ LIBSASL_API int sasl_server_init(const sasl_callback_t *callbacks, const char *appname); /* IP/port syntax: * a.b.c.d;p where a-d are 0-255 and p is 0-65535 port number. * e:f:g:h:i:j:k:l;p where e-l are 0000-ffff lower-case hexidecimal * e:f:g:h:i:j:a.b.c.d;p alternate syntax for previous * * Note that one or more "0" fields in f-k can be replaced with "::" * Thus: e:f:0000:0000:0000:j:k:l;p * can be abbreviated: e:f::j:k:l;p * * A buffer of size 52 is adequate for the longest format with NUL terminator. */ /* create context for a single SASL connection * service -- registered name of the service using SASL (e.g. "imap") * serverFQDN -- Fully qualified domain name of server. NULL means use * gethostname() or equivalent. * Useful for multi-homed servers. * user_realm -- permits multiple user realms on server, NULL = default * iplocalport -- server IPv4/IPv6 domain literal string with port * (if NULL, then mechanisms requiring IPaddr are disabled) * ipremoteport -- client IPv4/IPv6 domain literal string with port * (if NULL, then mechanisms requiring IPaddr are disabled) * callbacks -- callbacks (e.g., authorization, lang, new getopt context) * flags -- usage flags (see above) * returns: * pconn -- new connection context * * returns: * SASL_OK -- success * SASL_NOMEM -- not enough memory */ LIBSASL_API int sasl_server_new(const char *service, const char *serverFQDN, const char *user_realm, const char *iplocalport, const char *ipremoteport, const sasl_callback_t *callbacks, unsigned flags, sasl_conn_t **pconn); /* Return an array of NUL-terminated strings, terminated by a NULL pointer, * which lists all possible mechanisms that the library can supply * * Returns NULL on failure. */ LIBSASL_API const char ** sasl_global_listmech(void); /* This returns a list of mechanisms in a NUL-terminated string * conn -- the connection to list mechanisms for (either client * or server) * user -- restricts mechanisms to those available to that user * (may be NULL, not used for client case) * prefix -- appended to beginning of result * sep -- appended between mechanisms * suffix -- appended to end of result * results: * result -- NUL terminated result which persists until next * call to sasl_listmech for this sasl_conn_t * plen -- gets length of result (excluding NUL), may be NULL * pcount -- gets number of mechanisms, may be NULL * * returns: * SASL_OK -- success * SASL_NOMEM -- not enough memory * SASL_NOMECH -- no enabled mechanisms */ LIBSASL_API int sasl_listmech(sasl_conn_t *conn, const char *user, const char *prefix, const char *sep, const char *suffix, const char **result, unsigned *plen, int *pcount); /* start a mechanism exchange within a connection context * mech -- the mechanism name client requested * clientin -- client initial response (NUL terminated), NULL if empty * clientinlen -- length of initial response * serverout -- initial server challenge, NULL if done * (library handles freeing this string) * serveroutlen -- length of initial server challenge * output: * pconn -- the connection negotiation state on success * * Same returns as sasl_server_step() or * SASL_NOMECH if mechanism not available. */ LIBSASL_API int sasl_server_start(sasl_conn_t *conn, const char *mech, const char *clientin, unsigned clientinlen, const char **serverout, unsigned *serveroutlen); /* perform one step of the SASL exchange * inputlen & input -- client data * NULL on first step if no optional client step * outputlen & output -- set to the server data to transmit * to the client in the next step * (library handles freeing this) * * returns: * SASL_OK -- exchange is complete. * SASL_CONTINUE -- indicates another step is necessary. * SASL_TRANS -- entry for user exists, but not for mechanism * and transition is possible * SASL_BADPARAM -- service name needed * SASL_BADPROT -- invalid input from client * ... */ LIBSASL_API int sasl_server_step(sasl_conn_t *conn, const char *clientin, unsigned clientinlen, const char **serverout, unsigned *serveroutlen); /* check if an apop exchange is valid * (note this is an optional part of the SASL API) * if challenge is NULL, just check if APOP is enabled * inputs: * challenge -- challenge which was sent to client * challen -- length of challenge, 0 = strlen(challenge) * response -- client response, " " (RFC 1939) * resplen -- length of response, 0 = strlen(response) * returns * SASL_OK -- success * SASL_BADAUTH -- authentication failed * SASL_BADPARAM -- missing challenge * SASL_BADPROT -- protocol error (e.g., response in wrong format) * SASL_NOVERIFY -- user found, but no verifier * SASL_NOMECH -- mechanism not supported * SASL_NOUSER -- user not found */ LIBSASL_API int sasl_checkapop(sasl_conn_t *conn, const char *challenge, unsigned challen, const char *response, unsigned resplen); /* check if a plaintext password is valid * if user is NULL, check if plaintext passwords are enabled * inputs: * user -- user to query in current user_domain * userlen -- length of username, 0 = strlen(user) * pass -- plaintext password to check * passlen -- length of password, 0 = strlen(pass) * returns * SASL_OK -- success * SASL_NOMECH -- mechanism not supported * SASL_NOVERIFY -- user found, but no verifier * SASL_NOUSER -- user not found */ LIBSASL_API int sasl_checkpass(sasl_conn_t *conn, const char *user, unsigned userlen, const char *pass, unsigned passlen); /* check if a user exists on server * conn -- connection context * service -- registered name of the service using SASL (e.g. "imap") * user_realm -- permits multiple user realms on server, NULL = default * user -- NUL terminated user name * * returns: * SASL_OK -- success * SASL_DISABLED -- account disabled * SASL_NOUSER -- user not found * SASL_NOVERIFY -- user found, but no usable mechanism * SASL_NOMECH -- no mechanisms enabled * SASL_UNAVAIL -- remote authentication server unavailable, try again later */ LIBSASL_API int sasl_user_exists(sasl_conn_t *conn, const char *service, const char *user_realm, const char *user); /* set the password for a user * conn -- SASL connection * user -- user name * pass -- plaintext password, may be NULL to remove user * passlen -- length of password, 0 = strlen(pass) * oldpass -- NULL will sometimes work * oldpasslen -- length of password, 0 = strlen(oldpass) * flags -- see flags below * * returns: * SASL_NOCHANGE -- proper entry already exists * SASL_NOMECH -- no authdb supports password setting as configured * SASL_NOVERIFY -- user exists, but no settable password present * SASL_DISABLED -- account disabled * SASL_PWLOCK -- password locked * SASL_WEAKPASS -- password too weak for security policy * SASL_NOUSERPASS -- user-supplied passwords not permitted * SASL_FAIL -- OS error * SASL_BADPARAM -- password too long * SASL_OK -- successful */ LIBSASL_API int sasl_setpass(sasl_conn_t *conn, const char *user, const char *pass, unsigned passlen, const char *oldpass, unsigned oldpasslen, unsigned flags); #define SASL_SET_CREATE 0x01 /* create a new entry for user */ #define SASL_SET_DISABLE 0x02 /* disable user account */ #define SASL_SET_NOPLAIN 0x04 /* do not store secret in plain text */ #define SASL_SET_CURMECH_ONLY 0x08 /* set the mechanism specific password only. fail if no current mechanism */ /********************************************************* * Auxiliary Property Support -- added by cjn 1999-09-29 * *********************************************************/ #define SASL_AUX_END NULL /* last auxiliary property */ #define SASL_AUX_ALL "*" /* A special flag to signal user deletion */ /* traditional Posix items (should be implemented on Posix systems) */ #define SASL_AUX_PASSWORD_PROP "userPassword" /* User Password */ #define SASL_AUX_PASSWORD "*" SASL_AUX_PASSWORD_PROP /* User Password (of authid) */ #define SASL_AUX_UIDNUM "uidNumber" /* UID number for the user */ #define SASL_AUX_GIDNUM "gidNumber" /* GID for the user */ #define SASL_AUX_FULLNAME "gecos" /* full name of the user, unix-style */ #define SASL_AUX_HOMEDIR "homeDirectory" /* home directory for user */ #define SASL_AUX_SHELL "loginShell" /* login shell for the user */ /* optional additional items (not necessarily implemented) */ /* single preferred mail address for user canonically-quoted * RFC821/822 syntax */ #define SASL_AUX_MAILADDR "mail" /* path to unix-style mailbox for user */ #define SASL_AUX_UNIXMBX "mailMessageStore" /* SMTP mail channel name to use if user authenticates successfully */ #define SASL_AUX_MAILCHAN "mailSMTPSubmitChannel" /* Request a set of auxiliary properties * conn connection context * propnames list of auxiliary property names to request ending with * NULL. * * Subsequent calls will add items to the request list. Call with NULL * to clear the request list. * * errors * SASL_OK -- success * SASL_BADPARAM -- bad count/conn parameter * SASL_NOMEM -- out of memory */ LIBSASL_API int sasl_auxprop_request(sasl_conn_t *conn, const char **propnames); /* Returns current auxiliary property context. * Use functions in prop.h to access content * * if authentication hasn't completed, property values may be empty/NULL * * properties not recognized by active plug-ins will be left empty/NULL * * returns NULL if conn is invalid. */ LIBSASL_API struct propctx *sasl_auxprop_getctx(sasl_conn_t *conn); /* Store the set of auxiliary properties for the given user. * Use functions in prop.h to set the content. * * conn connection context * ctx property context from prop_new()/prop_request()/prop_set() * user NUL terminated user * * Call with NULL 'ctx' to see if the backend allows storing properties. * * errors * SASL_OK -- success * SASL_NOMECH -- can not store some/all properties * SASL_BADPARAM -- bad conn/ctx/user parameter * SASL_NOMEM -- out of memory * SASL_FAIL -- failed to store */ LIBSASL_API int sasl_auxprop_store(sasl_conn_t *conn, struct propctx *ctx, const char *user); /********************** * security layer API * **********************/ /* encode a block of data for transmission using security layer, * returning the input buffer if there is no security layer. * output is only valid until next call to sasl_encode or sasl_encodev * returns: * SASL_OK -- success (returns input if no layer negotiated) * SASL_NOTDONE -- security layer negotiation not finished * SASL_BADPARAM -- inputlen is greater than the SASL_MAXOUTBUF */ LIBSASL_API int sasl_encode(sasl_conn_t *conn, const char *input, unsigned inputlen, const char **output, unsigned *outputlen); /* encode a block of data for transmission using security layer * output is only valid until next call to sasl_encode or sasl_encodev * returns: * SASL_OK -- success (returns input if no layer negotiated) * SASL_NOTDONE -- security layer negotiation not finished * SASL_BADPARAM -- input length is greater than the SASL_MAXOUTBUF * or no security layer */ LIBSASL_API int sasl_encodev(sasl_conn_t *conn, const struct iovec *invec, unsigned numiov, const char **output, unsigned *outputlen); /* decode a block of data received using security layer * returning the input buffer if there is no security layer. * output is only valid until next call to sasl_decode * * if outputlen is 0 on return, than the value of output is undefined. * * returns: * SASL_OK -- success (returns input if no layer negotiated) * SASL_NOTDONE -- security layer negotiation not finished * SASL_BADMAC -- bad message integrity check */ LIBSASL_API int sasl_decode(sasl_conn_t *conn, const char *input, unsigned inputlen, const char **output, unsigned *outputlen); #ifdef __cplusplus } #endif #endif /* SASL_H */ include/sasl/saslplug.h000064400000103566152342602460011153 0ustar00/* saslplug.h -- API for SASL plug-ins */ #ifndef SASLPLUG_H #define SASLPLUG_H 1 #ifndef MD5GLOBAL_H #include "md5global.h" #endif #ifndef MD5_H #include "md5.h" #endif #ifndef HMAC_MD5_H #include "hmac-md5.h" #endif #ifndef PROP_H #include "prop.h" #endif #ifdef __cplusplus extern "C" { #endif /* callback to lookup a sasl_callback_t for a connection * input: * conn -- the connection to lookup a callback for * callbacknum -- the number of the callback * output: * pproc -- pointer to the callback function (set to NULL on failure) * pcontext -- pointer to the callback context (set to NULL on failure) * returns: * SASL_OK -- no error * SASL_FAIL -- unable to find a callback of the requested type * SASL_INTERACT -- caller must use interaction to get data */ typedef int (*sasl_callback_ft)(void); typedef int sasl_getcallback_t(sasl_conn_t *conn, unsigned long callbackid, sasl_callback_ft * pproc, void **pcontext); /* The sasl_utils structure will remain backwards compatible unless * the SASL_*_PLUG_VERSION is changed incompatibly * higher SASL_UTILS_VERSION numbers indicate more functions are available */ #define SASL_UTILS_VERSION 4 /* utility function set for plug-ins */ typedef struct sasl_utils { int version; /* contexts */ sasl_conn_t *conn; sasl_rand_t *rpool; void *getopt_context; /* option function */ sasl_getopt_t *getopt; /* allocation functions: */ sasl_malloc_t *malloc; sasl_calloc_t *calloc; sasl_realloc_t *realloc; sasl_free_t *free; /* mutex functions: */ sasl_mutex_alloc_t *mutex_alloc; sasl_mutex_lock_t *mutex_lock; sasl_mutex_unlock_t *mutex_unlock; sasl_mutex_free_t *mutex_free; /* MD5 hash and HMAC functions */ void (*MD5Init)(MD5_CTX *); void (*MD5Update)(MD5_CTX *, const unsigned char *text, unsigned int len); void (*MD5Final)(unsigned char [16], MD5_CTX *); void (*hmac_md5)(const unsigned char *text, int text_len, const unsigned char *key, int key_len, unsigned char [16]); void (*hmac_md5_init)(HMAC_MD5_CTX *, const unsigned char *key, int len); /* hmac_md5_update() is just a call to MD5Update on inner context */ void (*hmac_md5_final)(unsigned char [16], HMAC_MD5_CTX *); void (*hmac_md5_precalc)(HMAC_MD5_STATE *, const unsigned char *key, int len); void (*hmac_md5_import)(HMAC_MD5_CTX *, HMAC_MD5_STATE *); /* mechanism utility functions (same as above): */ int (*mkchal)(sasl_conn_t *conn, char *buf, unsigned maxlen, unsigned hostflag); int (*utf8verify)(const char *str, unsigned len); void (*rand)(sasl_rand_t *rpool, char *buf, unsigned len); void (*churn)(sasl_rand_t *rpool, const char *data, unsigned len); /* This allows recursive calls to the sasl_checkpass() routine from * within a SASL plug-in. This MUST NOT be used in the PLAIN mechanism * as sasl_checkpass MAY be a front-end for the PLAIN mechanism. * This is intended for use by the non-standard LOGIN mechanism and * potentially by a future mechanism which uses public-key technology to * set up a lightweight encryption layer just for sending a password. */ int (*checkpass)(sasl_conn_t *conn, const char *user, unsigned userlen, const char *pass, unsigned passlen); /* Access to base64 encode/decode routines */ int (*decode64)(const char *in, unsigned inlen, char *out, unsigned outmax, unsigned *outlen); int (*encode64)(const char *in, unsigned inlen, char *out, unsigned outmax, unsigned *outlen); /* erase a buffer */ void (*erasebuffer)(char *buf, unsigned len); /* callback to sasl_getprop() and sasl_setprop() */ int (*getprop)(sasl_conn_t *conn, int propnum, const void **pvalue); int (*setprop)(sasl_conn_t *conn, int propnum, const void *value); /* callback function */ sasl_getcallback_t *getcallback; /* format a message and then pass it to the SASL_CB_LOG callback * * use syslog()-style formatting (printf with %m as a human readable text * (strerror()) for the error specified as the parameter). * The implementation may use a fixed size buffer not smaller * than 512 octets if it securely truncates the message. * * level is a SASL_LOG_* level (see sasl.h) */ void (*log)(sasl_conn_t *conn, int level, const char *fmt, ...) __attribute__((format(printf, 3, 4))); /* callback to sasl_seterror() */ void (*seterror)(sasl_conn_t *conn, unsigned flags, const char *fmt, ...) __attribute__((format(printf, 3, 4))); /* spare function pointer */ int *(*spare_fptr)(void); /* auxiliary property utilities */ 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_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); void (*prop_erase)(struct propctx *ctx, const char *name); int (*auxprop_store)(sasl_conn_t *conn, struct propctx *ctx, const char *user); /* for additions which don't require a version upgrade; set to 0 */ int (*spare_fptr1)(void); int (*spare_fptr2)(void); } sasl_utils_t; /* * output parameters from SASL API * * created / destroyed by the glue code, though probably filled in * by a combination of the plugin, the glue code, and the canon_user callback. * */ typedef struct sasl_out_params { unsigned doneflag; /* exchange complete */ const char *user; /* canonicalized user name */ const char *authid; /* canonicalized authentication id */ unsigned ulen; /* length of canonicalized user name */ unsigned alen; /* length of canonicalized authid */ /* security layer information */ unsigned maxoutbuf; /* Maximum buffer size, which will produce buffer no bigger than the negotiated SASL maximum buffer size */ sasl_ssf_t mech_ssf; /* Should be set non-zero if negotiation of a * security layer was *attempted*, even if * the negotiation failed */ void *encode_context; int (*encode)(void *context, const struct iovec *invec, unsigned numiov, const char **output, unsigned *outputlen); void *decode_context; int (*decode)(void *context, const char *input, unsigned inputlen, const char **output, unsigned *outputlen); /* Pointer to delegated (client's) credentials, if supported by the SASL mechanism */ void *client_creds; /* for additions which don't require a version upgrade; set to 0 */ const void *gss_peer_name; const void *gss_local_name; const char *cbindingname; /* channel binding name from packet */ int (*spare_fptr1)(void); int (*spare_fptr2)(void); unsigned int cbindingdisp; /* channel binding disposition from client */ int spare_int2; int spare_int3; int spare_int4; /* set to 0 initially, this allows a plugin with extended parameters * to work with an older framework by updating version as parameters * are added. */ int param_version; } sasl_out_params_t; /* Used by both client and server side plugins */ typedef enum { SASL_INFO_LIST_START = 0, SASL_INFO_LIST_MECH, SASL_INFO_LIST_END } sasl_info_callback_stage_t; /****************************** * Channel binding macros ** ******************************/ typedef enum { SASL_CB_DISP_NONE = 0, /* client did not support CB */ SASL_CB_DISP_WANT, /* client supports CB, thinks server does not */ SASL_CB_DISP_USED /* client supports and used CB */ } sasl_cbinding_disp_t; /* TRUE if channel binding is non-NULL */ #define SASL_CB_PRESENT(params) ((params)->cbinding != NULL) /* TRUE if channel binding is marked critical */ #define SASL_CB_CRITICAL(params) (SASL_CB_PRESENT(params) && \ (params)->cbinding->critical) /****************************** * Client Mechanism Functions * ******************************/ /* * input parameters to client SASL plugin * * created / destroyed by the glue code * */ typedef struct sasl_client_params { const char *service; /* service name */ const char *serverFQDN; /* server fully qualified domain name */ const char *clientFQDN; /* client's fully qualified domain name */ const sasl_utils_t *utils; /* SASL API utility routines -- * for a particular sasl_conn_t, * MUST remain valid until mech_free is * called */ const sasl_callback_t *prompt_supp; /* client callback list */ const char *iplocalport; /* server IP domain literal & port */ const char *ipremoteport; /* client IP domain literal & port */ unsigned servicelen; /* length of service */ unsigned slen; /* length of serverFQDN */ unsigned clen; /* length of clientFQDN */ unsigned iploclen; /* length of iplocalport */ unsigned ipremlen; /* length of ipremoteport */ /* application's security requirements & info */ sasl_security_properties_t props; sasl_ssf_t external_ssf; /* external SSF active */ /* for additions which don't require a version upgrade; set to 0 */ const void *gss_creds; /* GSS credential handle */ const sasl_channel_binding_t *cbinding; /* client channel binding */ const sasl_http_request_t *http_request;/* HTTP Digest request method */ void *spare_ptr4; /* Canonicalize a user name from on-wire to internal format * added rjs3 2001-05-23 * Must be called once user name aquired if canon_user is non-NULL. * conn connection context * in user name from wire protocol (need not be NUL terminated) * len length of user name from wire protocol (0 = strlen(user)) * flags for SASL_CU_* flags * oparams the user, authid, ulen, alen, fields are * set appropriately after canonicalization/copying and * authorization of arguments * * responsible for setting user, ulen, authid, and alen in the oparams * structure * * default behavior is to strip leading and trailing whitespace, as * well as allocating space for and copying the parameters. * * results: * SASL_OK -- success * SASL_NOMEM -- out of memory * SASL_BADPARAM -- invalid conn * SASL_BADPROT -- invalid user/authid */ int (*canon_user)(sasl_conn_t *conn, const char *in, unsigned len, unsigned flags, sasl_out_params_t *oparams); int (*spare_fptr1)(void); unsigned int cbindingdisp; int spare_int2; int spare_int3; /* flags field as passed to sasl_client_new */ unsigned flags; /* set to 0 initially, this allows a plugin with extended parameters * to work with an older framework by updating version as parameters * are added. */ int param_version; } sasl_client_params_t; /* features shared between client and server */ /* These allow the glue code to handle client-first and server-last issues */ /* This indicates that the mechanism prefers to do client-send-first * if the protocol allows it. */ #define SASL_FEAT_WANT_CLIENT_FIRST 0x0002 /* This feature is deprecated. Instead, plugins should set *serverout to * non-NULL and return SASL_OK intelligently to allow flexible use of * server-last semantics #define SASL_FEAT_WANT_SERVER_LAST 0x0004 */ /* This feature is deprecated. Instead, plugins should correctly set * SASL_FEAT_SERVER_FIRST as needed #define SASL_FEAT_INTERNAL_CLIENT_FIRST 0x0008 */ /* This indicates that the plugin is server-first only. * Not defining either of SASL_FEAT_SERVER_FIRST or * SASL_FEAT_WANT_CLIENT_FIRST indicates that the mechanism * will handle the client-first situation internally. */ #define SASL_FEAT_SERVER_FIRST 0x0010 /* This plugin allows proxying */ #define SASL_FEAT_ALLOWS_PROXY 0x0020 /* server plugin don't use cleartext userPassword attribute */ #define SASL_FEAT_DONTUSE_USERPASSWD 0x0080 /* Underlying mechanism uses GSS framing */ #define SASL_FEAT_GSS_FRAMING 0x0100 /* Underlying mechanism supports channel binding */ #define SASL_FEAT_CHANNEL_BINDING 0x0800 /* This plugin can be used for HTTP authentication */ #define SASL_FEAT_SUPPORTS_HTTP 0x1000 /* client plug-in features */ #define SASL_FEAT_NEEDSERVERFQDN 0x0001 /* a C object for a client mechanism */ typedef struct sasl_client_plug { /* mechanism name */ const char *mech_name; /* best mech additional security layer strength factor */ sasl_ssf_t max_ssf; /* best security flags, as defined in sasl_security_properties_t */ unsigned security_flags; /* features of plugin */ unsigned features; /* required prompt ids, NULL = user/pass only */ const unsigned long *required_prompts; /* global state for mechanism */ void *glob_context; /* create context for mechanism, using params supplied * glob_context -- from above * params -- params from sasl_client_new * conn_context -- context for one connection * returns: * SASL_OK -- success * SASL_NOMEM -- not enough memory * SASL_WRONGMECH -- mech doesn't support security params */ int (*mech_new)(void *glob_context, sasl_client_params_t *cparams, void **conn_context); /* perform one step of exchange. NULL is passed for serverin on * first step. * returns: * SASL_OK -- success * SASL_INTERACT -- user interaction needed to fill in prompts * SASL_BADPROT -- server protocol incorrect/cancelled * SASL_BADSERV -- server failed mutual auth */ int (*mech_step)(void *conn_context, sasl_client_params_t *cparams, const char *serverin, unsigned serverinlen, sasl_interact_t **prompt_need, const char **clientout, unsigned *clientoutlen, sasl_out_params_t *oparams); /* dispose of connection context from mech_new */ void (*mech_dispose)(void *conn_context, const sasl_utils_t *utils); /* free all global space used by mechanism * mech_dispose must be called on all mechanisms first */ void (*mech_free)(void *glob_context, const sasl_utils_t *utils); /* perform precalculations during a network round-trip * or idle period. conn_context may be NULL * returns 1 if action taken, 0 if no action taken */ int (*idle)(void *glob_context, void *conn_context, sasl_client_params_t *cparams); /* for additions which don't require a version upgrade; set to 0 */ int (*spare_fptr1)(void); int (*spare_fptr2)(void); } sasl_client_plug_t; #define SASL_CLIENT_PLUG_VERSION 4 /* plug-in entry point: * utils -- utility callback functions * max_version -- highest client plug version supported * returns: * out_version -- client plug version of result * pluglist -- list of mechanism plug-ins * plugcount -- number of mechanism plug-ins * results: * SASL_OK -- success * SASL_NOMEM -- failure * SASL_BADVERS -- max_version too small * SASL_BADPARAM -- bad config string * ... */ typedef int sasl_client_plug_init_t(const sasl_utils_t *utils, int max_version, int *out_version, sasl_client_plug_t **pluglist, int *plugcount); /* add a client plug-in */ LIBSASL_API int sasl_client_add_plugin(const char *plugname, sasl_client_plug_init_t *cplugfunc); typedef struct client_sasl_mechanism { int version; char *plugname; const sasl_client_plug_t *plug; } client_sasl_mechanism_t; typedef void sasl_client_info_callback_t (client_sasl_mechanism_t *m, sasl_info_callback_stage_t stage, void *rock); /* Dump information about available client plugins */ LIBSASL_API int sasl_client_plugin_info (const char *mech_list, sasl_client_info_callback_t *info_cb, void *info_cb_rock); /******************** * Server Functions * ********************/ /* log message formatting routine */ typedef void sasl_logmsg_p(sasl_conn_t *conn, const char *fmt, ...) __attribute__((format(printf, 2, 3))); /* * input parameters to server SASL plugin * * created / destroyed by the glue code * */ typedef struct sasl_server_params { const char *service; /* NULL = default service for user_exists and setpass */ const char *appname; /* name of calling application */ const char *serverFQDN; /* server default fully qualified domain name * (e.g., gethostname) */ const char *user_realm; /* realm for user (NULL = client supplied) */ const char *iplocalport; /* server IP domain literal & port */ const char *ipremoteport; /* client IP domain literal & port */ unsigned servicelen; /* length of service */ unsigned applen; /* length of appname */ unsigned slen; /* length of serverFQDN */ unsigned urlen; /* length of user_realm */ unsigned iploclen; /* length of iplocalport */ unsigned ipremlen; /* length of ipremoteport */ /* This indicates the level of logging desired. See SASL_LOG_* * in sasl.h * * Plug-ins can ignore this and just pass their desired level to * the log callback. This is primarily used to eliminate logging which * might be a performance problem (e.g., full protocol trace) and * to select between SASL_LOG_TRACE and SASL_LOG_PASS alternatives */ int log_level; const sasl_utils_t *utils; /* SASL API utility routines -- * for a particular sasl_conn_t, * MUST remain valid until mech_free is * called */ const sasl_callback_t *callbacks; /* Callbacks from application */ /* application's security requirements */ sasl_security_properties_t props; sasl_ssf_t external_ssf; /* external SSF active */ /* Pointer to the function which takes the plaintext passphrase and * transitions a user to non-plaintext mechanisms via setpass calls. * (NULL = auto transition not enabled/supported) * * If passlen is 0, it defaults to strlen(pass). * returns 0 if no entry added, 1 if entry added */ int (*transition)(sasl_conn_t *conn, const char *pass, unsigned passlen); /* Canonicalize a user name from on-wire to internal format * added cjn 1999-09-21 * Must be called once user name acquired if canon_user is non-NULL. * conn connection context * user user name from wire protocol (need not be NUL terminated) * ulen length of user name from wire protocol (0 = strlen(user)) * flags for SASL_CU_* flags * oparams the user, authid, ulen, alen, fields are * set appropriately after canonicalization/copying and * authorization of arguments * * responsible for setting user, ulen, authid, and alen in the oparams * structure * * default behavior is to strip leading and trailing whitespace, as * well as allocating space for and copying the parameters. * * results: * SASL_OK -- success * SASL_NOMEM -- out of memory * SASL_BADPARAM -- invalid conn * SASL_BADPROT -- invalid user/authid */ int (*canon_user)(sasl_conn_t *conn, const char *user, unsigned ulen, unsigned flags, sasl_out_params_t *oparams); /* auxiliary property context (see definitions in prop.h) * added cjn 2000-01-30 * * NOTE: these properties are the ones associated with the * canonicalized "user" (user to login as / authorization id), not * the "authid" (user whose credentials are used / authentication id) * Prefix the property name with a "*" if a property associated with * the "authid" is interesting. */ struct propctx *propctx; /* for additions which don't require a version upgrade; set to 0 */ const void *gss_creds; /* GSS credential handle */ const sasl_channel_binding_t *cbinding; /* server channel binding */ const sasl_http_request_t *http_request;/* HTTP Digest request method */ void *spare_ptr4; int (*spare_fptr1)(void); int (*spare_fptr2)(void); int spare_int1; int spare_int2; int spare_int3; /* flags field as passed to sasl_server_new */ unsigned flags; /* set to 0 initially, this allows a plugin with extended parameters * to work with an older framework by updating version as parameters * are added. */ int param_version; } sasl_server_params_t; /* logging levels (more levels may be added later, if necessary): */ #define SASL_LOG_NONE 0 /* don't log anything */ #define SASL_LOG_ERR 1 /* log unusual errors (default) */ #define SASL_LOG_FAIL 2 /* log all authentication failures */ #define SASL_LOG_WARN 3 /* log non-fatal warnings */ #define SASL_LOG_NOTE 4 /* more verbose than LOG_WARN */ #define SASL_LOG_DEBUG 5 /* more verbose than LOG_NOTE */ #define SASL_LOG_TRACE 6 /* traces of internal protocols */ #define SASL_LOG_PASS 7 /* traces of internal protocols, including * passwords */ /* additional flags for setpass() function below: */ /* SASL_SET_CREATE create user if pass non-NULL */ /* SASL_SET_DISABLE disable user */ #define SASL_SET_REMOVE SASL_SET_CREATE /* remove user if pass is NULL */ /* features for server plug-in */ #define SASL_FEAT_SERVICE 0x0200 /* service-specific passwords supported */ #define SASL_FEAT_GETSECRET 0x0400 /* sasl_server_{get,put}secret_t callbacks * required by plug-in */ /* a C object for a server mechanism */ typedef struct sasl_server_plug { /* mechanism name */ const char *mech_name; /* best mech additional security layer strength factor */ sasl_ssf_t max_ssf; /* best security flags, as defined in sasl_security_properties_t */ unsigned security_flags; /* features of plugin */ unsigned features; /* global state for mechanism */ void *glob_context; /* create a new mechanism handler * glob_context -- global context * sparams -- server config params * challenge -- server challenge from previous instance or NULL * challen -- length of challenge from previous instance or 0 * out: * conn_context -- connection context * errinfo -- error information * * returns: * SASL_OK -- successfully created mech instance * SASL_* -- any other server error code */ int (*mech_new)(void *glob_context, sasl_server_params_t *sparams, const char *challenge, unsigned challen, void **conn_context); /* perform one step in exchange * * returns: * SASL_OK -- success, all done * SASL_CONTINUE -- success, one more round trip * SASL_* -- any other server error code */ int (*mech_step)(void *conn_context, sasl_server_params_t *sparams, const char *clientin, unsigned clientinlen, const char **serverout, unsigned *serveroutlen, sasl_out_params_t *oparams); /* dispose of a connection state */ void (*mech_dispose)(void *conn_context, const sasl_utils_t *utils); /* free global state for mechanism * mech_dispose must be called on all mechanisms first */ void (*mech_free)(void *glob_context, const sasl_utils_t *utils); /* set a password (optional) * glob_context -- global context * sparams -- service, middleware utilities, etc. props ignored * user -- user name * pass -- password/passphrase (NULL = disable/remove/delete) * passlen -- length of password/passphrase * oldpass -- old password/passphrase (NULL = transition) * oldpasslen -- length of password/passphrase * flags -- see above * * returns: * SASL_NOCHANGE -- no change was needed * SASL_NOUSER -- no entry for user * SASL_NOVERIFY -- no mechanism compatible entry for user * SASL_PWLOCK -- password locked * SASL_DIABLED -- account disabled * etc. */ int (*setpass)(void *glob_context, sasl_server_params_t *sparams, const char *user, const char *pass, unsigned passlen, const char *oldpass, unsigned oldpasslen, unsigned flags); /* query which mechanisms are available for user * glob_context -- context * sparams -- service, middleware utilities, etc. props ignored * user -- NUL terminated user name * maxmech -- max number of strings in mechlist (0 = no output) * output: * mechlist -- an array of C string pointers, filled in with * mechanism names available to the user * * returns: * SASL_OK -- success * SASL_NOMEM -- not enough memory * SASL_FAIL -- lower level failure * SASL_DISABLED -- account disabled * SASL_NOUSER -- user not found * SASL_BUFOVER -- maxmech is too small * SASL_NOVERIFY -- user found, but no mechanisms available */ int (*user_query)(void *glob_context, sasl_server_params_t *sparams, const char *user, int maxmech, const char **mechlist); /* perform precalculations during a network round-trip * or idle period. conn_context may be NULL (optional) * returns 1 if action taken, 0 if no action taken */ int (*idle)(void *glob_context, void *conn_context, sasl_server_params_t *sparams); /* check if mechanism is available * optional--if NULL, mechanism is available based on ENABLE= in config * * If this routine sets conn_context to a non-NULL value, then the call * to mech_new will be skipped. This should not be done unless * there's a significant performance benefit, since it can cause * additional memory allocation in SASL core code to keep track of * contexts potentially for multiple mechanisms. * * This is called by the first call to sasl_listmech() for a * given connection context, thus for a given protocol it may * never be called. Note that if mech_avail returns SASL_NOMECH, * then that mechanism is considered disabled for the remainder * of the session. If mech_avail returns SASL_NOTDONE, then a * future call to mech_avail may still return either SASL_OK * or SASL_NOMECH. * * returns SASL_OK on success, * SASL_NOTDONE if mech is not available now, but may be later * (e.g. EXTERNAL w/o auth_id) * SASL_NOMECH if mech disabled */ int (*mech_avail)(void *glob_context, sasl_server_params_t *sparams, void **conn_context); /* for additions which don't require a version upgrade; set to 0 */ int (*spare_fptr2)(void); } sasl_server_plug_t; #define SASL_SERVER_PLUG_VERSION 4 /* plug-in entry point: * utils -- utility callback functions * plugname -- name of plug-in (may be NULL) * max_version -- highest server plug version supported * returns: * out_version -- server plug-in version of result * pluglist -- list of mechanism plug-ins * plugcount -- number of mechanism plug-ins * results: * SASL_OK -- success * SASL_NOMEM -- failure * SASL_BADVERS -- max_version too small * SASL_BADPARAM -- bad config string * ... */ typedef int sasl_server_plug_init_t(const sasl_utils_t *utils, int max_version, int *out_version, sasl_server_plug_t **pluglist, int *plugcount); /* * add a server plug-in */ LIBSASL_API int sasl_server_add_plugin(const char *plugname, sasl_server_plug_init_t *splugfunc); typedef struct server_sasl_mechanism { int version; int condition; /* set to SASL_NOUSER if no available users; set to SASL_CONTINUE if delayed plugin loading */ char *plugname; /* for AUTHSOURCE tracking */ const sasl_server_plug_t *plug; char *f; /* where should i load the mechanism from? */ } server_sasl_mechanism_t; typedef void sasl_server_info_callback_t (server_sasl_mechanism_t *m, sasl_info_callback_stage_t stage, void *rock); /* Dump information about available server plugins (separate functions are used for canon and auxprop plugins) */ LIBSASL_API int sasl_server_plugin_info (const char *mech_list, sasl_server_info_callback_t *info_cb, void *info_cb_rock); /********************************************************* * user canonicalization plug-in -- added cjn 1999-09-29 * *********************************************************/ typedef struct sasl_canonuser { /* optional features of plugin (set to 0) */ int features; /* spare integer (set to 0) */ int spare_int1; /* global state for plugin */ void *glob_context; /* name of plugin */ char *name; /* free global state for plugin */ void (*canon_user_free)(void *glob_context, const sasl_utils_t *utils); /* canonicalize a username * glob_context -- global context from this structure * sparams -- server params, note user_realm&propctx elements * user -- user to login as (may not be NUL terminated) * len -- length of user name (0 = strlen(user)) * flags -- for SASL_CU_* flags * out -- buffer to copy user name * out_max -- max length of user name * out_len -- set to length of user name * * note that the output buffers MAY be the same as the input buffers. * * returns * SASL_OK on success * SASL_BADPROT username contains invalid character */ int (*canon_user_server)(void *glob_context, sasl_server_params_t *sparams, const char *user, unsigned len, unsigned flags, char *out, unsigned out_umax, unsigned *out_ulen); int (*canon_user_client)(void *glob_context, sasl_client_params_t *cparams, const char *user, unsigned len, unsigned flags, char *out, unsigned out_max, unsigned *out_len); /* for additions which don't require a version upgrade; set to 0 */ int (*spare_fptr1)(void); int (*spare_fptr2)(void); int (*spare_fptr3)(void); } sasl_canonuser_plug_t; #define SASL_CANONUSER_PLUG_VERSION 5 /* default name for canonuser plug-in entry point is "sasl_canonuser_init" * similar to sasl_server_plug_init model, except only returns one * sasl_canonuser_plug_t structure; */ typedef int sasl_canonuser_init_t(const sasl_utils_t *utils, int max_version, int *out_version, sasl_canonuser_plug_t **plug, const char *plugname); /* add a canonuser plugin */ LIBSASL_API int sasl_canonuser_add_plugin(const char *plugname, sasl_canonuser_init_t *canonuserfunc); /****************************************************** * auxiliary property plug-in -- added cjn 1999-09-29 * ******************************************************/ typedef struct sasl_auxprop_plug { /* optional features of plugin (none defined yet, set to 0) */ int features; /* spare integer, must be set to 0 */ int spare_int1; /* global state for plugin */ void *glob_context; /* free global state for plugin (OPTIONAL) */ void (*auxprop_free)(void *glob_context, const sasl_utils_t *utils); /* fill in fields of an auxiliary property context * last element in array has id of SASL_AUX_END * elements with non-0 len should be ignored. */ int (*auxprop_lookup)(void *glob_context, sasl_server_params_t *sparams, unsigned flags, const char *user, unsigned ulen); /* name of the auxprop plugin */ char *name; /* store the fields/values of an auxiliary property context (OPTIONAL) * * if ctx is NULL, just check if storing properties is enabled * * returns * SASL_OK on success * SASL_FAIL on failure */ int (*auxprop_store)(void *glob_context, sasl_server_params_t *sparams, struct propctx *ctx, const char *user, unsigned ulen); } sasl_auxprop_plug_t; /* auxprop lookup flags */ #define SASL_AUXPROP_OVERRIDE 0x01 /* if clear, ignore auxiliary properties * with non-zero len field. If set, * override value of those properties */ #define SASL_AUXPROP_AUTHZID 0x02 /* if clear, we are looking up the * authid flags (prefixed with *), otherwise * we are looking up the authzid flags * (no prefix) */ /* NOTE: Keep in sync with SASL_CU_ flags */ #define SASL_AUXPROP_VERIFY_AGAINST_HASH 0x10 #define SASL_AUXPROP_PLUG_VERSION 8 /* default name for auxprop plug-in entry point is "sasl_auxprop_init" * similar to sasl_server_plug_init model, except only returns one * sasl_auxprop_plug_t structure; */ typedef int sasl_auxprop_init_t(const sasl_utils_t *utils, int max_version, int *out_version, sasl_auxprop_plug_t **plug, const char *plugname); /* add an auxiliary property plug-in */ LIBSASL_API int sasl_auxprop_add_plugin(const char *plugname, sasl_auxprop_init_t *auxpropfunc); typedef void auxprop_info_callback_t (sasl_auxprop_plug_t *m, sasl_info_callback_stage_t stage, void *rock); /* Dump information about available auxprop plugins (separate functions are used for canon and server authentication plugins) */ LIBSASL_API int auxprop_plugin_info (const char *mech_list, auxprop_info_callback_t *info_cb, void *info_cb_rock); #ifdef __cplusplus } #endif #endif /* SASLPLUG_H */ share/licenses/alt-cyrus-sasl-lib/COPYING000064400000003505152342602460014144 0ustar00/* CMU libsasl * Tim Martin * Rob Earhart * Rob Siemborski */ /* * Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The name "Carnegie Mellon University" must not be used to * endorse or promote products derived from this software without * prior written permission. For permission or any other legal * details, please contact * Office of Technology Transfer * Carnegie Mellon University * 5000 Forbes Avenue * Pittsburgh, PA 15213-3890 * (412) 268-4387, fax: (412) 268-7395 * tech-transfer@andrew.cmu.edu * * 4. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by Computing Services * at Carnegie Mellon University (http://www.cmu.edu/computing/)." * * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ share/man/man8/saslpasswd2.8000064400000006167152342602460011641 0ustar00.\" saslpasswd.8 -- saslpasswd man page .\" Rob Earhart .\" .\" Copyright (c) 2000 Carnegie Mellon University. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in .\" the documentation and/or other materials provided with the .\" distribution. .\" .\" 3. The name ""Carnegie Mellon University"" must not be used to .\" endorse or promote products derived from this software without .\" prior written permission. For permission or any other legal .\" details, please contact .\" Office of Technology Transfer .\" Carnegie Mellon University .\" 5000 Forbes Avenue .\" Pittsburgh, PA 15213-3890 .\" (412) 268-4387, fax: (412) 268-7395 .\" tech-transfer@andrew.cmu.edu .\" .\" 4. Redistributions of any form whatsoever must retain the following .\" acknowledgment: .\" ""This product includes software developed by Computing Services .\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."" .\" .\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO .\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY .\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE .\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN .\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING .\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" .TH SASLPASSWD2 8 "Mar 7, 2005" "CMU SASL" .SH NAME saslpasswd2 \- set a user's sasl password .SH SYNOPSIS .B saslpasswd2 .RB [ -p ] .RB [ -d ] .RB [ -c ] .RB [ -n ] .RB [ -f\ file ] .RB [ -u\ domain ] .RB [ -a\ appname ] .RB [ -v ] .B userid .SH DESCRIPTION .I saslpasswd2 is used by a server administrator to set a user's sasl password for server programs and SASL mechanisms which use the standard libsasl database of user secrets. .SH OPTIONS .TP .B -p Pipe mode \- saslpasswd2 will neither prompt for the password nor verify that it was entered correctly. This is the default when standard input is not a terminal. .TP .B -c Creates an entry for the user if the user doesn't already exist. This is mutually exclusive with the .B -d (delete user) flag. .TP .B -d Deletes the entry for the user. This is mutually exclusive with the .B -c (create user) flag. .TP .B -n Don't set the plaintext \fIuserPassword\fR property for the user. Only mechanism-specific secrets will be set (e.g. OTP, SCRAM, SRP) .TP .B -u domain use .B domain for user domain (realm). .TP .B -f file use .B file for sasldb .TP .B -a appname use .B appname as application name. .TP .B -v Print libsasl2 version number and exit. .SH SEE ALSO sasldblistusers2(8) .TP rfc4422 \- Simple Authentication and Security Layer (SASL) share/man/man8/saslauthd.8000064400000020101152342602460011343 0ustar00.\" $Id: saslauthd.mdoc,v 1.19 2009/04/11 20:08:48 mel Exp $ .\" Copyright 1997-2001 Messaging Direct Ltd. All rights reserved. .\" .\" This manpage uses the BSD mdoc manpage macros. Please don't .\" downgrade it to -man. The -mdoc macros are included with .\" GNU roff, and, of course, with the BSD distributions. .\" .\" To make life easier for sites that don't support -mdoc, .\" please generate (and commit!) an updated pre-formatted .\" manpage in saslauthd.8 whenever you change this source .\" version. Only the pre-formatted manpage is installed. .\" .Dd 12 12 2005 .Dt SASLAUTHD 8 .Os "CMU-SASL" .Sh NAME .Nm saslauthd .Nd sasl authentication server .Sh SYNOPSIS .Nm .Fl a .Ar authmech .Op Fl \&Tvdchlr .Op Fl O Ar option .Op Fl m Ar mux_path .Op Fl n Ar threads .Op Fl s Ar size .Op Fl t Ar timeout .Sh DESCRIPTION .Nm is a daemon process that handles plaintext authentication requests on behalf of the SASL library. .Pp The server fulfills two roles: it isolates all code requiring superuser privileges into a single process, and it can be used to provide .Em proxy authentication services to clients that do not understand SASL based authentication. .Pp .Nm should be started from the system boot scripts when going to multi-user mode. When running against a protected authentication database (e.g. the .Li shadow mechanism), it must be run as the superuser. Otherwise it is recommended to run daemon unprivileged as saslauth:saslauth, requiring the runtime directory to have root:saslauthd owner. You can do so by following these steps in machines using .Xr systemd 1 : .Bl -enum -compact .It create directory .Pa /etc/systemd/system/saslauthd.service.d/ .It create file .Pa /etc/systemd/system/saslauthd.service.d/user.conf with content .Bd -literal [Service] User=saslauth Group=saslauth .Ed .It Reload systemd service file: run .Dq systemctl daemon-reload .El .Ss Options Options named by lower\-case letters configure the server itself. Upper\-case options control the behavior of specific authentication mechanisms; their applicability to a particular authentication mechanism is described in the .Sx AUTHENTICATION MECHANISMS section. .Bl -tag -width indent .It Fl a Ar authmech Use .Ar authmech as the authentication mechanism. (See the .Sx AUTHENTICATION MECHANISMS section below.) This parameter is mandatory. .It Fl O Ar option A mechanism specific option (e.g. rimap hostname or config file path) .It Fl H Ar hostname The remote host to be contacted by the .Li rimap authentication mechanism. (Deprecated, use -O instead) .It Fl m Ar path Use .Ar path as the pathname to the named socket to listen on for connection requests. This must be an absolute pathname, and MUST NOT include the trailing "/mux". Note that the default for this value is "/var/state/saslauthd" (or what was specified at compile time) and that this directory must exist for saslauthd to function. .It Fl n Ar threads Use .Ar threads processes for responding to authentication queries. (default: 5) A value of zero will indicate that saslauthd should fork an individual process for each connection. This can solve leaks that occur in some deployments. .It Fl s Ar size Use .Ar size as the table size of the hash table (in kilobytes) .It Fl t Ar timeout Use .Ar timeout as the expiration time of the authentication cache (in seconds) .It Fl T Honour time-of-day login restrictions. .It Fl h Show usage information .It Fl c Enable caching of authentication credentials .It Fl l Disable the use of a lock file for controlling access to accept(). .It Fl r Combine the realm with the login (with an '@' sign in between). e.g. login: "foo" realm: "bar" will get passed as login: "foo@bar". Note that the realm will still be passed, which may lead to unexpected behavior for authentication mechanisms that make use of the realm, however for mechanisms which don't, such as .Ar getpwent , this is the only way to authenticate domain-specific users sharing the same userid. .It Fl v Print the version number and available authentication mechanisms on standard error, then exit. .It Fl d Debugging mode. .El .Ss Logging .Nm logs its activities via .Nm syslogd using the .Dv LOG_AUTH facility. .Sh AUTHENTICATION MECHANISMS .Nm supports one or more .Qq authentication mechanisms , dependent upon the facilities provided by the underlying operating system. The mechanism is selected by the .Fl a flag from the following list of choices: .Bl -tag -width "kerberos4" .It Li dce .Em (AIX) .Pp Authenticate using the DCE authentication environment. .It Li getpwent .Em (All platforms) .Pp Authenticate using the .Fn getpwent library function. Typically this authenticates against the local password file. See your system's .Xr getpwent 3 man page for details. .It Li kerberos4 .Em (All platforms) .Pp Authenticate against the local Kerberos 4 realm. (See the .Sx NOTES section for caveats about this driver.) .It Li kerberos5 .Em (All platforms) .Pp Authenticate against the local Kerberos 5 realm. .It Li pam .Em (Linux, Solaris) .Pp Authenticate using Pluggable Authentication Modules (PAM). .It Li rimap .Em (All platforms) .Pp Forward authentication requests to a remote IMAP server. This driver connects to a remote IMAP server, specified using the -O flag, and attempts to login (via an IMAP .Ql LOGIN command) using the credentials supplied to the local server. If the remote authentication succeeds the local connection is also considered to be authenticated. The remote connection is closed as soon as the tagged response from the .Ql LOGIN command is received from the remote server. .Pp The .Ar option parameter to the .Fl O flag describes the remote server to forward authentication requests to. .Ar hostname can be a hostname (imap.example.com) or a dotted\-quad IP address (192.168.0.1). The latter is useful if the remote server is multi\-homed and has network interfaces that are unreachable from the local IMAP server. The remote host is contacted on the .Ql imap service port. A non\-default port can be specified by appending a slash and the port name or number to the .Ar hostname argument. .Pp The .Fl O flag and argument are mandatory when using the .Li rimap mechanism. .It Li shadow .Em (AIX, Irix, Linux, Solaris) .Pp Authenticate against the local .Qq shadow password file . The exact mechanism is system dependent. .Nm currently understands the .Fn getspnam and .Fn getuserpw library routines. Some systems honour the .Fl T flag. .It Li sasldb .Em (All platforms) .Pp Authenticate against the SASL authentication database. Note that this is probably not what you want to use, and is even disabled at compile-time by default. If you want to use sasldb with the SASL library, you probably want to use the pwcheck_method of "auxprop" along with the sasldb auxprop plugin instead. .It Li ldap .Em (All platforms that support OpenLDAP 2.0 or higher) .Pp Authenticate against an ldap server. The ldap configuration parameters are read from /etc/saslauthd.conf. The location of this file can be changed with the -O parameter. See the LDAP_SASLAUTHD file included with the distribution for the list of available parameters. .It Li sia .Em (Digital UNIX) .Pp Authenticate using the Digital .Ux Security Integration Architecture (a.k.a. .Qq enhanced security ) . .El .Sh NOTES The .Li kerberos4 authentication driver consumes considerable resources. To perform an authentication it must obtain a ticket granting ticket from the TGT server .Sy on every authentication request. The Kerberos library routines that obtain the TGT also create a local ticket file, on the reasonable assumption that you will want to save the TGT for use by other Kerberos applications. These ticket files are unusable by .Nm No , however there is no way not to create them. The overhead of creating and removing these ticket files can cause serious performance degradation on busy servers. (Kerberos was never intended to be used in this manner, anyway.) .Sh FILES .Bl -tag -width "/run/saslauthd/mux" .It Pa /run/saslauthd/mux The default communications socket. .It Pa /etc/saslauthd.conf The default configuration file for ldap support. .El .Sh SEE ALSO .Xr passwd 1 , .Xr getpwent 3 , .Xr getspnam 3 , .Xr getuserpw 3 , .Xr sasl_checkpass 3 .Xr sia_authenticate_user 3 , share/man/man8/sasldblistusers2.8000064400000004672152342602460012702 0ustar00.\" sasldblistusers - List users in sasldb file .\" Tim Martin 3/8/00 .\" .\" Copyright (c) 2000 Carnegie Mellon University. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in .\" the documentation and/or other materials provided with the .\" distribution. .\" .\" 3. The name ""Carnegie Mellon University"" must not be used to .\" endorse or promote products derived from this software without .\" prior written permission. For permission or any other legal .\" details, please contact .\" Office of Technology Transfer .\" Carnegie Mellon University .\" 5000 Forbes Avenue .\" Pittsburgh, PA 15213-3890 .\" (412) 268-4387, fax: (412) 268-7395 .\" tech-transfer@andrew.cmu.edu .\" .\" 4. Redistributions of any form whatsoever must retain the following .\" acknowledgment: .\" ""This product includes software developed by Computing Services .\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."" .\" .\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO .\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY .\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE .\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN .\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING .\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" .TH SASLDBLISTUSERS2 8 "March 7, 2005" "CMU SASL" .SH NAME sasldblistusers2 \- list users in sasldb .SH SYNOPSIS .B sasldblistusers2 .RB [ -f\ file ] .RB [ -v ] .SH DESCRIPTION .I sasldblistusers2 is used to list the users in the SASL password database (usually /etc/sasldb2). This will NOT list all the users in /etc/passwd, shadow, PAM, etc. only those created by SASL (via \fIsaslpasswd2\fR). .SH OPTIONS .TP .B -f file use .B file for sasldb .TP .B -v Print libsasl2 version number and exit. .SH SEE ALSO saslpasswd2(8) .TP rfc4422 \- Simple Authentication and Security Layer (SASL) share/man/man8/testsaslauthd.8000064400000000743152342602460012255 0ustar00.\" testsaslauthd - SASL2 test tool .\" Dima Barsky 23/12/2002 .\" .\" .TH TESTSASLAUTHD 8 "December 23, 2002" "CMU SASL" .SH NAME testsaslauthd \- a test tool for saslauthd .SH SYNOPSIS .B testsaslauthd -u username -p password [-r realm] [-s servicename] [-f socket path] [-R repeatnum] .SH DESCRIPTION This tool is for testing the saslauthd daemon. Do not use it unless you know what you are doing. Read the source code if you need more information. share/man/man8/pluginviewer.8000064400000007527152342602460012114 0ustar00.\" pluginviewer.8 -- pluginviewer man page .\" Alexey Melnikov .\" .\" Copyright (c) 2006 Carnegie Mellon University. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in .\" the documentation and/or other materials provided with the .\" distribution. .\" .\" 3. The name ""Carnegie Mellon University"" must not be used to .\" endorse or promote products derived from this software without .\" prior written permission. For permission or any other legal .\" details, please contact .\" Office of Technology Transfer .\" Carnegie Mellon University .\" 5000 Forbes Avenue .\" Pittsburgh, PA 15213-3890 .\" (412) 268-4387, fax: (412) 268-7395 .\" tech-transfer@andrew.cmu.edu .\" .\" 4. Redistributions of any form whatsoever must retain the following .\" acknowledgment: .\" ""This product includes software developed by Computing Services .\" at Carnegie Mellon University (http://www.cmu.edu/computing/)."" .\" .\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO .\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY .\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE .\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN .\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING .\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" .TH PLUGINVIEWER 8 "Apr 10, 2006" "CMU SASL" .SH NAME pluginviewer \- list loadable SASL plugins and their properties .SH SYNOPSIS .B pluginviewer .RB [ -a ] .RB [ -s ] .RB [ -c ] .RB [ -b\ min=N,max=N ] .RB [ -e\ ssf=N,id=ID ] .RB [ -m\ MECHS ] .RB [ -x\ AUXPROP_MECH ] .RB [ -f\ FLAGS ] .RB [ -p\ PATH ] .SH DESCRIPTION .I pluginviewer can be used by a server administrator to troubleshoot SASL installations. The utility can list loadable (properly configured) client and server side plugins, as well as auxprop plugins. . .SH OPTIONS .TP .B -a List auxprop plugins. .TP .B -s List server authentication (SASL) plugins. .TP .B -c List client authentication (SASL) plugins. .TP .B -b min=N1,max=N2 List client authentication (SASL) plugins. Strength of the SASL security layer in bits. min=N1 specifies the minimum strength to use (1 => integrity protection). max=N2 specifies the maximum strength to use. Only SASL mechanisms which support security layer with strength M such that N1 <= M <= N2 will be shown. .TP .B -e ssf=N,id=ID Assume that an external security layer (e.g. TLS) with N-bit strength is installed. The ID is the authentication identity used by the external security layer. .TP .B -m MECHS Limit listed SASL plugins to the ones included in the MECHS (space separated) list. .TP .B -x AUXPROP_MECHS Limit listed auxprop plugins to the one listed in the AUXPROP_MECHS (space separated) list. .TP .B -f FLAGS Set security flags. FLAGS is a comma separated list of one or more of the following security flags: noplain (SASL mechanism doesn\'t send password in the clear during authentication), noactive (require protection from active attacks), nodict (require mechanisms which are secure against passive dictionary attacks), forwardsec (require forward secrecy), passcred (require mechanisms that can delegate client credentials), maximum (require all security flags). .TP .B -p PATH Specifies a colon-separated search path for plugins. .SH SEE ALSO .TP rfc4422 \- Simple Authentication and Security Layer (SASL) share/man/man3/sasl_client_start.3000064400000007170152342602460013071 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_CLIENT_START" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_client_start \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include int sasl_client_start(sasl_conn_t * conn, const char * mechlist, sasl_interact_t ** prompt_need, const char ** clientout, unsigned * clientoutlen, const char ** mech); .fi .SH DESCRIPTION .INDENT 0.0 .TP .B int sasl_client_start(sasl_conn_t * conn, .TP .B const char * mechlist, .TP .B sasl_interact_t ** prompt_need, .TP .B const char ** clientout, .TP .B unsigned * clientoutlen, .TP .B const char ** mech); \fBsasl_client_start()\fP selects a mechanism for authentication and starts the authentication session. The mechlist is the list of mechanisms the client might like to use. The mech‐ anisms in the list are not necessarily supported by the client or even valid. SASL determines which of these to use based upon the security preferences specified earlier. The list of mechanisms is typically a list of mechanisms the server supports acquired from a capability request. .sp If \fBSASL_INTERACT\fP is returned the library needs some values to be filled in before it can proceed. The \fIprompt_need\fP structure will be filled in with requests. The application should fulfill these requests and call sasl_client_start again with identical parameters (the \fIprompt_need\fP parameter will be the same pointer as before but filled in by the application). .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBconn\fP – is the SASL connection context .IP \(bu 2 \fBmechlist\fP – is a list of mechanisms the server has available. Punctuation is ignored. .IP \(bu 2 \fBprompt_need\fP – is filled in with a list of prompts needed to continue (if necessary). .IP \(bu 2 \fBclientout\fP – .sp is created. It is the initial client response to send to the server. It is the job of the client to send it over the network to the server. Any protocol specific encoding (such as base64 encoding) necessary needs to be done by the client. .sp If the protocol lacks client‐send‐first capability, then set clientout to NULL. .sp If there is no initial client‐send, then *clientout will be set to NULL on return. .IP \(bu 2 \fBclientoutlen\fP – length of \fIclientout\fP\&. .IP \(bu 2 \fBmech\fP – contains the name of the chosen SASL mechanism (on success) .UNINDENT .UNINDENT .UNINDENT .SH RETURN VALUE .sp SASL callback functions should return SASL return codes. See sasl.h for a complete list. \fBSASL_CONTINUE\fP indicates success and that there are more steps needed in the authentication. .sp Other return codes indicate errors and should either be handled or the authentication session should be quit. .SH SEE ALSO .sp \fI\%RFC 4422\fP,:saslman:\fIsasl(3)\fP, sasl_callbacks(3), sasl_client_init(3), sasl_client_new(3), sasl_client_step(3), sasl_errors(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_getpath_t.3000064400000003232152342602460012350 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_GETPATH_T" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_getpath_t \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include int sasl_getpath_t(void *context, char ** path); .fi .SH DESCRIPTION .INDENT 0.0 .TP .B int sasl_getpath_t(void *context, char **path); \fBsasl_getpath_t()\fP is used if the application wishes to use a different location for the SASL mechanism drivers (the shared library files). If this callback is not used SASL will either use the location in the environment variable SASL_PATH or \fI/usr/lib/sasl2\fP by default. .UNINDENT .SH RETURN VALUE .sp SASL callback functions should return SASL return codes. See sasl.h for a complete list. \fBSASL_OK\fP indicates success. .sp Other return codes indicate errors and should be handled. .SH SEE ALSO .sp \fI\%RFC 4422\fP,:saslman:\fIsasl(3)\fP, sasl_callbacks(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_getsecret_t.3000064400000003730152342602460012704 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_GETSECRET_T" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_getsecret_t \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include int sasl_getsecret_t(sasl_conn_t *conn, void *context, int id, sasl_secret_t ** psecret); .fi .SH DESCRIPTION .INDENT 0.0 .TP .B int sasl_getsecret_t(sasl_conn_t *conn, .TP .B void *context, .TP .B int id, .TP .B sasl_secret_t ** psecret); \fBsasl_getsecret_t()\fP is used to retrieve the secret from the application. A sasl_secret_t should be allocated to length \fIsizeof(sasl_secret_t) + \fP\&. It has two fields: \fIlen\fP which is the length of the secret in bytes and \fIdata\fP which contains the secret itself (does not need to be null terminated). .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBconn\fP – is the SASL connection context .UNINDENT .UNINDENT .UNINDENT .SH RETURN VALUE .sp SASL callback functions should return SASL return codes. See sasl.h for a complete list. \fBSASL_OK\fP indicates success. .sp Other return codes indicate errors and should be handled. .SH SEE ALSO .sp \fI\%RFC 4422\fP,:saslman:\fIsasl(3)\fP, sasl_callbacks(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_auxprop_request.3000064400000004153152342602460013642 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_AUXPROP_REQUEST" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_auxprop_request \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include int sasl_auxprop_request(sasl_conn_t *conn, const char ** propnames) .fi .SH DESCRIPTION .INDENT 0.0 .TP .B int sasl_auxprop_request(sasl_conn_t *conn, const char **propnames) \fBsasl_auxprop_request\fP will request that the SASL library obtain properties from any auxiliary property plugins that might be installed (such as the user’s home directory from an LDAP server for example). Such lookup occurs just after username canonicalization is complete. Therefore, the request should be made before the call to sasl_server_start(3), but after the call to sasl_server_new(3)\&. .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBconn\fP – the \fBsasl_conn_t\fP for which the request is being made. .IP \(bu 2 \fBpropnames\fP – a NULL\-terminated array of property names to request. Note that this array must persist until a call to sasl_dispose(3) on the \fBsasl_conn_t\fP\&. .UNINDENT .TP .B Returns Returns \fBSASL_OK\fP on success. See sasl_errors(3) for meanings of other return codes. .UNINDENT .UNINDENT .SH CONFORMING TO .sp \fI\%RFC 4422\fP .SH SEE ALSO .sp sasl(3), sasl_errors(3), sasl_auxprop(3), sasl_auxprop_getctx(3), sasl_server_new(3), sasl_server_start(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_callbacks.3000064400000006276152342602460012323 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_CALLBACKS" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_callbacks \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include .fi .SH DESCRIPTION .sp \fBsasl_callbacks\fP are used when the application needs some information from the application. Common reasons are getting for getting usernames and passwords. A client MUST specify what callbacks they support in the sasl_client_init(3)/sasl_server_init(3) or sasl_client_new(3)/sasl_server_new(3) calls. If an authentication mechanism needs a callback that the application does not state it supports it cannot be used. .sp If a callback has an id parameter that should be checked to make sure you are giving the appropriate value. .sp If an application is using the client side of the library functions to handle the callbacks are not necessary. Instead the application may deal with callbacks via SASL_INTERACT’s. See sasl_client_start(3)/sasl_client_step(3) for more information. .SS Common Callbacks .INDENT 0.0 .TP .B sasl_getopt_t Get an option value .TP .B sasl_log_t Log message handler .TP .B sasl_getpath_t Get path to search for plugins (e.g. SASL mechanisms) .TP .B sasl_verifyfile_t Verify files for use by SASL .TP .B sasl_canon_user_t(3) Username canonicalization function .UNINDENT .SS Client\-only Callbacks .INDENT 0.0 .TP .B sasl_getsimple_t Get user/language list .TP .B sasl_getsecret_t Get authentication secret .TP .B sasl_chalprompt_t(3) Display challenge and prompt for response .TP .B sasl_getrealm_t Get the realm for authentication .UNINDENT .SS Server\-only Callbacks .INDENT 0.0 .TP .B sasl_authorize_t(3) Authorize policy callback .TP .B sasl_server_userdb_checkpass_t verify plaintext password .TP .B sasl_server_userdb_setpass_t set plaintext password .TP .B sasl_getconfpath_t Get path to search for SASL configuration file (server side only). New in SASL 2.1.22. .UNINDENT .SH RETURN VALUE .sp SASL callback functions should return SASL return codes. See sasl_errors(3) for a complete list. \fBSASL_OK\fP typically indicates success. .SH CONFORMING TO .sp \fI\%RFC 4422\fP .SH SEE ALSO .sp sasl(3), sasl_errors(3), sasl_authorize_t(3), sasl_log_t(3), sasl_getpath_t(3), sasl_getconfpath_t(3), sasl_verifyfile_t(3), sasl_canon_user_t(3), sasl_getsimple_t(3), sasl_getsecret_t(3), sasl_chalprompt_t(3), sasl_getrealm_t(3), sasl_server_userdb_checkpass_t(3), sasl_server_userdb_setpass_t(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_setprop.3000064400000005130152342602460012064 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_SETPROP" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_setprop \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include int sasl_setprop(sasl_conn_t *conn, int propnum, const void * pvalue) .fi .SH DESCRIPTION .INDENT 0.0 .TP .B int sasl_setprop(sasl_conn_t *conn, .TP .B int propnum, .TP .B const void * pvalue) \fBsasl_setprop\fP sets the value of a SASL property. For example an application should tell the SASL library about any external negotiated security layer (i.e. TLS). .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBconn\fP – is the SASL connection context .IP \(bu 2 \fBpropnum\fP – is the identifier for the property requested .IP \(bu 2 \fBpvalue\fP – .sp contains a pointer to the data. It is the applications job to make sure this type is correct. This is an easy way to crash a program. .INDENT 2.0 .IP \(bu 2 SASL_AUTH_EXTERNAL ‐ external authentication ID (const char *) .IP \(bu 2 SASL_SSF_EXTERNAL ‐ external SSF active ‐‐ (sasl_ssf_t) .IP \(bu 2 SASL_DEFUSERREALM ‐ user realm (const char *) .IP \(bu 2 SASL_SEC_PROPS ‐ \fIsasl_security_properties_t\fP (may be freed after call) .IP \(bu 2 .INDENT 2.0 .TP .B SASL_IPLOCALPORT ‐ string describing the local ip and port in the form ”a.b.c.d;p”, or “e:f:g:h:i:j:k:l;port” .UNINDENT .IP \(bu 2 .INDENT 2.0 .TP .B SASL_IPREMOTEPORT ‐ string describing the remote ip and port in the form ”a.b.c.d;p”, or “e:f:g:h:i:j:k:l;port” .UNINDENT .UNINDENT .UNINDENT .UNINDENT .UNINDENT .SH RETURN VALUE .sp SASL callback functions should return SASL return codes. See sasl.h for a complete list. \fBSASL_OK\fP indicates success. .sp Other return codes indicate errors and should be handled. .SH SEE ALSO .sp \fI\%RFC 4422\fP,:saslman:\fIsasl(3)\fP, sasl_errors(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_decode.3000064400000004607152342602460011623 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_DECODE" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_decode \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include int sasl_decode(sasl_conn_t *conn, const char * input, unsigned inputlen, const char ** output, unsigned * outputlen); .fi .SH DESCRIPTION .INDENT 0.0 .TP .B int sasl_decode(sasl_conn_t *conn, .TP .B const char * input, .TP .B unsigned inputlen, .TP .B const char ** output, .TP .B unsigned * outputlen); \fBsasl_decode\fP decodes data received. After successful authentication this function should be called on all data received. It decodes the data from encrypted or signed form to plain data. If there was no security layer negotiated the \fIoutput\fP is identical to the \fIinput\fP\&. .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBconn\fP – is the SASL connection context .IP \(bu 2 \fBoutput\fP – contains the decoded data and is allocated/freed by the library. .IP \(bu 2 \fBoutputlen\fP – length of \fIoutput\fP\&. .UNINDENT .UNINDENT .sp One should not give sasl_decode more data than the negotiated \fImaxbufsize\fP (see sasl_getprop(3)). .sp Note that sasl_decode can succeed and outputlen can be zero. If this is the case simply wait for more data and call sasl_decode again. .UNINDENT .SH RETURN VALUE .sp SASL callback functions should return SASL return codes. See sasl.h for a complete list. \fBSASL_OK\fP indicates success. .sp Other return codes indicate errors and should be handled. .SH SEE ALSO .sp \fI\%RFC 4422\fP,:saslman:\fIsasl(3)\fP, sasl_encode(3), sasl_errors(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_auxprop.3000064400000022323152342602460012071 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_AUXPROP" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_auxprop \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include 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) .fi .SH DESCRIPTION .sp 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 allows the two to cooperate, and only results in a single query against the LDAP server (or other property sources). .sp Property lookups take place directly after user canonicalization occurs. 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 below, however, require a property context which can be obtained by calling sasl_auxprop_getctx(3)\&. .SH API DESCRIPTION .INDENT 0.0 .TP .B struct \fI\%propctx\fP *prop_new(unsigned estimate) Create a new property context. Probably unnecessary for application developers to call this at any point. .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBestimate\fP – is the estimate of storage needed in total for requests & responses. A value of 0 implies the library default. .UNINDENT .TP .B Returns a new property context: \fI\%propctx\fP .UNINDENT .UNINDENT .INDENT 0.0 .TP .B int prop_dup(struct \fI\%propctx\fP *src_ctx, struct \fI\%propctx\fP *dst_ctx) Duplicate a given property context. .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBsrc_ctx\fP (\fI\%propctx\fP) – Property context to copy. .IP \(bu 2 \fBdst_ctx\fP (\fI\%propctx\fP) – Destination context to copy into. .UNINDENT .TP .B Returns SASL error code. .UNINDENT .UNINDENT .INDENT 0.0 .TP .B int prop_request(struct \fI\%propctx\fP *ctx, const char **names) Add properties to the request list of a given context. .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBctx\fP (\fI\%propctx\fP) – The property context to add add the request list to. .IP \(bu 2 \fBnames\fP – 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 \fI\%prop_dispose()\fP\&. .UNINDENT .TP .B Returns SASL error code .UNINDENT .UNINDENT .INDENT 0.0 .TP .B const struct \fI\%propval\fP *prop_get(struct \fI\%propctx\fP *ctx) Fetch out the property values from a context. .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBctx\fP (\fI\%propctx\fP) – The property context to fetch from. .UNINDENT .TP .B Returns a NULL\-terminated array of property values from the given context. .UNINDENT .UNINDENT .INDENT 0.0 .TP .B int prop_getnames(struct \fI\%propctx\fP *ctx, const char **names, struct \fI\%propval\fP *vals) Fill in a (provided) array of property values based on a list of property names. This implies that the \fBvals\fP array is at least as long as the \fBnames\fP array. The values that are filled in by this call persist until next call to \fI\%prop_request()\fP, \fI\%prop_clear()\fP, or \fI\%prop_dispose()\fP on context. If a name specified here was never requested, then its associated values entry will be set to NULL. .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBctx\fP (\fI\%propctx\fP) – The property context to fill in. .UNINDENT .TP .B Returns number of matching properties that were found, or a SASL error code. .UNINDENT .UNINDENT .INDENT 0.0 .TP .B void prop_clear(struct \fI\%propctx\fP *ctx, int requests) Clear values and (optionally) requests from a property context. .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBctx\fP (\fI\%propctx\fP) – The property context to clear. .IP \(bu 2 \fBrequests\fP – set to 1 if the requests should be cleared, 0 otherwise. .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B void prop_erase(struct \fI\%propctx\fP *ctx, const char *name) Securely erase the value of a property from a context. .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBctx\fP (\fI\%propctx\fP) – The property context to find the property in. .IP \(bu 2 \fBname\fP – is the name of the property to erase. .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B void prop_dispose(struct \fI\%propctx\fP **ctx) Disposes of a property context and NULLifys the pointer. .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBctx\fP (\fI\%propctx\fP) – The property context to clear. .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B int prop_format(struct \fI\%propctx\fP *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 (\fIonly by auxprop plugins\fP). .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBctx\fP (\fI\%propctx\fP) – The property context to extract values from. .IP \(bu 2 \fBsep\fP – the separator to use for the string .IP \(bu 2 \fBoutbuf\fP – destination string. Caller must allocate the buffer of length \fBoutmax\fP (including NUL terminator). .IP \(bu 2 \fBoutlen\fP – if non\-NULL, will contain the length of the resulting string (excluding NUL terminator). .UNINDENT .TP .B Returns SASL error code. .UNINDENT .UNINDENT .INDENT 0.0 .TP .B int prop_set(struct \fI\%propctx\fP *ctx, const char *name, const char *value, int vallen) Adds a property value to the context. \fIThis is intended for use by auxprop plugins only.\fP .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBctx\fP (\fI\%propctx\fP) – The property context to add a value to. .IP \(bu 2 \fBname\fP – 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 \fI\%prop_set()\fP or \fI\%prop_setvals()\fP\&. .IP \(bu 2 \fBvalue\fP – the new value (of length \fIvallen\fP) .IP \(bu 2 \fBvallen\fP – the length of the string \fIvalue\fP\&. .UNINDENT .TP .B Returns SASL error code .UNINDENT .UNINDENT .INDENT 0.0 .TP .B int prop_setvals(struct \fI\%propctx\fP *ctx, const char *name, const char **values) Adds multiple values to a single property. \fIThis is intended for use by auxprop plugins only\fP\&. .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBctx\fP (\fI\%propctx\fP) – The property context to add values to. .IP \(bu 2 \fBname\fP – The name of the property to receive the new value, or NULL, which implies that the values will be added to the same property as the last call to either \fI\%prop_set()\fP or \fI\%prop_setvals()\fP\&. .IP \(bu 2 \fBvalues\fP – A NULL\-terminated array of values to be added the property. .UNINDENT .TP .B Returns SASL error code .UNINDENT .UNINDENT .SH DATA STRUCTURES .INDENT 0.0 .TP .B type propval A struct holding a name and its property values. A name can have zero or more values. .INDENT 7.0 .TP .B Param name \fBconst char *\fP\&. Name of this propval. NULL means end of list. .TP .B Param values \fBconst char **\fP\&. List of string values. If property not found, values == NULL. If property found with no values, then *values == NULL .UNINDENT .UNINDENT .INDENT 0.0 .TP .B type propctx A property context. .INDENT 7.0 .TP .B Param values List of property values in this context. .TP .B Type values \fI\%propval\fP * .UNINDENT .UNINDENT .SH RETURN VALUE .sp The property functions that return an int return SASL error codes. See sasl_errors(3)\&. Those that return pointers will return a valid pointer on success, or NULL on any error. .SH CONFORMING TO .sp \fI\%RFC 4422\fP .SH SEE ALSO .sp sasl(3), sasl_errors(3), sasl_auxprop_request(3), sasl_auxprop_getctx(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_checkpass.3000064400000004007152342602460012336 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_CHECKPASS" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_checkpass \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include int sasl_checkpass(sasl_conn_t *conn, const char *user, unsigned userlen, const char *pass, unsigned passlen); .fi .SH DESCRIPTION .INDENT 0.0 .TP .B int sasl_checkpass(sasl_conn_t *conn, .TP .B const char *user, .TP .B unsigned userlen, .TP .B const char *pass, .TP .B unsigned passlen) \fBsasl_checkpass\fP will check a plaintext password. This is needed for protocols that had a login method before SASL (for example the LOGIN command in IMAP). The password is checked with the pwcheck_method. See sasl_callbacks(3) for information on how this parameter is set. .UNINDENT .SH RETURN VALUE .sp sasl_checkpass returns an integer which corresponds to one of the following codes. \fBSASL_OK\fP indicates that the authentication is complete. All other return codes indicate errors and should either be handled or the authentication session should be quit. See sasl_errors(3) for meanings of return codes. .SH CONFORMING TO .sp \fI\%RFC 4422\fP .SH SEE ALSO .sp sasl(3), sasl_errors(3), sasl_callbacks(3), sasl_setpass(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_user_exists.3000064400000003626152342602460012755 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_USER_EXISTS" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_user_exists \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include int sasl_user_exists( sasl_conn_t *conn, const char *service, const char *user_realm, const char *user) .fi .SH DESCRIPTION .INDENT 0.0 .TP .B int sasl_user_exists( sasl_conn_t *conn, .TP .B const char *service, .TP .B const char *user_realm, .TP .B const char *user) \fBsasl_user_exists\fP will check if a user exists on the server. .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBconn\fP – the SASL context for this connection .IP \(bu 2 \fBservice\fP – Service name or NULL (for service name of connection context) .IP \(bu 2 \fBuser_realm\fP – Realm to check in or NULL (for default realm) .IP \(bu 2 \fBuser\fP – User name to check for existence. .UNINDENT .UNINDENT .UNINDENT .SH RETURN VALUE .sp SASL functions should return SASL return codes. See sasl.h for a complete list. \fBSASL_OK\fP indicates success. .SH SEE ALSO .sp \fI\%RFC 4422\fP,:saslman:\fIsasl(3)\fP,:saslman:\fIsasl_errors(3)\fP .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_errors.3000064400000006711152342602460011712 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_ERRORS" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_errors \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include .fi .SH DESCRIPTION .sp The following are the general error codes that may be returned by calls into the SASL library, and their meanings (that may vary slightly based on context). .SS Common Result Codes .INDENT 0.0 .TP .B SASL_OK Success .UNINDENT .INDENT 0.0 .TP .B SASL_CONTINUE Another step is needed in authentication .UNINDENT .INDENT 0.0 .TP .B SASL_FAIL Generic Failure .UNINDENT .INDENT 0.0 .TP .B SASL_NOMEM Memory shortage failure .UNINDENT .INDENT 0.0 .TP .B SASL_BUFOVER Overflowed buffer .UNINDENT .INDENT 0.0 .TP .B SASL_NOMECH Mechanism not supported / No mechanisms matched requirements .UNINDENT .INDENT 0.0 .TP .B SASL_BADPROT Bad / Invalid Protocol or Protocol cancel .UNINDENT .INDENT 0.0 .TP .B SASL_NOTDONE Cannot request information / Not applicable until later in exchange .UNINDENT .INDENT 0.0 .TP .B SASL_BADPARAM Invalid Parameter Supplied .UNINDENT .INDENT 0.0 .TP .B SASL_TRYAGAIN Transient Failure (e.g. weak key) .UNINDENT .INDENT 0.0 .TP .B SASL_BADMAC Integrity Check Failed .UNINDENT .INDENT 0.0 .TP .B SASL_NOTINIT SASL library not initialized .UNINDENT .SS Client\-only Result Codes .INDENT 0.0 .TP .B SASL_INTERACT Needs user interaction .UNINDENT .INDENT 0.0 .TP .B SASL_BADSERV Server failed mutual authentication step .UNINDENT .INDENT 0.0 .TP .B SASL_WRONGMECH Mechanism does not support requested feature .UNINDENT .SS Server\-only Result Codes .INDENT 0.0 .TP .B SASL_BADAUTH Authentication Failure .UNINDENT .INDENT 0.0 .TP .B SASL_NOAUTHZ Authorization Failure .UNINDENT .INDENT 0.0 .TP .B SASL_TOOWEAK Mechanism too weak for this user .UNINDENT .INDENT 0.0 .TP .B SASL_ENCRYPT Encryption needed to use mechanism .UNINDENT .INDENT 0.0 .TP .B SASL_TRANS One time use of a plaintext password will enable requested mechanism for user .UNINDENT .INDENT 0.0 .TP .B SASL_EXPIRED Passphrase expired, must be reset .UNINDENT .INDENT 0.0 .TP .B SASL_DISABLED Account Disabled .UNINDENT .INDENT 0.0 .TP .B SASL_NOUSER User Not Found .UNINDENT .INDENT 0.0 .TP .B SASL_BADVERS Version mismatch with plug\-in .UNINDENT .INDENT 0.0 .TP .B SASL_NOVERIFY User exists, but no verifier for user .UNINDENT .SS Password Setting Result Codes .INDENT 0.0 .TP .B SASL_PWLOCK Passphrase locked .UNINDENT .INDENT 0.0 .TP .B SASL_NOCHANGE Requested change was not needed .UNINDENT .INDENT 0.0 .TP .B SASL_WEAKPASS Passphrase is too week for security policy. .UNINDENT .INDENT 0.0 .TP .B SASL_NOUSERPASS User supplied passwords are not permitted .UNINDENT .SH CONFORMING TO .sp \fI\%RFC 4422\fP .SH SEE ALSO .sp sasl(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_getrealm_t.3000064400000004255152342602460012522 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_GETREALM_T" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_getrealm_t \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include int sasl_getrealm_t(void *context, int id, const char **availrealms, const char **result) .fi .SH DESCRIPTION .INDENT 0.0 .TP .B int sasl_getrealm_t(void *context, .TP .B int id, .TP .B const char **availrealms, .TP .B const char **result) \fBsasl_getrealm_t()\fP is used when there is an interaction with SASL_CB_GETREALM as the type. .sp If a mechanism would use this callback, but it is not present, then the first realm listed is automatically selected. (Note that a mechanism may still force the existence of a getrealm callback by SASL_CB_GETREALM to its required_prompts list). .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBcontext\fP – context from the callback record .IP \(bu 2 \fBid\fP – callback ID (SASL_CB_GETREALM) .IP \(bu 2 \fBavailrealms\fP – A string list of the available realms. NULL terminated, may be empty. .IP \(bu 2 \fBresult\fP – The chosen realm. (a NUL terminated string) .UNINDENT .UNINDENT .UNINDENT .SH RETURN VALUE .sp SASL callback functions should return SASL return codes. See sasl.h for a complete list. \fBSASL_OK\fP indicates success. .sp Other return codes indicate errors and should be handled. .SH SEE ALSO .sp \fI\%RFC 4422\fP,:saslman:\fIsasl(3)\fP, sasl_callbacks(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_encodev.3000064400000005647152342602460012030 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_ENCODEV" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_encodev \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include int sasl_encode(sasl_conn_t *conn, const char * input, unsigned inputlen, const char ** output, unsigned * outputlen); int sasl_encodev(sasl_conn_t *conn, const struct iovec * invec, unsigned numiov, const char ** output, unsigned * outputlen); .fi .SH DESCRIPTION .sp \fBsasl_encode\fP encodes data to be sent to be sent to a remote host who we’ve had a successful authentication session with. If there is a negotiated security the data in signed/encrypted and the output should be sent without modification to the remote host. If there is no security layer the output is identical to the input. .sp \fBsasl_encodev\fP does the same, but for a \fIstruct iovec\fP instead of a character buffer. .INDENT 0.0 .TP .B int sasl_encode(sasl_conn_t *conn, .TP .B const char * input, .TP .B unsigned inputlen, .TP .B const char ** output, .TP .B unsigned * outputlen); .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBconn\fP – is the SASL connection context .IP \(bu 2 \fBoutput\fP – contains the decoded data and is allocated/freed by the library. .IP \(bu 2 \fBoutputlen\fP – length of \fIoutput\fP\&. .UNINDENT .UNINDENT .INDENT 7.0 .TP .B int sasl_encodev(sasl_conn_t *conn, .TP .B const struct iovec * invec, .TP .B unsigned numiov, .TP .B const char ** output, .TP .B unsigned * outputlen); .UNINDENT .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBconn\fP – is the SASL connection context .IP \(bu 2 \fBoutput\fP – contains the decoded data and is allocated/freed by the library. .IP \(bu 2 \fBoutputlen\fP – length of \fIoutput\fP\&. .UNINDENT .UNINDENT .UNINDENT .SH RETURN VALUE .sp SASL callback functions should return SASL return codes. See sasl.h for a complete list. \fBSASL_OK\fP indicates success. .sp Other return codes indicate errors and should be handled. .SH SEE ALSO .sp \fI\%RFC 4422\fP,:saslman:\fIsasl(3)\fP, sasl_decode(3), sasl_errors(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_log_t.3000064400000003015152342602460011474 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_LOG_T" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_log_t \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include int sasl_log_t(void *context, int level, const char * message); .fi .SH DESCRIPTION .INDENT 0.0 .TP .B int sasl_log_t(void *context, .TP .B int level, .TP .B const char * message); .INDENT 7.0 .TP \fBsasl_log_t\fP is used to log warning/error messages from the SASL library. If not specified \fBsyslog\fP will be used. .UNINDENT .UNINDENT .SH RETURN VALUE .sp SASL callback functions should return SASL return codes. See sasl.h for a complete list. \fBSASL_OK\fP indicates success. .SH SEE ALSO .sp \fI\%RFC 4422\fP,:saslman:\fIsasl(3)\fP, sasl_callbacks(3), sasl_errors(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_idle.3000064400000002725152342602460011314 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_IDLE" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_idle \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include int sasl_idle( sasl_conn_t *conn) .fi .SH DESCRIPTION .INDENT 0.0 .TP .B int sasl_idle(sasl_conn_t *conn) \fBsasl_idle()\fP may be called during an idle period to allow the SASL library or any mechanisms to perform any necessary precalculation. .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBconn\fP – may be NULL to do precalculation prior to a connection taking place. .UNINDENT .UNINDENT .UNINDENT .SH RETURN VALUE .sp Returns 1 if action was taken, 0 if no action was taken. .SH SEE ALSO .sp \fI\%RFC 4422\fP,:saslman:\fIsasl(3)\fP .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_global_listmech.3000064400000002715152342602460013526 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_GLOBAL_LISTMECH" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_global_listmech \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include const char ** sasl_global_listmech(); .fi .SH DESCRIPTION .INDENT 0.0 .TP .B const char **sasl_global_listmech(); \fBsasl_global_listmech\fP returns a null‐terminated array of strings that lists all mechanisms that are loaded by either the client or server side of the library. .UNINDENT .SH RETURN VALUE .sp Returns a pointer to the array on success. NULL on failure (sasl library uninitialized). .SH SEE ALSO .sp \fI\%RFC 4422\fP,:saslman:\fIsasl(3)\fP, sasl_server_init(3), sasl_listmech(3), sasl_client_init(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_setpass.3000064400000005021152342602460012051 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_SETPASS" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_setpass \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include int sasl_setpass(sasl_conn_t *conn, const char *user, const char *pass, unsigned passlen, const char *oldpass, unsigned oldpasslen, unsigned flags) .fi .SH DESCRIPTION .INDENT 0.0 .TP .B int sasl_setpass(sasl_conn_t *conn, .TP .B const char *user, .TP .B const char *pass, unsigned passlen, .TP .B const char *oldpass, unsigned oldpasslen, .TP .B unsigned flags) \fBsasl_setpass\fP will set passwords in the sasldb, and trigger the setpass callbacks for all available mechanisms. .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBconn\fP – is the SASL connection context .IP \(bu 2 \fBuser\fP – is the username to set the password for .IP \(bu 2 \fBpass\fP – the password to set .IP \(bu 2 \fBpasslen\fP – length of the password to set (\fIpass\fP) .IP \(bu 2 \fBoldpass\fP – optional. The old password. .IP \(bu 2 \fBoldpasslen\fP – optional. The old password length. .IP \(bu 2 \fBflags\fP – .sp are flags including \fISASL_SET_CREATE\fP and \fISASL_SET_DISABLE\fP (to cause the creating of nonexistent accounts and the disabling of an account, respectively) .sp \fIoldpass\fP and \fIoldpasslen\fP are unused in the Cyrus SASL implementation, though are passed on to any mechanisms that may require them. .UNINDENT .UNINDENT .UNINDENT .SH RETURN VALUE .sp SASL callback functions should return SASL return codes. See sasl.h for a complete list. \fBSASL_OK\fP indicates success. .sp Other return codes indicate errors and should be handled. .SH SEE ALSO .sp \fI\%RFC 4422\fP,:saslman:\fIsasl(3)\fP, sasl_errors(3), sasl_checkpass(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_errstring.3000064400000004243152342602460012413 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_ERRSTRING" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_errstring \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include const char * sasl_errstring(int saslerr, const char * langlist, const char ** outlang); .fi .SH DESCRIPTION .INDENT 0.0 .TP .B const char * sasl_errstring(int saslerr, .TP .B const char * langlist, .TP .B const char ** outlang); \fBsasl_errstring\fP is called to convert a SASL return code (an integer) into a human readable string. At this time the only language available is American English. Note that if the string is going to be sent to the client, a server should call sasl_usererr(3) on a return code first. .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBsaslerr\fP – specifies the error number to convert. .IP \(bu 2 \fBlanglist\fP – is currently unused; Use NULL. .IP \(bu 2 \fBoutlang\fP – specifies the desired \fI\%RFC 1766\fP language for output. NULL defaults to “en‐us”; currently the only supported language. .UNINDENT .UNINDENT .sp This function is not the recommended means of extracting error code information from SASL, instead application should use sasl_errdetail(3), which contains this information (and more). .UNINDENT .SH RETURN VALUE .sp Returns the string. If langlist is NULL, US‐ASCII is used. .SH SEE ALSO .sp \fI\%RFC 4422\fP,:saslman:\fIsasl(3)\fP, sasl_errdetail(3), sasl_errors(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_server_init.3000064400000004373152342602460012731 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_SERVER_INIT" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_server_init \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include int sasl_server_init(const sasl_callback_t *callbacks, const char *appname); .fi .SH DESCRIPTION .INDENT 0.0 .TP .B int sasl_server_init(const sasl_callback_t *callbacks, .TP .B const char *appname); \fBsasl_server_init()\fP initializes SASL. It must be called before any calls to sasl_server_start, and only once per process. This call initializes all SASL mechanism drivers (e.g. authentication mechanisms). These are usually found in the /usr/lib/sasl2 directory but the directory may be overridden with the SASL_PATH environment variable (or at compile time). .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBcallbacks\fP – specifies the base callbacks for all client connections. See the sasl_callbacks(3) man page for more information. .IP \(bu 2 \fBappname\fP – is the name of the application. It is used to find the default configuration file. .UNINDENT .UNINDENT .UNINDENT .SH RETURN VALUE .sp SASL callback functions should return SASL return codes. See sasl.h for a complete list. \fBSASL_OK\fP indicates success. .sp Other return codes indicate errors and should either be handled or the authentication session should be quit. .SH SEE ALSO .sp \fI\%RFC 4422\fP,:saslman:\fIsasl(3)\fP, sasl_callbacks(3), sasl_server_new(3), sasl_server_start(3), sasl_server_step(3), sasl_errors(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_chalprompt_t.3000064400000004136152342602460013071 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_CHALPROMPT_T" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_chalprompt_t \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include int sasl_chalprompt_t(void *context, int id, const char *challenge, const char *prompt, const char *defresult, const char **result, unsigned *len) .fi .SH DESCRIPTION .INDENT 0.0 .TP .B int sasl_chalprompt_t(void *context, .TP .B int id, .TP .B const char *challenge, .TP .B const char *prompt, .TP .B const char *defresult, .TP .B const char **result, .TP .B unsigned *len) \fBsasl_chalprompt_t\fP is used to prompt for input in response to a server challenge. .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBcontext\fP – is the context from the callback record .IP \(bu 2 \fBid\fP – is the callback id (either SASL_CB_ECHOPROMPT or SASL_CB_NOECHOPROMPT) .IP \(bu 2 \fBchallenge\fP – the server’s challenge .IP \(bu 2 \fBprompt\fP – A prompt for the user .IP \(bu 2 \fBdefresult\fP – Default result (may be NULL) .IP \(bu 2 \fBlen\fP – Length of the user’s response. .UNINDENT .TP .B Result The user’s response (a NUL terminated string) or SASL error code. .UNINDENT .UNINDENT .SH RETURN VALUE .sp The user’s response (NUL terminated), or a SASL error code. See sasl_errors(3)\&. .SH SEE ALSO .sp sasl(3), sasl_errors(3), sasl_callbacks(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_dispose.3000064400000003215152342602460012040 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_DISPOSE" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_dispose \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include void sasl_dispose(sasl_conn_t **pconn ); .fi .SH DESCRIPTION .INDENT 0.0 .TP .B int sasl_encode(sasl_conn_t *conn, .TP .B const char * input, .TP .B unsigned inputlen, .TP .B const char ** output, .TP .B unsigned * outputlen); \fBsasl_dispose\fP is called when a SASL connection object is no longer needed. .sp Note that this is usually when the protocol session is done NOT when the authentication is done since a security layer may have been negotiated. .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBconn\fP – is the SASL connection context .UNINDENT .UNINDENT .UNINDENT .SH RETURN VALUE .sp No return values .SH CONFORMING TO .sp \fI\%RFC 4422\fP .SH SEE ALSO .sp sasl(3), sasl_server_new(3), sasl_client_new(3), .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl.3000064400000004404152342602460010313 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH DESCRIPTION .sp The CMU Cyrus SASL library is a general purpose authentication library for sever and client applications. .sp \fBSystem Administrators\fP .sp For information on setting up/configuring the SASL library see the System Administrators Guide: \fI\%https://www.cyrusimap.org/sasl/sasl/sysadmin.html\fP .sp \fBProgrammers\fP .sp See man pages for individual sasl functions or the Programmers Guide in the doc/ directory of the SASL distribution. .sp Conforming to \fI\%RFC 2222\fP .SH SEE ALSO .sp sasl_authorize_t(3), sasl_auxprop(3), sasl_auxprop_getctx(3), sasl_auxprop_request(3), sasl_canon_user_t(3), sasl_callbacks(3), sasl_chalprompt_t(3), sasl_checkapop(3), sasl_checkpass(3), sasl_client_init(3), sasl_client_new(3), sasl_client_start(3), sasl_client_step(3), sasl_decode(3), sasl_dispose(3), sasl_done(3), sasl_encode(3), sasl_encodev(3), sasl_errdetail(3), sasl_errors(3), sasl_errstring(3), sasl_errors(3), sasl_getopt_t(3), sasl_getpath_t(3), sasl_getprop(3), sasl_getrealm_t(3), sasl_getsecret_t(3), sasl_getsimple_t(3), sasl_idle(3), sasl_listmech(3), sasl_log_t(3), sasl_server_init(3), sasl_server_new(3), sasl_server_start(3), sasl_server_step(3), sasl_server_userdb_checkpass_t(3), sasl_server_userdb_setpass_t(3), sasl_setpass(3), sasl_setprop(3), sasl_user_exists(3), sasl_verifyfile_t(3), sasl_global_listmech(3) .SH REFERENCED BY .sp ldap.conf(5), overload(3), sasl_getconfpath_t(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_getsimple_t.3000064400000004316152342602460012711 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_GETSIMPLE_T" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_getsimple_t \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include int sasl_getsimple_t(void *context, int id, const char ** result, unsigned * len); .fi .SH DESCRIPTION .INDENT 0.0 .TP .B int sasl_getsimple_t(void *context, .TP .B int id, .TP .B const char ** result, .TP .B unsigned * len); \fBsasl_getsimple_t\fP is used to retrieve simple things from the application. In practice this is authentication name, authorization name, and realm. .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBcontext\fP – SASL connection context .IP \(bu 2 \fBid\fP – .sp indicates which value is being requested. Possible values include: .INDENT 2.0 .IP \(bu 2 SASL_CB_USER ‐ Client user identity to login as .IP \(bu 2 SASL_CB_AUTHNAME ‐ Client authentication name .IP \(bu 2 SASL_CB_LANGUAGE ‐ Comma‐separated list of \fI\%RFC 1766\fP languages .IP \(bu 2 SASL_CB_CNONCE ‐ Client‐nonce (for testing mostly) .UNINDENT .IP \(bu 2 \fBresult\fP – value of the item requested .IP \(bu 2 \fBlen\fP – lenth of the result .UNINDENT .UNINDENT .UNINDENT .SH RETURN VALUE .sp SASL callback functions should return SASL return codes. See sasl.h for a complete list. \fBSASL_OK\fP indicates success. .SH SEE ALSO .sp \fI\%RFC 4422\fP,:saslman:\fIsasl(3)\fP, sasl_callbacks(3), sasl_errors(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_client_init.3000064400000003703152342602460012675 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_CLIENT_INIT" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_client_init \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include int sasl_client_init(const sasl_callback_t *callbacks ) .fi .SH DESCRIPTION .sp \fBsasl_client_init\fP initializes SASL. .sp It must be called before any calls to sasl_client_start(3)\&. This call initializes all SASL client drivers (e.g. authentication mechanisms). These are usually found in the \fI/usr/lib/sasl2\fP directory but the directory may be overridden with the \fISASL_PATH\fP environment variable. .SH RETURN VALUE .sp SASL callback functions should return SASL return codes. See sasl.h for a complete list. \fBSASL_OK\fP indicates success. .sp The following return codes indicate errors and should either be handled or the authentication session should be quit: .INDENT 0.0 .IP \(bu 2 \fBSASL_BADVERS\fP: Mechanism version mismatch .IP \(bu 2 \fBSASL_BADPARAM\fP: Error in config file .IP \(bu 2 \fBSASL_NOMEM\fP: Not enough memory to complete operation .UNINDENT .SH SEE ALSO .sp \fI\%RFC 4422\fP,:saslman:\fIsasl(3)\fP, sasl_callbacks(3), sasl_client_new(3), sasl_client_start(3), sasl_client_step(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_verifyfile_t.3000064400000004401152342602460013057 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_VERIFYFILE_T" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_verifyfile_t \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include typedef enum { SASL_VRFY_PLUGIN, /* a DLL/shared library plugin */ SASL_VRFY_CONF, /* a configuration file */ SASL_VRFY_PASSWD, /* a password storage file */ SASL_VRFY_OTHER /* some other file type */ } sasl_verify_type_t int sasl_verifyfile_t(void *context, const char *file, sasl_verify_type_t type) .fi .SH DESCRIPTION .INDENT 0.0 .TP .B int sasl_verifyfile_t(void *context, .TP .B const char *file, .TP .B sasl_verify_type_t type) \fBsasl_verifyfile_t()\fP is used to check whether a given file is okay for use by the SASL library. This is intended to allow applications to sanity check the environment. For example, to ensure that plugins or the config file cannot be written to. .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBcontext\fP – context from the callback record .IP \(bu 2 \fBcontext\fP – context from the callback record .IP \(bu 2 \fBfile\fP – full path of the file to verify .IP \(bu 2 \fBtype\fP – type of the file. .UNINDENT .UNINDENT .UNINDENT .SH RETURN VALUE .sp SASL callback functions should return SASL return codes. See sasl.h for a complete list. \fBSASL_OK\fP indicates success. .sp Other return codes indicate errors and should be handled. .SH SEE ALSO .sp \fI\%RFC 4422\fP,:saslman:\fIsasl(3)\fP, sasl_callbacks(3) sasl_errors(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_getconfpath_t.3000064400000003253152342602460013221 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_GETCONFPATH_T" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_getconfpath_t \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include int sasl_getconfpath_t(void *context, char ** path); .fi .SH DESCRIPTION .INDENT 0.0 .TP .B int sasl_getconfpath_t(void *context, char **path); \fBsasl_getconfpath_t()\fP is used if the application wishes to use a different location for the SASL configuration files. If this callback is not used SASL will either use the location in the environment variable SASL_CONF_PATH (provided we are not SUID or SGID) or \fI/etc/sasl2\fP by default. .UNINDENT .SH RETURN VALUE .sp SASL callback functions should return SASL return codes. See sasl.h for a complete list. \fBSASL_OK\fP indicates success. .sp Other return codes indicate errors and should be handled. .SH SEE ALSO .sp \fI\%RFC 4422\fP,:saslman:\fIsasl(3)\fP, sasl_callbacks(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_client_new.3000064400000007550152342602460012527 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_CLIENT_NEW" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_client_new \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include int sasl_client_new(const char *service, const char *serverFQDN, const char *iplocalport, const char *ipremoteport, const sasl_callback_t *prompt_supp, unsigned flags, sasl_conn_t ** pconn); .fi .SH DESCRIPTION .INDENT 0.0 .TP .B int sasl_client_new(const char *service, .TP .B const char *serverFQDN, .TP .B const char *iplocalport, .TP .B const char *ipremoteport, .TP .B const sasl_callback_t *prompt_supp, .TP .B unsigned flags, .TP .B sasl_conn_t ** pconn); \fBsasl_client_new()\fP creates a new SASL context. This context will be used for all SASL calls for one connection. It handles both authentication and integrity/encryption layers after authentication. .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBservice\fP – the registered name of the service (usually the protocol name) using SASL (e.g. “imap”). .IP \(bu 2 \fBserverFQDN\fP – the fully qualified domain name of the server (e.g. “serverhost.example.com”). .IP \(bu 2 \fBiplocalport\fP – the IP and port of the local side of the connection, or NULL. If iplocalport is NULL it will disable mechanisms that require IP address information. This string must be in one of the following formats: “a.b.c.d;port” (IPv4), “e:f:g:h:i:j:k:l;port” (IPv6), or “e:f:g:h:i:j:a.b.c.d;port” (IPv6) .IP \(bu 2 \fBipremoteport\fP – the IP and port of the remote side of the connection, or NULL (see iplocalport) .IP \(bu 2 \fBprompt_supp\fP – a list of client interactions supported that is unique to this connection. If this parameter is NULL the global callbacks (specified in sasl_client_init(3)) will be used. See sasl_callbacks(3) for more information. .IP \(bu 2 \fBflags\fP – are connection flags (see below) .IP \(bu 2 \fBpconn\fP – the connection context allocated by the library. This structure will be used for all future SASL calls for this connection. .UNINDENT .UNINDENT .UNINDENT .SS Connection Flags .sp Flags that may be passed to \fBsasl_client_new()\fP: .INDENT 0.0 .IP \(bu 2 \fISASL_SUCCESS_DATA\fP: The protocol supports a server‐last send .IP \(bu 2 .INDENT 2.0 .TP .B \fISASL_NEED_PROXY\fP: Force the use of a mechanism that supports an authorization id that is not the authentication id. .UNINDENT .UNINDENT .SH RETURN VALUE .sp SASL callback functions should return SASL return codes. See sasl.h for a complete list. \fBSASL_OK\fP indicates success. .sp The following return codes indicate errors and should either be handled or the authentication session should be quit: .INDENT 0.0 .IP \(bu 2 \fBSASL_NOMECH\fP: No mechanism meets requested properties .IP \(bu 2 \fBSASL_BADPARAM\fP: Error in config file .IP \(bu 2 \fBSASL_NOMEM\fP: Not enough memory to complete operation .UNINDENT .SH SEE ALSO .sp \fI\%RFC 4422\fP,:saslman:\fIsasl(3)\fP, sasl_callbacks(3), sasl_client_init(3), sasl_client_start(3), sasl_client_step(3), sasl_setprop(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_getprop.3000064400000005663152342602460012063 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_GETPROP" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_getprop \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include int sasl_getprop(sasl_conn_t *conn, int propnum, const void ** pvalue); .fi .SH DESCRIPTION .INDENT 0.0 .TP .B int sasl_getprop(sasl_conn_t *conn, .TP .B int propnum, .TP .B const void ** pvalue); \fBsasl_getprop\fP gets the value of a SASL property. For example after successful authentication a server may wish to know the authorization name. Or a client application may wish to know the strength of the negotiated security layer. .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBconn\fP – is the SASL connection context .IP \(bu 2 \fBpropnum\fP – is the identifier for the property requested .IP \(bu 2 \fBpvalue\fP – .sp is filled on success. List of properties: .INDENT 2.0 .IP \(bu 2 SASL_USERNAME ‐ pointer to NUL terminated user name .IP \(bu 2 .INDENT 2.0 .TP .B SASL_SSF ‐ security layer security strength factor, if 0, call to sasl_encode(3), sasl_decode(3) unnecessary .UNINDENT .IP \(bu 2 SASL_MAXOUTBUF ‐ security layer max output buf unsigned .IP \(bu 2 SASL_DEFUSERREALM ‐ server authentication realm used .IP \(bu 2 SASL_GETOPTCTX ‐ context for getopt callback .IP \(bu 2 SASL_IPLOCALPORT ‐ local address string .IP \(bu 2 SASL_IPREMOTEPORT ‐ remote address string .IP \(bu 2 SASL_SERVICE ‐ service passed to \fIsasl_*_new\fP .IP \(bu 2 SASL_SERVERFQDN ‐ serverFQDN passed to \fIsasl_*_new\fP .IP \(bu 2 .INDENT 2.0 .TP .B SASL_AUTHSOURCE ‐ name of auth source last used, useful for failed authentication tracking .UNINDENT .IP \(bu 2 SASL_MECHNAME ‐ active mechanism name, if any .IP \(bu 2 SASL_PLUGERR ‐ similar to \fIsasl_errdetail\fP .UNINDENT .UNINDENT .UNINDENT .UNINDENT .SH RETURN VALUE .sp SASL callback functions should return SASL return codes. See sasl.h for a complete list. \fBSASL_OK\fP indicates success. .sp Other return codes indicate errors and should be handled. .SH SEE ALSO .sp \fI\%RFC 4422\fP,:saslman:\fIsasl(3)\fP, sasl_errors(3) sasl_server_new(3), sasl_client_new(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_canon_user_t.3000064400000005165152342602460013057 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_CANON_USER_T" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_canon_user_t \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include int sasl_canon_user_t(sasl_conn_t *conn, void *context, const char *user, unsigned ulen, unsigned flags, const char *user_realm, char *out_user, unsigned out_umax, unsigned *out_ulen) .fi .SH DESCRIPTION .INDENT 0.0 .TP .B int sasl_canon_user_t(sasl_conn_t *conn, .TP .B void *context, .TP .B const char *user, .TP .B unsigned ulen, .TP .B unsigned flags, .TP .B const char *user_realm, .TP .B char *out_user, .TP .B unsigned out_umax, .TP .B unsigned *out_ulen) \fBsasl_canon_user_t\fP is the callback for an application\-supplied user canonicalization function. This function is subject to the requirements that all user canonicalization functions are: It must copy the result into the output buffers, but the output buffers and the input buffers may be the same. .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBcontext\fP – context from the callback record .IP \(bu 2 \fBuser\fP – un\-canonicalized username .IP \(bu 2 \fBulen\fP – length of user .IP \(bu 2 \fBflags\fP – Either SASL_CU_AUTHID (indicating the authentication ID is being canonicalized) or SASL_CU_AUTHZID (indicating the authorization ID is to be canonicalized) or a bitwise OR of the the two. .IP \(bu 2 \fBuser_realm\fP – Realm of authentication. .IP \(bu 2 \fBout_user\fP – The output buffer for the canonicalized username .IP \(bu 2 \fBout_umax\fP – Maximum length for out_user .IP \(bu 2 \fBout_ulen\fP – Actual length of out_user .UNINDENT .TP .B Returns \fBSASL_OK\fP indicates success. See sasl_errors(3) for a full list of SASL error codes. .UNINDENT .UNINDENT .SH CONFORMING TO .sp \fI\%RFC 4422\fP .SH SEE ALSO .sp sasl(3), sasl_errors(3), sasl_callbacks(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_errdetail.3000064400000003105152342602460012343 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_ERRDETAIL" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_errdetail \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include const char *sasl_errdetail( sasl_conn_t *conn ); .fi .SH DESCRIPTION .INDENT 0.0 .TP .B const char *sasl_errdetail(sasl_conn_t *conn); \fBsasl_errdetail\fP provides more detailed information about the most recent error to occur, beyond the information contained in the SASL result code. .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBconn\fP – the SASL connection context to inquire about. .UNINDENT .UNINDENT .UNINDENT .SH RETURN VALUE .sp Returns the string describing the error that occurred, or NULL if no error has occurred, or there was an error retrieving it. .SH SEE ALSO .sp \fI\%RFC 4422\fP,:saslman:\fIsasl(3)\fP .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_server_start.3000064400000006045152342602460013121 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_SERVER_START" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_server_start \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include int sasl_server_start(sasl_conn_t * conn, const char * mech, const char * clientin, unsigned clientinlen, const char ** serverout, unsigned * serveroutlen); .fi .SH DESCRIPTION .INDENT 0.0 .TP .B int sasl_server_start(sasl_conn_t * conn, .TP .B const char * mech, .TP .B const char * clientin, .TP .B unsigned * clientinlen, .TP .B const char ** serverout, .TP .B unsigned * serveroutlen); \fBsasl_server_start()\fP begins the authentication with the mechanism specified with mech. This fails if the mechanism is not supported. .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBconn\fP – is the SASL connection context .IP \(bu 2 \fBmech\fP – is the mechanism name that the client requested .IP \(bu 2 \fBclientin\fP – is the client initial response, NULL if the protocol lacks support for client‐send‐first or if the other end did not have an initial send. Note that no initial client send is distinct from an initial send of a null string, and the protocol MUST account for this difference. .IP \(bu 2 \fBclientinlen\fP – is the length of initial response .IP \(bu 2 \fBserverout\fP – is created by the plugin library. It is the initial server response to send to the client. This is allocated/freed by the library and it is the job of the client to send it over the network to the server. Also protocol specific encoding (such as base64 encoding) must needs to be done by the server. .IP \(bu 2 \fBserveroutlen\fP – is set to the length of initial server challenge .UNINDENT .UNINDENT .UNINDENT .SH RETURN VALUE .sp SASL callback functions should return SASL return codes. See sasl.h for a complete list. \fBSASL_OK\fP is returned if the authentication is complete and the user is authenticated. \fBSASL_CONTINUE\fP is returned if one or more steps are still required in the authentication. .sp All other return values indicate errors and should be handled or the authentication session should be quit. .SH SEE ALSO .sp \fI\%RFC 4422\fP,:saslman:\fIsasl(3)\fP, sasl_server_init(3), sasl_server_new(3), sasl_server_step(3), sasl_errors(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_encode.3000064400000005645152342602460011640 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_ENCODE" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_encode \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include int sasl_encode(sasl_conn_t *conn, const char * input, unsigned inputlen, const char ** output, unsigned * outputlen); int sasl_encodev(sasl_conn_t *conn, const struct iovec * invec, unsigned numiov, const char ** output, unsigned * outputlen); .fi .SH DESCRIPTION .sp \fBsasl_encode\fP encodes data to be sent to be sent to a remote host who we’ve had a successful authentication session with. If there is a negotiated security the data in signed/encrypted and the output should be sent without modification to the remote host. If there is no security layer the output is identical to the input. .sp \fBsasl_encodev\fP does the same, but for a \fIstruct iovec\fP instead of a character buffer. .INDENT 0.0 .TP .B int sasl_encode(sasl_conn_t *conn, .TP .B const char * input, .TP .B unsigned inputlen, .TP .B const char ** output, .TP .B unsigned * outputlen); .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBconn\fP – is the SASL connection context .IP \(bu 2 \fBoutput\fP – contains the decoded data and is allocated/freed by the library. .IP \(bu 2 \fBoutputlen\fP – length of \fIoutput\fP\&. .UNINDENT .UNINDENT .INDENT 7.0 .TP .B int sasl_encodev(sasl_conn_t *conn, .TP .B const struct iovec * invec, .TP .B unsigned numiov, .TP .B const char ** output, .TP .B unsigned * outputlen); .UNINDENT .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBconn\fP – is the SASL connection context .IP \(bu 2 \fBoutput\fP – contains the decoded data and is allocated/freed by the library. .IP \(bu 2 \fBoutputlen\fP – length of \fIoutput\fP\&. .UNINDENT .UNINDENT .UNINDENT .SH RETURN VALUE .sp SASL callback functions should return SASL return codes. See sasl.h for a complete list. \fBSASL_OK\fP indicates success. .sp Other return codes indicate errors and should be handled. .SH SEE ALSO .sp \fI\%RFC 4422\fP,:saslman:\fIsasl(3)\fP, sasl_decode(3), sasl_errors(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_checkapop.3000064400000004233152342602460012330 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_CHECKAPOP" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_checkapop \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include int sasl_checkapop(sasl_conn_t *conn, const char *challenge, unsigned challen, const char *response, unsigned resplen) .fi .SH DESCRIPTION .INDENT 0.0 .TP .B int sasl_checkapop(sasl_conn_t *conn, .TP .B const char *challenge, .TP .B unsigned challen, .TP .B const char *response, .TP .B unsigned resplen) \fBsasl_checkapop\fP will check an APOP challenge/response. APOP is an optional POP3 (\fI\%RFC 1939\fP) authentication command which uses a shared secret (password). The password is stored in the SASL secrets database. For information on the SASL shared secrets database see the System Administrators Guide\&. .sp If called with a NULL challenge, sasl_checkapop() will check to see if the APOP mechanism is enabled. .UNINDENT .SH RETURN VALUE .sp sasl_checkapop returns an integer which corresponds to one of the following codes. \fBSASL_OK\fP indicates that the authentication is complete. All other return codes indicate errors and should either be handled or the authentication session should be quit. See sasl_errors(3) for meanings of return codes. .SH CONFORMING TO .sp \fI\%RFC 4422\fP, \fI\%RFC 1939\fP .SH SEE ALSO .sp sasl(3), sasl_errors(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_server_new.3000064400000007277152342602460012565 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_SERVER_NEW" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_server_new \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include int sasl_server_new(const char *service, const char *serverFQDN, const char *user_realm, const char *iplocalport, const char *ipremoteport, const sasl_callback_t *callbacks, unsigned flags, sasl_conn_t ** pconn); .fi .SH DESCRIPTION .INDENT 0.0 .TP .B int sasl_server_new(const char *service, .TP .B const char *serverFQDN, .TP .B const char *user_realm, .TP .B const char *iplocalport, .TP .B const char *ipremoteport, .TP .B const sasl_callback_t *callbacks, .TP .B unsigned flags, .TP .B sasl_conn_t ** pconn); \fBsasl_server_new()\fP creates a new SASL context. This context will be used for all SASL calls for one connection. It handles both authentication and integrity/encryption layers after authentication. .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBservice\fP – is the registered name of the service (usually the protocol name) using SASL (e.g. “imap”). .IP \(bu 2 \fBserverFQDN\fP – is the fully qualified server domain name. NULL means use gethostname(). This is useful for multi\-homed servers. .IP \(bu 2 \fBuser_realm\fP – is the domain of the user agent. This is usually not necessary (NULL is default) .IP \(bu 2 \fBiplocalport\fP – .sp is the IP and port of the local side of the connection, or NULL. If iplocalport is NULL it will disable mechanisms that require IP address information. This strings must be in one of the following formats: .INDENT 2.0 .IP \(bu 2 ”a.b.c.d;port” (IPv4), .IP \(bu 2 ”e:f:g:h:i:j:k:l;port” (IPv6), or .IP \(bu 2 ”e:f:g:h:i:j:a.b.c.d;port” (IPv6) .UNINDENT .IP \(bu 2 \fBipremoteport\fP – is the IP and port of the remote side of the connection, or NULL (see iplocalport) .IP \(bu 2 \fBflags\fP – are connection flags (see below) .IP \(bu 2 \fBpconn\fP – is a pointer to the connection context allocated by the library. This structure will be used for all future SASL calls for this connection. .UNINDENT .UNINDENT .UNINDENT .SS Connection flags .sp Flags that may be passed to \fBsasl_server_new()\fP: .INDENT 0.0 .IP \(bu 2 \fISASL_SUCCESS_DATA\fP: The protocol supports a server‐last send .IP \(bu 2 .INDENT 2.0 .TP .B \fISASL_NEED_PROXY\fP: Force the use of a mechanism that supports an authorization id that is not the authentication id. .UNINDENT .UNINDENT .SH RETURN VALUE .sp SASL callback functions should return SASL return codes. See sasl.h for a complete list. \fBSASL_OK\fP indicates success. .sp Other return codes indicate errors and should either be handled or the authentication session should be quit. .SH SEE ALSO .sp \fI\%RFC 4422\fP,:saslman:\fIsasl(3)\fP, sasl_server_init(3), sasl_server_start(3), sasl_server_step(3), sasl_setprop(3), sasl_errors(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_server_step.3000064400000004734152342602460012742 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_SERVER_STEP" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_server_step \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include int sasl_server_step(sasl_conn_t *conn, const char *clientin, unsigned clientinlen, const char ** serverout, unsigned * serveroutlen); .fi .SH DESCRIPTION .INDENT 0.0 .TP .B int sasl_server_step(sasl_conn_t *conn, .TP .B const char *clientin, .TP .B unsigned clientinlen, .TP .B const char ** serverout, .TP .B unsigned * serveroutlen); \fBsasl_server_step()\fP performs a step in the authentication negotiation. It returns \fBSASL_OK\fP if the whole negotiation is successful and \fBSASL_CONTINUE\fP if this step is ok but at least one more step is needed. .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBconn\fP – is the SASL connection context .IP \(bu 2 \fBclientin\fP – is the data given by the client (decoded if the protocol encodes requests sent over the wire) .IP \(bu 2 \fBclientinlen\fP – is the length of \fIclientin\fP .IP \(bu 2 \fBserverout\fP – set by the library and should be sent to the client. .IP \(bu 2 \fBserveroutlen\fP – length of \fIserverout\fP\&. .UNINDENT .UNINDENT .UNINDENT .SH RETURN VALUE .sp SASL callback functions should return SASL return codes. See sasl.h for a complete list. \fBSASL_CONTINUE\fP indicates success and that there are more steps needed in the authentication. \fBSASL_OK\fP indicates that the authentication is complete. .sp Other return codes indicate errors and should either be handled or the authentication session should be quit. .SH SEE ALSO .sp \fI\%RFC 4422\fP,:saslman:\fIsasl(3)\fP, sasl_server_init(3), sasl_server_new(3), sasl_server_start(3), sasl_errors(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_server_userdb_checkpass_t.3000064400000004531152342602460015615 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_SERVER_USERDB_CHECKPASS_T" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_server_userdb_checkpass_t \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include int sasl_server_userdb_checkpass_t(sasl_conn_t *conn, void *context, const char *user, const char *pass, unsigned passlen, struct propctx *propctx) .fi .SH DESCRIPTION .INDENT 0.0 .TP .B int sasl_server_userdb_checkpass_t(sasl_conn_t *conn, .TP .B void *context, .TP .B const char *user, .TP .B const char *pass, .TP .B unsigned passlen, .TP .B struct propctx *propctx) \fBsasl_server_userdb_checkpass_t()\fP is used to verify a plaintext password against the callback supplier’s user database. This is to allow additional ways to encode the userPassword property. .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBconn\fP – is the SASL connection context .IP \(bu 2 \fBcontext\fP – context from the callback record .IP \(bu 2 \fBuser\fP – NUL terminated user name with \fIuser@realm\fP syntax .IP \(bu 2 \fBpass\fP – password to check (may not be NUL terminated) .IP \(bu 2 \fBpasslen\fP – length of the password .IP \(bu 2 \fBpropctx\fP – property context to fill in with userPassword .UNINDENT .UNINDENT .UNINDENT .SH RETURN VALUE .sp SASL callback functions should return SASL return codes. See sasl.h for a complete list. \fBSASL_OK\fP indicates success. .sp Other return codes indicate errors and should be handled. .SH SEE ALSO .sp \fI\%RFC 4422\fP,:saslman:\fIsasl(3)\fP, sasl_callbacks(3) sasl_errors(3), sasl_server_userdb_setpass_t(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_client_step.3000064400000006743152342602460012714 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_CLIENT_STEP" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_client_step \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include int sasl_client_step(sasl_conn_t *conn, const char *serverin, unsigned serverinlen, sasl_interact_t ** prompt_need, const char ** clientout, unsigned * clientoutlen); .fi .SH DESCRIPTION .INDENT 0.0 .TP .B int sasl_client_step(sasl_conn_t *conn, .TP .B const char *serverin, .TP .B unsigned serverinlen, .TP .B sasl_interact_t ** prompt_need, .TP .B const char ** clientout, .TP .B unsigned * clientoutlen); \fBsasl_client_step()\fP performs a step in the authentication negotiation. It returns \fBSASL_OK\fP if the whole negotiation is successful and \fBSASL_CONTINUE\fP if this step is ok but at least one more step is needed. A client should not assume an authentication negotiation is successful just because the server signaled success via protocol (i.e. if the server said “. OK Authentication succeeded” in IMAP, sasl_client_step should still be called one more time with a \fIserverinlen\fP of zero. .sp If \fBSASL_INTERACT\fP is returned the library needs some values to be filled in before it can proceed. \fIThe prompt_need\fP structure will be filled in with requests. The application should fulfill these requests and call sasl_client_start again with identical parameters (the \fIprompt_need\fP parameter will be the same pointer as before but filled in by the application). .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBconn\fP – is the SASL connection context .IP \(bu 2 \fBserverin\fP – is the data given by the server (decoded if the protocol encodes requests sent over the wire) .IP \(bu 2 \fBserverinlen\fP – is the length of \fIserverin\fP .IP \(bu 2 \fBclientout\fP – is created. It is the initial client response to send to the server. It is the job of the client to send it over the network to the server. Any protocol specific encoding (such as base64 encoding) nec‐ essary needs to be done by the client. .IP \(bu 2 \fBclientoutlen\fP – length of \fIclientout\fP\&. .UNINDENT .UNINDENT .UNINDENT .SH RETURN VALUE .sp SASL callback functions should return SASL return codes. See sasl.h for a complete list. \fBSASL_CONTINUE\fP indicates success and that there are more steps needed in the authentication. \fBSASL_OK\fP indicates that the authentication is complete. .sp Other return codes indicate errors and should either be handled or the authentication session should be quit. .SH SEE ALSO .sp \fI\%RFC 4422\fP,:saslman:\fIsasl(3)\fP, sasl_callbacks(3), sasl_client_init(3), sasl_client_new(3), sasl_client_start(3), sasl_errors(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_auxprop_getctx.3000064400000003200152342602460013440 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_AUXPROP_GETCTX" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_auxprop_getctx \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include int sasl_auxprop_getctx(sasl_conn_t *conn) .fi .SH DESCRIPTION .INDENT 0.0 .TP .B int sasl_auxprop_getctx(\fI\%sasl_conn_t\fP *conn) Fetches an auxiliary property context for the connection on which the functions described in sasl_auxprop(3) can operate. .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBconn\fP – pointer to the \fI\%sasl_conn_t\fP for which the request is being made. .UNINDENT .TP .B Returns A pointer to the context on success. Returns NULL on failure. .UNINDENT .UNINDENT .INDENT 0.0 .TP .B type sasl_conn_t Context for a SASL connection negotiation .UNINDENT .SH CONFORMING TO .sp \fI\%RFC 4422\fP .SH SEE ALSO .sp sasl(3), sasl_auxprop(3), sasl_auxprop_request(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_done.3000064400000002370152342602460011320 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_DONE" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_done \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include void sasl_done( void ); .fi .SH DESCRIPTION .INDENT 0.0 .TP .B void sasl_done(void); \fBsasl_done()\fP is called when the application is completely done with the SASL library. .UNINDENT .SH RETURN VALUE .sp No return values. .SH SEE ALSO .sp \fI\%RFC 4422\fP,:saslman:\fIsasl(3)\fP, sasl_server_init(3), sasl_client_init(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_server_userdb_setpass_t.3000064400000005131152342602460015330 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_SERVER_USERDB_SETPASS_T" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_server_userdb_setpass_t \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include int sasl_server_userdb_setpass_t(sasl_conn_t *conn, void *context, const char *user, const char *pass, unsigned passlen, struct propctx *propctx, unsigned flags) .fi .SH DESCRIPTION .INDENT 0.0 .TP .B int sasl_server_userdb_setpass_t(sasl_conn_t *conn, .TP .B void *context, .TP .B const char *user, .TP .B const char *pass, .TP .B unsigned passlen, .TP .B struct propctx *propctx, .TP .B unsigned flags) \fBsasl_server_userdb_setpass_t\fP is used to store or change a plaintext password in the callback‐supplier’s user database. .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBconn\fP – is the SASL connection .IP \(bu 2 \fBcontext\fP – context from the callback record .IP \(bu 2 \fBuser\fP – NUL terminated user name with \fIuser@realm\fP syntax .IP \(bu 2 \fBpass\fP – password to check (may not be NUL terminated) .IP \(bu 2 \fBpasslen\fP – length of the password .IP \(bu 2 \fBpropctx\fP – Auxilliary Properties (not stored) .IP \(bu 2 \fBflags\fP – These are the same flags that are passed to sasl_setpass(3), and are documented on that man page. .UNINDENT .UNINDENT .UNINDENT .SH RETURN VALUE .sp SASL callback functions should return SASL return codes. See sasl.h for a complete list. \fBSASL_OK\fP indicates success. .sp Other return codes indicate errors and should be handled. .SH SEE ALSO .sp \fI\%RFC 4422\fP,:saslman:\fIsasl(3)\fP, sasl_errors(3) sasl_callbacks(3), sasl_server_userdb_checkpass_t(3), sasl_setpass(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_listmech.3000064400000005537152342602460012213 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_LISTMECH" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_listmech \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include int sasl_listmech(sasl_conn_t *conn, const char *user, const char *prefix, const char *sep, const char *suffix, const char **result, unsigned *plen, int *pcount); .fi .SH DESCRIPTION .INDENT 0.0 .TP .B int sasl_listmech(sasl_conn_t *conn, .TP .B const char *user, .TP .B const char *prefix, .TP .B const char *sep, .TP .B const char *suffix, .TP .B const char **result, .TP .B unsigned *plen, .TP .B int *pcount); \fBsasl_listmech\fP returns a string listing the SASL names of all the mechanisms available to the specified user. This is typically given to the client through a capability command or initial server response. Client applications need this list so that they know what mechanisms the server supports. .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBconn\fP – the SASL context for this connection .IP \(bu 2 \fBuser\fP – (optional) restricts the mechanism list to only those available to the user. .IP \(bu 2 \fBprefix\fP – appended to beginning of result .IP \(bu 2 \fBsep\fP – appended between mechanisms .IP \(bu 2 \fBsuffix\fP – appended to end of result .IP \(bu 2 \fBresult\fP – NULL terminated result string (allocated/freed by library) .IP \(bu 2 \fBplen\fP – length of result filled in by library. May be NULL .IP \(bu 2 \fBpcount\fP – Number of mechanisms available (filled in by library). May be NULL .UNINDENT .UNINDENT .UNINDENT .SH EXAMPLE .sp .nf sasl_listmech(conn,NULL,"(",",",")",&mechlist,NULL,NULL); .fi .sp may give the following string as a result: .INDENT 0.0 .INDENT 3.5 \fI(ANONYMOUS,KERBEROS_V4,DIGEST‐MD5)\fP .UNINDENT .UNINDENT .SH RETURN VALUE .sp SASL functions should return SASL return codes. See sasl.h for a complete list. \fBSASL_OK\fP indicates success. .SH SEE ALSO .sp \fI\%RFC 4422\fP,:saslman:\fIsasl(3)\fP, sasl_server_new(3), sasl_errors(3), sasl_client_new(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_getopt_t.3000064400000004766152342602460012233 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_GETOPT_T" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_getopt_t \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include int sasl_getopt_t(void *context, const char *plugin_name, const char *option, const char ** result, unsigned * len); .fi .SH DESCRIPTION .INDENT 0.0 .TP .B int sasl_getopt_t(void *context, .TP .B const char *plugin_name, .TP .B const char *option, .TP .B const char ** result, .TP .B unsigned * len); \fBsasl_getopt_t\fP is used to retrieve an option, often mechanism specific, from the application. An example of this is requesting what KERBEROS_V4 srvtab file to use. .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBcontext\fP – is the SASL connection context .IP \(bu 2 \fBplugin_name\fP – is the plugin this value is for. .IP \(bu 2 \fBoption\fP – is a string representing the option. A common option that all server applications should handle is the method for checking plaintext passwords. See the \fI\%administrators guide\fP for a full description of this option. .UNINDENT .UNINDENT .sp Memory management of options supplied by the getopt callback should be done by the application, however, any requested option must remain available until the callback is no longer valid. That is, when sasl_dispose(3) is called for a the connection it is associated with, or sasl_done(3) is called for global callbacks. .UNINDENT .SH RETURN VALUE .sp SASL callback functions should return SASL return codes. See sasl.h for a complete list. \fBSASL_OK\fP indicates success. .sp Other return codes indicate errors and should be handled. .SH SEE ALSO .sp \fI\%RFC 4422\fP,:saslman:\fIsasl(3)\fP, sasl_errors(3) sasl_callbacks(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/man/man3/sasl_authorize_t.3000064400000003466152342602460012737 0ustar00.\" Man page generated from reStructuredText. . .TH "SASL_AUTHORIZE_T" "3" "February 18, 2022" "2.1.28" "Cyrus SASL" .SH NAME sasl_authorize_t \- Cyrus SASL documentation . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp .nf #include int sasl_authorize_t(void *context, const char *requested_user, unsigned alen, const char *auth_identity, unsigned alen, const char *def_realm, unsigned urlen, struct propctx *propctx) .fi .SH DESCRIPTION .sp \fBsasl_authorize_t\fP is used to check whether the authorized user auth_identity may act as the user requested_user. For example the user root may wish to authenticate with his credentials but act as the user mmercer (with all of mmercer’s rights not roots). A server application should be very careful, and probably err on the side of caution, when determining which users may proxy as whom. .SH RETURN VALUE .sp SASL callback functions should return SASL return codes. See sasl.h for a complete list. \fBSASL_OK\fP indicates success. .SH SEE ALSO .sp sasl(3), sasl_callbacks(3) .SH AUTHOR The Cyrus Team .SH COPYRIGHT 1993-2016, The Cyrus Team .\" Generated by docutils manpage writer. . share/doc/alt-cyrus-sasl/LDAP_SASLAUTHD000064400000022270152342602460013360 0ustar00auth_ldap module for saslauthd ------------------------------ Saslauthd can use an LDAP directory for authentication/authorization. Sections: 1. Build saslauthd with ldap support 2. Start saslauthd with ldap 3. Testing 4. Parameters 5. Examples 6. Notes 7. Todo 8. Feedback 8. Author 1. BUILD SASLAUTHD WITH LDAP SUPPORT ------------------------------------ Ensure that you have the OpenLDAP (http://www.openldap.org) libraries 2.1 or higher. Fetch the latest cyrus-sasl package, 2.1.17 or higher, ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/. Unpack cyrus-sasl: gzip -dc cyrus-sasl-2.1.17.tar.gz | tar xf - or tar zxf cyrus-sasl-2.1.17.tar.gz (if your tar supportz gzip) cd cyrus-sasl-2.1.17 ./configure --with-ldap (you may need to add other options, check doc/index.html for more) make make install 2. START SASLAUTHD WITH LDAP ---------------------------- Create /usr/local/etc/saslauthd.conf and add the following (modify to fit your environment): ldap_servers: ldap://10.1.1.15/ ldap://10.1.1.25/ ldap_bind_dn: cn=operator,ou=Profile,o=foo.com ldap_password: secret Do not specify ldap_bind_*/ldap_password if you want to bind anonymously to your ldap server(s). Run saslauthd: saslauthd -a ldap If you want to specify a different configuration file, you can do something like: saslauthd -a ldap -O /etc/saslauthd.conf For more command line options, check 'man saslauthd' 3. TESTING ---------- First build testsaslauthd: cd $sasl_src/saslauthd make testsaslauthd Run test utility: ./testsaslauthd -u igor -p secret 0: OK "Success." If you get output other then Success, turn debug level for the auth syslog facility and check the syslog file. Hopefully this will give you enough information to make adjustements in the startup and/or configuration files. 4. PARAMETERS ------------- The following are available ldap parameters. There are quite a few of those, but only ldap_servers may need to be specified. The defaults for all other parameters are adequate for most installations. Do not use quotes (\"\') in the parameter values. The defaults are specified within the first set of <>. There may be a second set of <> which provide available values. ldap_auth_method: Specify an authentication method. The bind method uses the LDAP bind facility to verify the password. The bind method is not available when ldap_use_sasl is turned on. In that case saslauthd will use fastbind. 'bind' is the default auth method. When ldap_use_sasl is enabled, 'fastbind' is the default. The custom method uses userPassword attribute to verify the password. Suppored hashes: crypt, md5, smd5, sha and ssha. Cleartext is supported as well. The fastbind method (when 'ldap_use_sasl: no') does away with the search and an extra anonymous bind in auth_bind, but makes two assumptions: 1. Expanding the ldap_filter expression gives the user's fully-qualified DN 2. There is no cost to staying bound as a named user ldap_bind_dn: Specify DN (distinguished name) to bind to the LDAP directory. Do not specify this parameter for the anonymous bind. ldap_bind_pw: Alias for ldap_password. ldap_default_domain: Alias for ldap_default_realm. ldap_default_realm: The default realm is assigned to the %r token when realm is not available. See ldap_filter for more. ldap_deref: Specify how aliases dereferencing is handled during search. ldap_filter: Specify a filter. The following tokens can be used in the filter string: %% = % %u = user %U = user portion of %u (%U = test when %u = test@domain.tld) %d = domain portion of %u if available (%d = domain.tld when %u = %test@domain.tld), otherwise same as %r %1-9 = domain tokens (%1 = tld, %2 = domain when %d = domain.tld) %s = service %r = realm %D = user DN (available for group checks) The %u token has to be used at minimum for the filter to be useful. If ldap_auth_method is 'bind', the filter will search for the DN (distinguished name) attribute. Otherwise, the search will look for the 'ldap_password_attr' (see below) attribute. ldap_group_attr: Specify what attribute to compare the user DN against in the group. If ldap_group_dn is not specified, this parameter is ignored. If ldap_group_match_method is not attr, this parameter is ignored. ldap_group_dn: If specified, the user has to be part of the group in order to authenticate successfully. Tokens described in 'ldap_filter' (see above) can be used for substitution. ldap_group_filter: Specify a filter. If a filter match is found then the user is in the group. Tokens described in 'ldap_filter' (see above) can be used for for substitution. If ldap_group_dn is not specified, this parameter is ignored. If ldap_group_match_method is not filter, this parameter is ignored. ldap_group_match_method: Specify whether the group match method uses ldap_group_attr or ldap_group_search. If ldap_group_dn is not specified, this parameter is ignored. ldap_group_search_base: Specify a starting point for the group search: e.g. dc=foo,dc=com. Tokens described in 'ldap_filter' (see below) can be used for substitution. ldap_group_scope: Group search scope. ldap_password: Specify the password for ldap_bind_dn or ldap_id if ldap_use_sasl is turned on. Do not specify this parameter for the anonymous bind. ldap_password_attr: Specify what password attribute to use for password verification. ldap_referrals: Specify whether or not the client should follow referrals. ldap_restart: Specify whether or not LDAP I/O operations are automatically restarted if they abort prematurely. ldap_id: Specify the authentication ID for SASL bind. ldap_authz_id: Specify the proxy authorization ID for SASL bind. ldap_mech: Specify the authentication mechanism for SASL bind. ldap_realm: Specify the realm of authentication ID for SASL bind. ldap_scope: Search scope. ldap_search_base: Specify a starting point for the search: e.g. dc=foo,dc=com. Tokens described in 'ldap_filter' (see below) can be used for substitution. ldap_servers: Specify URI(s) refering to LDAP server(s), e.g. ldaps://10.1.1.2:999/. You can specify multiple servers separated by a space. ldap_start_tls: Use StartTLS extended operation. Do not use ldaps: ldap_servers when this option is turned on. ldap_time_limit: <5> Specify a number of seconds for a search request to complete. ldap_timeout: <5> Specify a number of seconds a search can take before timing out. ldap_tls_check_peer: Require and verify server certificate. If this option is yes, you must specify ldap_tls_cacert_file or ldap_tls_cacert_dir. ldap_tls_cacert_file: File containing CA (Certificate Authority) certificate(s). ldap_tls_cacert_dir: Path to directory with CA (Certificate Authority) certificates. ldap_tls_ciphers: List of SSL/TLS ciphers to allow. The format of the string is described in ciphers(1). ldap_tls_cert: File containing the client certificate. ldap_tls_key: File containing the private client key. ldap_use_sasl: Use SASL bind rather than simple bind when connecting to the ldap server. ldap_version: <3> <2|3> Specify the LDAP protocol version. If ldap_start_tls and/or ldap_use_sasl are enabled, ldap_version will be automatiacally set to 3. 5. NOTES -------- For better performance ensure that the attributes specified in ldap_filter are indexed. My testing shows that 'custom' is 2-3 times faster than 'bind' ldap_auth_method. The 'fastbind' auth_method is just as fast or faster. The slower performace of the 'bind' auth_method is caused by two extra calls to ldap_bind() per each authentication. SASL bind should be used with the 'fastbind' auth_method: ldap_servers: ldaps://10.1.1.2/ ldap_use_sasl: yes ldap_mech: DIGEST_MD5 ldap_auth_method: fastbind At this time this is not the best performing solution because openldap (2.1.x) cannot reuse existing connection for multiple ldap_sasl_bind()s. This will hopefully change when openldap 2.2 comes out. 6. TODO ------- - Port to other ldap libraries - There may be bind problems when following referrals. Normally this is not an issue. - Allow to specify an attribute other than userPassword for use in the custom authentication method. (Done) - Add more password hashes such as md5, sha etc (Done) - Make a suggestion (possibly another authentication method?) (added fastbind) thanks to Simon Brady 7. FEEDBACK ----------- Feedback is much appreciated! Please drop me a note if you are successfully using ldap-enabled saslauthd. Any code improvements and/or suggestion are welcome. If you have questions, send email to cyrus-sasl@lists.andrew.cmu.edu. Please include relevant information about your saslauthd setup: at minimum provide your saslauth.conf, output from syslog and which directory server you're using. 8. AUTHOR --------- Igor Brezac . share/doc/alt-cyrus-sasl-lib/setup.html000064400000134707152342602460014110 0ustar00 Setup — Cyrus SASL 2.1.28 documentation
share/doc/alt-cyrus-sasl-lib/index.html000064400000161417152342602460014055 0ustar00 Cyrus SASL — Cyrus SASL 2.1.28 documentation

Cyrus SASL

Welcome to Cyrus SASL.

What is Cyrus SASL?

Simple Authentication and Security Layer (SASL) is a specification that describes how authentication mechanisms can be plugged into an application protocol on the wire. Cyrus SASL is an implementation of SASL that makes it easy for application developers to integrate authentication mechanisms into their application in a generic way.

The latest stable version of Cyrus SASL is 2.1.28.

Cyrus IMAP uses Cyrus SASL to provide authentication support to the mail server, however it is just one project using Cyrus SASL.

Features

Cyrus SASL provides a number of authentication plugins out of the box.

Berkeley DB, GDBM, or NDBM (sasldb), PAM, MySQL, PostgreSQL, SQLite, LDAP, Active Directory (LDAP), DCE, Kerberos 4 and 5, proxied IMAP auth, getpwent, shadow, SIA, Courier Authdaemon, httpform, APOP and SASL mechanisms: ANONYMOUS, CRAM-MD5, DIGEST-MD5, EXTERNAL, GSSAPI, LOGIN, NTLM, OTP, PASSDSS, PLAIN, SCRAM, SRP

This document is an introduction to Cyrus SASL. It is not intended to be an exhaustive reference for the SASL Application Programming Interface (API), which is detailed in the SASL manual pages, and the libsasl.h header file.

Known Bugs

libtool doesn’t always link libraries together. In our environment, we only have static Krb5 libraries; the GSSAPI plugin should link these libraries in on platforms that support it (Solaris and Linux among them) but it does not. It also doesn’t always get the runpath of libraries correct.

Cyrus SASL

IMAP

share/doc/alt-cyrus-sasl-lib/search.html000064400000120437152342602460014210 0ustar00 Search — Cyrus SASL 2.1.28 documentation

share/doc/alt-cyrus-sasl-lib/support.html000064400000121433152342602460014454 0ustar00 Support/Community — Cyrus SASL 2.1.28 documentation

Support/Community

Please read our support and bug reporting guidelines in the Cyrus IMAP project.

share/doc/alt-cyrus-sasl-lib/getsasl.html000064400000125002152342602460014376 0ustar00 Get SASL — Cyrus SASL 2.1.28 documentation
share/doc/alt-cyrus-sasl-lib/AUTHORS000064400000004327152342602460013124 0ustar00Rob Siemborski wrote and tested the conversion to the SASLv2 API. Ken Murchison worked on the OTP, NTLM, SRP and SQL plugins, as well as helping to track down bugs as they appear. He also added support for HTTP authentication. Rob Earhart wrote the build/installation procedure, wrote and tested some of the code, and provided general guidance and coding advice. Leif Johansson wrote the GSSAPI plugin, with contributions from Sam Hartman . Leandro Santi added Courier authdaemon support. Alexey Melnikov wrote the first pass of the DIGEST-MD5 and SCRAM plugins and continues to work on them. He also wrote a good deal of the current Windows support. Rainer Schoepf contributed the LOGIN plugin, based on Tim Martin's PLAIN plugin. Simon Loader wrote the MySQL auxprop module. Rolf Braun wrote the MacOS ports. Howard Chu put a good deal of work into OS/390 portability, correct building of static libraries, and a slew of misc. bugfixes. Tim Martin wrote, debugged, and tested most of the SASLv1 code. Larry Greenfield complained. a lot. Chris Newman wrote the initial version of the SASL API, as well as the version 2 SASL API (documented in sasl.h, saslutil.h, saslplug.h, and prop.h). Ryan Troll started the Windows port, and both Larry Greenfield and Alexey Melnikov have done more work on it. getaddrinfo.c was written by Hajimu UMEMOTO which is based on the IPv6 code written by KIKUCHI Takahiro Igor Brezac has done a good deal of work on the saslauthd LDAP module. Jeremy Rumpf implemented the credential cache, unified the different IPC methods under a common framework. Fabian Knittel wrote auth_pam plugin, based on Debian's pwcheck_pam daemon by Michael-John Turner . saslauthd was originally contributed by Lyndon Nerenberg on behalf of MessagingDirect Ltd. share/doc/alt-cyrus-sasl-lib/packager.html000064400000122370152342602460014516 0ustar00 Note for Packagers — Cyrus SASL 2.1.28 documentation

Note for Packagers

People considering doing binary distributions that include saslauthd should be aware that the code is covered by several slightly different (but compatible) licenses, due to how it was contributed. Details can be found within the source code.

share/doc/alt-cyrus-sasl-lib/download.html000064400000146602152342602460014554 0ustar00 Download — Cyrus SASL 2.1.28 documentation
share/doc/alt-cyrus-sasl-lib/genindex.html000064400000217376152342602460014555 0ustar00 Index — Cyrus SASL 2.1.28 documentation

Index

Symbols | A | C | K | L | M | N | O | P | R | S

Symbols

A

C

K

L

M

N

O

P

R

S

share/doc/alt-cyrus-sasl-lib/operations.html000064400000167164152342602460015136 0ustar00 Operations — Cyrus SASL 2.1.28 documentation

Operations

share/doc/alt-cyrus-sasl-lib/developer.html000064400000140252152342602460014725 0ustar00 Developers — Cyrus SASL 2.1.28 documentation
sbin/saslpasswd2000075500000040740152342602460007704 0ustar00ELF>@ :@8 @@@@hh%% (,(, (, (` @,@, @, PP DDStd Ptd"""TTQtdRtd(,(, (, /lib64/ld-linux-x86-64.so.2GNUGNUGNU@TIh%K6+?+@ +-|CEqXyck+ : r?: T"FpUZyN3*4 P0 P0 libsasl2.so.3_ITM_deregisterTMCloneTable__gmon_start___ITM_registerTMCloneTablesasl_errstringprop_disposeprop_setsasl_server_newprop_requestsasl_server_initsasl_auxprop_storesasl_setpasssasl_disposeprop_newsasl_donesasl_versionlibdl.so.2libdb-5.3.solibresolv.so.2libcrypt.so.1libc.so.6fflushexitoptindstrrchrperrorputc__stack_chk_failisattystrlentcsetattrreadmemcmpgetopt__fprintf_chkstdoutfputsmemcpymallocoptargstderrgethostnamefwritestrchrtcgetattr__cxa_finalize__libc_start_mainfree_edata__bss_start_endGLIBC_2.14GLIBC_2.4GLIBC_2.3.4GLIBC_2.2.5/opt/alt/openssl11/lib64:/opt/alt/krb5/usr/lib64:/opt/alt/cyrus-sasl/lib64)/ii :ti Dui P(, 0, p8, 8, (0 / /  /  / / / / / $/ ). . . . . . . .  .  .  . / / / /  / (/ 0/ 8/ @/ H/ P/ X/ `/ h/ p/  x/ !/ "/ #/ %/ &/ '/ (/ *HH9 HtH5 % hhhhhhhhqhah Qh Ah 1h !h hhhhhhhhhhqhahQhAh1h!hhhh h!% D% D% D% D% D% D% D% D% D% D% D% D%} D%u D%m D%e D%] D%U D%M D%E D%= D%5 D%- D%% D% D% D%  D% D% D% D% D% D% D% DAWAVAUATAUHSHH=t dH%(HD$x1D$(HD$0HD$8HH== H}H/hH  HL$HHHHH E1E1E1H$H HD$D$D$DH HD^aIHcH>D$fDD$fDH HH? HfEDDEE{EDDEEcH /HHH$HL1HD$0fo$1foL$foT$ HT$@HD$pD$8)D$@D$xD$L)L$P%)T$`BD$LQH1HHxd11L.Hu!1DHLDL{B< tI6 \I>B<Ho H8 HU1H1SHxHIIH# HHHHDH H81}1É)f.AWIAVIAUAATL%| UH-| SL)HHt1LLDAHH9uH[]A\A]A^A_ff.HHsasldb_path%s: %s: %s saslpasswdgethostnameappname must not contain / vpcdnf:u:a:h?sasldbPassword: cmusaslsecretCRAM-MD5cmusaslsecretDIGEST-MD5cmusaslsecretPLAINAgain (for verification): This product includes software developed by Computing Services at Carnegie Mellon University (http://www.cmu.edu/computing/). Built against SASL API version %u.%u.%u LibSasl version %u.%u.%u by "%s" This product includes software developed by Computing Services at Carnegie Mellon University (http://www.cmu.edu/computing/). %s: usage: %s [-v] [-c [-p] [-n]] [-d] [-a appname] [-f sasldb] [-u DOM] userid -p pipe mode -- no prompt, password read on stdin -c create -- ask mechs to create the account -d disable -- ask mechs to disable/delete the account -n no userPassword -- don't set plaintext userPassword property (only set mechanism-specific secrets) -f sasldb use given file as sasldb -a appname use appname as application name -u DOM use DOM for user domain -v print version numbers and exit %s: passwords don't match; aborting P;T (`pxh@H@zRx /D$4H0FJ w?:*3$"\P (t8gEAD J CAH H|FBB E(D0A8G 8A0A(B BBBH  cEHF FGB B(D0I8GZLHUPLBrHgB 8A0A(B BBBA HdDDeFEE E(H0H8G@n8A0A(B BBBp8,  )\ p (, 0, o0`  . 0@  8 oo ooX o@,  0@P`p 0@P`pGA$3a1p GA$3p1113GA*GA$annobin gcc 8.5.0 20210514GA$plugin name: gcc-annobinGA$running gcc 8.5.0 20210514GA*GA*GA! GA*FORTIFYGA+GLIBCXX_ASSERTIONS GA*GOW*GA*cf_protectionGA+omit_frame_pointerGA+stack_clashGA!stack_realignGA$3a1 GA$3p1113GA*GA$annobin gcc 8.5.0 20210514GA$plugin name: gcc-annobinGA$running gcc 8.5.0 20210514GA*GA*GA! GA*FORTIFYGA+GLIBCXX_ASSERTIONS GA*GOW*GA*cf_protectionGA+omit_frame_pointerGA+stack_clashGA!stack_realign GA*FORTIFYGA+GLIBCXX_ASSERTIONS GA*FORTIFYGA+GLIBCXX_ASSERTIONSsaslpasswd2-2.1.28-1.el8.x86_64.debugIs87zXZִF!t/]?Eh=ڊ2N`O> ܟV4'K;)rY !'{]|`=ꓺ8\"SH?glt6V0wzmZAoJ7,Ldf*O%?~!wM/v`GiXV8I*Koa5DloyO[ڄhŬpK20v蓳tlZ|IM*ǥ_w U8׽cR+쯟>grɒQuZ,(MrEiL(VrC\Deoޜ7k[;GGkHE{lgZ:=\tQ=UW",E6;A4MV訨šҸX"Ĭk(yw ZJ,oka/>gC6 `;o4h,ցu5MFvH4@%_8`lxy%j|ƃ: 1r,Գr62'L1v2/ C_64<ؔ@ nױgYZ.shstrtab.interp.note.gnu.property.note.ABI-tag.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.plt.sec.text.fini.rodata.eh_frame_hdr.eh_frame.init_array.fini_array.data.rel.ro.dynamic.got.data.bss.gnu.build.attributes.gnu_debuglink.gnu_debugdata  & 4$Go000Q ``PYaoX X \no P}  8B@ @ 0pp0 %  ""T##(, (,0, 0,8, 8,@, @,P. .p0 0P `0 P0( 4`P0 4,/ 58>sbin/sasldblistusers2000075500000051300152342602460010740 0ustar00ELF>@K@8 @@@@hh00 << <  << < PP DDStd Ptd+++QtdRtd<< < XX/lib64/ld-linux-x86-64.so.2GNUGNUGNU?.y:ԪU, ׬h@ |CEqXH+ A :: r"])f!dvkTVp@ X@ X@ libsasl2.so.3_ITM_deregisterTMCloneTable__gmon_start___ITM_registerTMCloneTablesasl_global_utilssasl_server_newsasl_server_initsasl_disposesasl_donesasl_versionlibdl.so.2libdb-5.3.sodb_strerrordb_createlibresolv.so.2libcrypt.so.1libc.so.6__printf_chkexitoptindstrrchrstrncpy__stack_chk_failstrlengetopt__fprintf_chkmemcpyoptargstderrfwrite__cxa_finalize__libc_start_main_edata__bss_start_endGLIBC_2.14GLIBC_2.4GLIBC_2.2.5GLIBC_2.3.4/opt/alt/openssl11/lib64:/opt/alt/krb5/usr/lib64:/opt/alt/cyrus-sasl/lib64ii ui ti < `<  < < (@ pP@ %? ? ? ?  ?  ?  ? ? ? (? 0? 8? @? H? P?  X?  `?  h? p? x? ? ? ? ? ? ? ? HH3 HtH53 %3 hhhhhhhhqhah Qh Ah 1h !h hhhh%1 D%1 D%1 D%1 D%1 D%1 D%1 D%1 D%1 D%1 D%1 D%1 D%1 D%1 D%}1 D%u1 D%m1 D%e1 DAVAUATUSHH H>dH%(HD$1H/%L51 IHtQHIE1E1HHމhvt8ftAAHIDH0 HHG1 HfHt$ H|$QD$ t$AARRHdPH0 H81H 1AE1*HC8-H0 HH5H=u0 p%H\$E1E11S1H5H=jH-0 XZHt$H}Aą Ht$H}11H_HL$dH3 %(D9H []A\A]A^L50 HIAHi/ 9(u E)Hu/ H=H IH;Hj1IH GH=tgEAIH/ H=AH-H. H=`AHH. H=LHH !H=eD1I^HHPTLH H=. H=. H. H9tH- Ht H=q. H5j. H)HHH?HHtH- HtfD=-. u+UH=- Ht H=v* Yd. ]wUSHH- HHtGHH=Hʹ Àۅu&HMtHLEH[]fHHI1HH5L1HDHHHHMMAWAVIAUATIUSLH(H<$HLL$Ht$LLt$I LIKl=LL$H$H|II9R(HHt`Ht$LHzHHt$LB(HJ|(]HLLD(HH|(B1H([]A\A]A^A_ÐøAWAVAUATUSH(HHHt HMt MH|$`t H|$hE1E11@<ABAIH9wALHMHL$HT$Ht$L|ILLD$IMtHL$L9vHHLHtM9vgLLHE1H|$`t4Hl$HL)L)H9l$hv8Kt.H|$`HHHD$`(H(D[]A\A]A^A_AAAWAVAUATUSHH $HH $H(dH%(H$ 1IIMHD$Lt$MPMLh RXZu:HD$HxAT$(HHtfLd$H{LDLH*BD#I]H$ dH34%(uJH( []A\A]A^A_H1LA$H1L1A$\ff.H1MtIIHML PVHÐAWAVAUATUSL$HH $L9uHHH4$IHT$HL$dH%(H$8@1HH4$L IHHD$(LLH$0IHD$H L$0@Ld$0H$0f.h@@LMUHt$8A@H|ZYu}HL$HLLHD$ЃLD$HLL tt}LL: H$8@dH3%(HH@[]A\A]A^A_ÐHH<$1A2fHH<$1AfHIH<$1AmftHH<$1AHDHD$HHD$F1HuH<$AfDAWIAVILAUL- ATAUHSH(dH%(HD$1HHT$Au!E11HL$H<$H T$11HEuORÅAH\$dH3%(H([]A\A]A^A_DEÅHEHtuHLA1h1HXZtNHE1H8HEbf.Ll$MA}H_ LDD1AAoDILLIH11HGLAL- ff.@HS1HH8u [HH 1HI1[Aff.AWAVAUATUSHH$H4$HD$dH%(H$1HD$8HuHHH&IHMMMMH$$ LL$0LD$(LLH+AƅtDH 1H<$1H$dH3 %(DHĨ[]A\A]A^A_HL$pH4$f1HD$@HL$HHL$8HD$)D$@)D$PHD$`)D$p)$HDŽ$yAƅHD$(E1HL$1D$`HT$HD$@HD$0DŽ$D$HHD$8HxA=uiH$l$xHH9HD$HtH(Ht$pHL#A/Ht$8Ht HH|$(S@H|$pS@HAH 1H<$H1fDMMHH[ H<$1Av@H 1H<$1A1H; 1H<$1AAADAWAVAUATUSHdH%(HD$x1HD$HrIHHHHL@M@$H! MLD$LL$HxŅtBH 1L1H\$xdH3%(HĈ[]A\A]A^A_fDHL$LH ŅHD$Hl$ fLt$D$,HD$ HD$HEE$D$(MtL|$PD$XH$AGLl$PuL0H$$HE1L1LD$XAŅHt$Ht H8H|$S@H11LAPŅtÉL31H H1A1HE LrLH1H1AHL1-H1L1,f.H 1L1xAVAUATUSH dH%(HD$1HHIHHT$HLt$LL-uHLt$E11H<$LHL-bT$u!Ll$MA}H@LDHLLÅuFLH<$T$t"teHL$dH3 %(uPH []A\A]A^ @1H{1LL-t1@ATUSHdH%(HD$1Ht[IHtS) Ht21Hu8U(HH$HtHHHCHI1L11HT$dH3%(Hu0H[]A\fD1H81L1H' f.AWAVAUATUSHhdH%(HD$X1H HHIHHHHFfMIL)$L|$0)D$HD$ )D$0)D$@HD$PHtqLLH1=t2\$H9H4$HLMtI$HL$XdH3 %(ujHh[]A\A]A^A_ÐHV11LAHu:HCLLHpD럐fHt_HtZATUHSHFHHt HHHt&1H8HAU@1E[]A\HU@[1]A\fAWIAVIAUAATL% UH- SL)HHt1LLDAHH9uH[]A\A]A^A_ff.HHsasldb_pathsasldblistusers2vf:h?sasldblistuserslocalhostsasldbcheck_db unsuccessful listusers failed /etc/sasldb2 This product includes software developed by Computing Services at Carnegie Mellon University (http://www.cmu.edu/computing/). Built against SASL API version %u.%u.%u LibSasl version %u.%u.%u by "%s" This product includes software developed by Computing Services at Carnegie Mellon University (http://www.cmu.edu/computing/). %s: usage: %s [-v] [[-f] sasldb] -f sasldb use given file as sasldb -v print version numbers and exit Unrecognized command line option Couldn't initialize server API %s@%s: %s *userPasswordBad Key in _sasldb_parse_keyNo secret pointer in _sasldb_getsecretOut of Memory in _sasldb_getsecret_sasldb_getkeyhandle has failedKey is too large in _sasldb_parse_keyDB failure in _sasldb_getnextkeyKey is too large in _sasldb_getnextkeyUnable to open DBerror closing sasldb: %sDatabase not checkederror updating sasldb: %sCouldn't update dbverifyfile failedunable to open Berkeley db %s: %sBad parameter in db_berkeley.c: _sasldb_getdataCould not allocate key in _sasldb_getdatauser: %s@%s property: %s not found in sasldberror fetching from sasldb: %sBad parameter in db_berkeley.c: _sasldb_putdataCould not allocate key in _sasldb_putdataerror deleting entry from sasldb: %sDatabase not OK in _sasldb_getkeyhandleMemory error in _sasldb_gethandle;8ThX(0X|xp4(DzRx /D$40FJ w?:*3$"\ (t(gEAD J CAH `+FBB A(C0GPXZ`LhHpUP\XR`MXAP[ 0A(A BBBA +Hb\ |BE B(D0A8G`8A0A(B BBBBF`H|IFBB B(A0A8D` 8D0A(B BBBA `FBB B(A0A8G L@I@p@O@H@A@Z 8A0A(B BBBA ,/HRK IlL:FBB B(A0A8H Q DLTA~ 8A0A(B BBBB TpBJH I(D0D8D` 8A0A(B BBBF _hPpNhA`DDS I aH4(FBB B(A0A8G 8A0A(B BBBD HFBB B(A0A8G 8A0A(B BBBG @0<FBB A(A0DP 0A(A BBBA 0,FAA D0  AABG HD_FBB B(A0A8D 8A0A(B BBBB 8nPAD w DBF GCBDDeFEE E(H0H8G@n8A0A(B BBB8` <  (%< < o00` # ? 0 P ooooTo<  0 @ P ` p  p%GA$3a1  GA$3p1113P$GA*GA$annobin gcc 8.5.0 20210514GA$plugin name: gcc-annobinGA$running gcc 8.5.0 20210514GA*GA*GA! GA*FORTIFYGA+GLIBCXX_ASSERTIONS GA*GOW*GA*cf_protectionGA+omit_frame_pointerGA+stack_clashGA!stack_realignGA$3a15% GA$3p1113%%GA*GA$annobin gcc 8.5.0 20210514GA$plugin name: gcc-annobinGA$running gcc 8.5.0 20210514GA*GA*GA! GA*FORTIFYGA+GLIBCXX_ASSERTIONSGA*cf_protectionGA+omit_frame_pointerGA+stack_clashGA!stack_realign GA*GOW* GA*GOW*$%% GA*FORTIFY$GA+GLIBCXX_ASSERTIONS GA*FORTIFY$%%GA+GLIBCXX_ASSERTIONSsasldblistusers2-2.1.28-1.el8.x86_64.debugL 7zXZִF!t/+]?Eh=ڊ2N '.{~Y[~\ WkU,lnuc"{؀,Ӌ}[9_Y@B#>ރHQ o׉sLSM9w+Y1Vupw"Ik1~1Qzף({'˓\Lob*L p8nޢ* @Ukt^6~'M2R4arX0%<QH.k n vsL}sF,wjs }lǛ Y'EfIE*T(k|ZzYv(> ܿV͚ -;vIiĉpqH"C[@UB {^ Yx(wy*o-՚]#:DKbqa<ԩBx]ݳNF団J>d|[p].7 X0~)|S:]TrI@p|mo9j=sbin/saslauthd000075500000213350152342602460007425 0ustar00ELF>7@(@8 @@@@hh  `   DDStd PtdQtdRtd XX/lib64/ld-linux-x86-64.so.2GNUGNUGNUK#)YHpط"Ulu@ uwBE|qX4TF]"i"$(Y8*/2m1\r^!g9&CQ <pHMF|9d8*5.F$ >wXR$R g@ .z@!W!@!libgssapi_krb5.so.2__gmon_start___ITM_deregisterTMCloneTable_ITM_registerTMCloneTablelibkrb5.so.3krb5_free_error_messagekrb5_kt_resolvekrb5_get_error_messagekrb5_get_init_creds_passwordkrb5_parse_namekrb5_get_init_creds_opt_freekrb5_free_cred_contentskrb5_get_init_creds_opt_allockrb5_kt_closekrb5_init_contextkrb5_verify_init_credskrb5_verify_init_creds_opt_set_ap_req_nofailkrb5_free_contextkrb5_free_principalkrb5_verify_init_creds_opt_initkrb5_sname_to_principallibk5crypto.so.3libcom_err.so.2libdb-5.3.solibpam.so.0pam_get_itempam_startpam_strerrorpam_acct_mgmtpam_endpam_authenticatelibresolv.so.2libcrypt.so.1cryptlibc.so.6socketstrcpyfchmodfopengai_strerrorftruncatepipeconnect__fdelt_chksignalstrncpyforktime__stack_chk_failunlinklistenselectmkdirreallocfsync_exitstrpbrkgetpidkillstrdup__assert_failendpwentstrtolmmapfgetsgetpwnamcallocstrlensigemptysetopenloggetaddrinfomemsetwritev__errno_locationbindchdirreadgetnameinfo__syslog_chkgetoptdup2shutdown__fprintf_chklseekmemcpyfclose__vsnprintf_chkendspentmallocumaskstrcasecmpgetspnam__ctype_b_locoptargstderralarmmunmap__snprintf_chk__memset_chkfwritesigactionwaitpidstrchracceptsleep__strcpy_chk__ctype_tolower_loc__cxa_finalizefreeaddrinfosetsidfcntlaccessmemmemstrcmp__asprintf_chk__libc_start_mainsnprintf__cxa_atexit_edata__bss_startXCRYPT_2.0LIBPAM_1.0krb5_3_MITGLIBC_2.15GLIBC_2.8GLIBC_2.4GLIBC_2.14GLIBC_2.3.4GLIBC_2.3GLIBC_2.2.5/opt/alt/openssl11/lib64:/opt/alt/krb5/usr/lib64:/opt/alt/cyrus-sasl/lib64   | `]  `/hZ )0  ii ii ti ii ui  7 7  ! 0!88!@!:H!;P!`!pDh!#p!Hx!K!)! `!!T!pW!!J!M   K f l m pX ` h p x                      ( 0 8 @ H  P !X "` #h $p %x & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ;( <0 =8 >@ ?H @P AX B` Ch Dp Ex F G H I J L M N O P Q R S T U V W X Y Z [ \( ]0 ^8 _@ `H aP bX c` dh ep gx h i j k n o q r s tHH9 HtH5r %s hhhhhhhhqhah Qh Ah 1h !h hhhhhhhhhhqhahQhAh1h!hhhh h!h"h#h$h%h&h'qh(ah)Qh*Ah+1h,!h-h.h/h0h1h2h3h4h5h6h7qh8ah9Qh:Ah;1h<!h=h>h?h@hAhBhChDhEhFhGqhHahIQhJAhK1hL!hMhNhOhPhQhRhShThUhVhWqhXahYQhZAh[1h\!h]h^h_h`hahbhchdhehfhgqhhahiQhjAhk1hl!hm% D% D%} D%u D%m D%e D%] D%U D%M D%E D%= D%5 D%- D%% D% D% D% D% D% D% D% D% D% D% D% D% D% D% D% D% D% D% D% D% D%} D%u D%m D%e D%] D%U D%M D%E D%= D%5 D%- D%% D% D% D% D% D% D% D% D% D% D% D% D% D% D% D% D% D% D% D% D% D%} D%u D%m D%e D%] D%U D%M D%E D%= D%5 D%- D%% D% D% D% D% D% D% D% D% D% D% D% D% D% D% D% D% D% D% D% D% D%} D%u D%m D%e D%] D%U D%M D%E D%= D%5 D%- D%% DAVH9E1AUATAUHSHH0HH5ldH%(HD$(1KH L- D H AM|H(HHDO'w$HcH>HH51J1]Hp H82H_ H84AMHD H8,erH0 H8e^AeTAE࿃AEAAM4MrH H81IHHАAMH H8d1t\H H;MH;uec8t[H HH5ϕ1IHH51gIHH51MIL[cAEH;8H?%H+1HHHHHXH5H HHHHgMH= HH5`MH= 1Bi H1HD$HD$$H=A H1dP61RH=]|AEt(H- 9]~1l1=V1HHH H<(H51GH5HH5ݓ1GHh H-d 1HH5M_GHX HHHH512GH 1HH5aGH HkH5=HH1FH HH5 1F*HȍH fH w H˞H5̒1FHH5H1_FHH51;F&HH5b1Ff.D1I^HHPTLyH ?yH=x H= H H9tH Ht H= H5 H)HHH?HHtHm HtfD= u+UH= Ht H= dm ]w1fAVIAUATIUSHdH%(HD$1LHD+H9HtlHuLHH}HCH HD$dH3%(H=KH[]A\A]A^kHY E;HHuxH1HL$dH3 %(H$H[]A\A]A^DH uHHD$dH3%(H=xLL1Hx L1Hrxu\HD$dH3%(uiH=xxL1HZweHD$dH3%(u-H=w@L1Hw%.f.@AVIAUAATAUSHHrDELHI1HxHH[]A\A]A^ff.fSHdH%(H$1HJ H8HHH^=HH| HHd H5wx;H H=R H5wH< W;H( H=1 H5wH 6;H 1H$dH3 %(u_H[Ð1H=)wBuH=wDfH= 1HtR1HپHvfDAWAVAUATUSH dH%(H$ 1HD$H6IH*IHIHH$LHYEH= IH1H5v:t.H'Ht/H= tnM1L$LvLH= 1L9IHt*/HHHxLH;HunL59M@HIcHSD)HLvPHc1AV=H BD(=iH<$HT$H(H<$Ht$ H\$0HE1E1t$(HLjjHT$0H|$ ~H Ht$ H<$RH5{ H<$HtHT$xH<$H LD$H5< Hl$(HHmHL$IE1HT$H<$HŅH=|IHt$H<$Ht$H<$H<$HHt$Ht H<$MH<$$LH$ dH3 %(NH []A\A]A^A_1HsHH$ dH3%(H=sH []A\A]A^A_@1HtH$ dH3%(H=tH4$¿H sHt$H<$H<$2H$ dH3%(ZZfD1HethH$ dH3%(%H=btDH;HIIH4$¿H /sH<$H$ dH3%(@H=ItH4$H VsIDH;\HIrL DrcH4$H r¿iHt$H<$KH<$HoHt$Ht H<$H<$H$ dH3%(7H4$H \rHt$H<$H<$H$ dH3%(uH=sHˇHHL ^qHzf.H4$¿H qyHt$H<$[H<$HH<$H$ dH3%(HEHf.fD1fAWHcAVIHIAUIATUSH(HT$dH%(HD$1HIHD$A_1H$EIAtSI}jHHIHADHEH9PHIAuI}H$ 4IHt$LxLI}HHIf;HHIADqHgqEt)ELHIl@H;Ht HH9uLHL$dH3 %(H([]A\A]A^A_f1LHRqEHHIADfHD$L 1|I}HpH1SHHH@dH %(HL$81HT$ H|$ HL$Ht$(HHHT$HT$HD$0H\$H|$H|$0ÅuTH|$ÅH|$1HD$8dH3%(H@H=u[f.H|$HKpH1H|$HD$8dH3%(H@H=p[H|$HoH1yHD$8dH3%(umH@H= p[8H|$THoH1)H|$HD$8dH3%(uH@H=o[SH|HcHtV"HHu>fDHHHΈHt"Hq"t\uH\Hu޺"f[ff. tu*H5fDH5 H/o1ff.AWAVIAULcATAE}US1HDl$Hl$0HT$dH%(H$1DAL?)HD$ H$I@H1HLL$11HDL d0HD$ HD$(LXHcLd0t'|$L)Hc~tÁBHcA|6 sH|$Ht$HT$Ht$LHWHFfDH$dH3%(uH[]A\A]A^A_ÐUSHHdH%(HD$81HO HH./HH H-QhHtHhH=u Ht+HfHHD$H R HB$B,BD$$u|H Qu%Ht$8dH34%(HH[]f.HI H3mHHD ط 1H=· }H 떉H IHlI1_`1Hjl=>>ff.HHl1AWAVIAUL-oATL%oUH-oSHHt$HLuHHWD8 LL LL LH=oH1 D; HD;A tA tIEXH=#~DH u4D;H[]A\A]A^A_H uND;fHL$M1HnD;fDLsD;뒽HL$M1HngL5TAWAVAUATUSHH|$H4$dH%(H$x1HH<$L=$ M+Hl$`H$pL-jEDH E&IILHH HHD ܴ 1M(MAW AwAoAąxAWIwiDHAwIID jA HI^_PHߺH5~ml4 H5mmHX4#H H H\$`HpHxj11A IZYRH۳ IؾHiHH HHD 1H$xdH3%(H=iHĈ[]A\A]A^A_=DH5H$H5 HSsHD =HH5lHƄHtH=}lH0H=dlHH=LlHyH|$H<$HIH3HHL- lHD$L=kLl$Hl$ LLt$@HD$(HkHD$0HD$8L|$PHD$HHٳ HD$XLl$LD01$H.L&<$HzHDHcAHS H mkL|$ HL$HD$HD$(ELD501A+ApDIHt$HƄ,nH$xdH3%(fD1HfH$xdH3%(uH=j&DH$xdH3%(uH=gf H5iH0H(g1?DgH$xdH3%(EH=f1HپHNgD!H$xdH3%(H=cg[Hi1bH iHi1lH$xdH3%(H=hHhMILH i1=IHtHDSHf1 H$xdH3%(H=fu1H hHhDH$xdH3%(tfDHgpHDHfTH$xdH3%(~H=gDuHfH ZhH5WgH=kgzH ;hH58gH=>g[f.AWAVAUATUSHHzL`2ILHHMI1L-gnAA< vpLyM9v)MHDL$LH $H $DL$HtkHH| M1HHLI9t$D Dʃ߃AwHDL HI9uHHH[]A\A]A^A_H1dHff.f tu*H5&fDH5 Hf1H5fL(ff.SH@dH%(H$81H H8HVH\$0H,#HHz HuH H5fF!H H=P H5fH %!H. H=/ H5ofHi !H H= H5[fH H HcH=۫ UH= HtdHfH5 H= D$H HB$B,BD$$H ] QH$8dH3%(#H@[fD1H=A\ZuH=1\f.H= HH 1HپHdqHI HeHHD 1aH= 5Hu "1HEe(wL H I1HCeff.@AWAVAUATUSHH H|$H4$HL$dH %(H$8 1HMH<$#L5 MLd$0H$0L-e@H D;MILHH HHD ̨ 1-Mv(MAV AvA~ÅxAVIvfHAvMI~D8jA HH ^_RHH5b( H5aL(%DH HH\$0HpHxj11A IZYJHk IؾHdHH HHD 1H$8 dH3%(H=C^HH []A\A]A^A_DH5'H5 H|$L- H<$HH|$IH$HMHHD$?H6HH<$IĉD$H|$AHD$ LIljD$L1LD$ I|f1:%@HH9uE9ELE9ELMA̍|HcIcHD$(IHL$ Hu(AD9l$(tYIcHHLWIHEHL?HEHAEnDD08fDD$(dHct$(H]HIH:En|IH@H|$ H5:H HD$H@LE17H|$XH|$wHct$,H|$HI1蟴IcFHIHHHHв;H|$LufDH|$Hct$,AWLID$PLL$0Hct$,H|$H\I1'Hct$,LL$ 1LSIH|$HH|$HHct$,HI1ӳ蹱fH1HGI耱HfDH1H1IPHfDAUAATIUSHH$HL$PL$Xt@)$`)$p)$)$)$)$)$)$dH%(H$(1H\$ ILL$H$HHD$H$0D$D$ 0HD$H=y 1B蘤z E1XMmL茣HXHHy HvHLL-z H H=\y HH5i>eHFy Hf1 LH1HI}fz l1Ҿf y ,Éy 1Ln赡L-x eLh賢?蹧 ^1LH=H5?wA$tM[]A\A]A^L-^y EfDH x H=H5m?1[H9H5I?1趤豠H<H5 ?1>H=HH5>1gbLH<H5>1H<H+LHx<H5>1L赠Hw<HrLH">H5[>1{Hk<H8跟H v H=H5>1=H8Hff.AWAVAUATUSHXL5w dH%(HD$H1Ll$Hl$ A`v n HHD$(D$ HD$0 HfDD#A;=w 1H膠uA=v Hu H5u OD;AA tQHD$(D$ HD$0 =v 1HuAZAtHit A@DuD踢LD0HD裤A@1۝H H:H5D<1H:H5$<1D>H8HH5;1wA%1B={u DDDáLD@HD賣A1H9H5e;AAuAfDH9H54;1DNH9H H91L$ H5:L$ H6H5:H1ff.fUSH8Hwt dH%(HD$(1 uB=8t 询H- s H@HD$(dH3%(H8[]@=s HHD$$HD$L=s AH-r HҜoHH8H591MHH8H591sG蹞fATH v91UH- p H!<SH}ǠHPp H Ht'L%;H}L1H虠H HuHMH=,9G1蠞SHo H=8H H H=8H >H=;H ,H=;ԠH ?H=;軠H ]H=;袠H SH=F<艠H 5H=<pH AH=<WH H=;8>H FH=<%H DH=< H EH==H #H=G=ڟH 7H=V=H =H=u=訟H HH==菟H AH==vH (H=>]H (H=>D1}ff.fS@Hp u1膚[HcH 7H561͐USHHp u9u 1ΝfDSH6H56171蠝-t @ugH=s =s pH=s 蛛ud1o s 1H6H561(諜9=s uSH=ls 7tfDH As H6H551OSf.H s H5H5m51DH=r dPXH/1H5+5H薚fDAWIAVAUATIUHSHHL-n dH%(H$1AEtHt 9Lt$LLHMH<H]n LHLHHPE1IHH=&LH=%LHn HL*uoLǖIWIMHH4HHFH541RH;AUXZH$dH3%(LHĘ[]A\A]A^A_1LH;H53cL H$dH3%(^HĘH=4[]A\A]A^A_GH=%4AIfDLDD$ CAEIBTCIPL9u1 fDHtAtHrH9uIT$@D06H1\HH9uH1@LH1HX 1H1@LHH$dH3%(uLH([]A\A]Ld$T$ LT$ HL1Hl$pLH1ff.fUHSHdH%(H$1HHBHHHKHHʉWPTʉW H9uH$dH3%(u H[]jf.HHfHH9u1ʉTʉTXHHuGhGU1HSHHXHHH1HHH[1]AWAVIAUAATIULSH(dH%(H$1H\$@QH$HHVAH@HH9uL$LMOAMf.AIM9uDIE1u ;fDICBIPM9u1 HA A HJI9uHV@06H7\HH9u1HHt$>Ht$1Hߺ@ZD1LHJH1Hm1H1@LH!1HH1HH2H$dH3%(uTH([]A\A]A^A_H\$1L$HL$LH1Lt$pHL1m}fDAWIAVIAUAATL%,I UH-,I SL)HsHt1LLDAHH9uH[]A\A]A^A_ff.f.HH 1|HHgetpwentkerberos5pamrimapshadowDEBUG: auth_getpwent: getpwnam(%s) failure: %mNO Username lookup failure: %sNO Username lookup failure: unknown error (ENOMEM formatting strerror())DEBUG: auth_getpwent: getpwnam(%s): invalid usernameDEBUG: auth_getpwent: %s: invalid passwordNO Invalid usernameNO Incorrect passwordDEBUG: auth_getpwent: OK: %sauth_krb5: %s: %s (%d) /etc/saslauthd.confauth_krb5_init %skrb5_keytabkrb5_verify_principalkrb5_servername@/auth_krb5: krb5_init_contextNO saslauthd internal errorkrb5_conv_krb4_instancekrb5_%s_instance%s%s%s%skrb5_parse_namekrb5_get_init_creds_opt_allockrb5_get_init_creds_passwordkrb5_kt_resolvekrb5_sname_to_principalkrb5_verify_init_credsauth_krb5: NULL password or username?NO saslauthd NULL password or usernameauth_krb5: form_principal_nameNO saslauthd principal name errorNO krb5_get_init_creds_password failedNO krb5_verify_init_creds failedDEBUG: saslauthd_pam_conv: strdup failedDEBUG: saslauthd_pam_conv: unable to read login prompt string: %sDEBUG: saslauthd_pam_conv: unknown prompt string: %sDEBUG: auth_pam: pam_start failed: %sDEBUG: auth_pam: pam_authenticate failed: %sDEBUG: auth_pam: pam_acct_mgmt failed: %sNO PAM start errorNO PAM auth errorNO PAM acct errorauth_rimap: unexpected signal %drimap_init: no hostname specifiedauth_rimap_init: getaddrinfo %s/%s: %sauth_rimap_init: no IP address info for %sauth_rimap: unexpected response to auth request: %sauth_rimap: connect %s[%s]/%s: %mauth_httpform: no address givenauth_rimap: couldn't connect to %s/%sNO [ALERT] Couldn't contact remote authentication serverNO [ALERT] error synchronizing with remote authentication serverauth_rimap: read (banner): buffer overflowNO [ALERT] The remote authentication server is currently unavailableauth_rimap: unexpected response during initial handshake: %sNO [ALERT] Unexpected response from remote authentication serverauth_rimap: qstring(login) == NULLNO [ALERT] saslauthd internal errorauth_rimap: qstring(password) == NULLauth_rimap: read (response): %mauth_rimap: read (response): buffer overflowOK remote authentication successfulNO remote server rejected your credentials saslauthd OKsaslauthd NO* CAPABILITYauth_rimap: [%s] %sauth_rimap.clogin != NULLpassword != NULLunknownNO [ALERT] No address givenauth_rimap: read (banner): %m * NO* BYE* OKsaslauthd LOGIN auth_rimap: sending %s%s %sauth_rimap: writev %s: %msaslauthd LOGOUTauth_rimap: sending %sauth_rimap%%%02Xunexpected signal %dauth_httpformauth_httpform_init %shttpform_hosthttpform_porthttpform_urihttpform_dataauth_httpform.cuser != NULLfailed to allocate memoryauth_httpform: [%s] %s200204403NO %s80localhostauth_httpform_init formdata and uri must be specifiedauth_httpform_init: getaddrinfo %s/%s: %sauth_httpform_init: no IP address info for %sauth_httpform: connect %s[%s]/%s: %mauth_httpform: couldn't connect to %s/%sauth_httpform:create_post_dataauth_httpform: create_post_data == NULLPOST %s HTTP/1.1 Host: %s:%s Connection: close User-Agent: saslauthd Accept: */* Content-Type: application/x-www-form-urlencoded Content-Length: %d %sauth_httpform: sending %s %s %sauth_httpform: failed to send requestauth_httpform: read (response): %munexpected response to auth request: %s %sauth_httpformDEBUG: auth_shadow: getpwnam(%s) failure: %mDEBUG: auth_shadow: getpwnam(%s): invalid usernameDEBUG: auth_shadow: getspnam(%s) failure: %mNO Username shadow lookup failure: %sNO Username shadow lookup failure: unknown error (ENOMEM formatting strerror())DEBUG: auth_shadow: getspnam(%s): invalid shadow usernameDEBUG: auth_shadow: sp->sp_pwdp == SHADOW_PW_EPERMNO Insufficient permission to access NIS authentication database (saslauthd)DEBUG: auth_shadow: pw mismatch: '%s' != '%s'DEBUG: auth_shadow: account expired: %ld > %ldDEBUG: auth_shadow: password expired: %ld + %ld < %ldNO Invalid shadow username*NP*NO Account expiredNO Password expiredDEBUG: auth_shadow: OK: %scache timeout must be positivecache size must be positive and non zerofailed while writing to mmap file: %scould not mmap shared memory segmentmmaped shared memory segment on file: %sattempting a write lock on slot: %dcould not acquire a write lock on slot: %d attempting a read lock on slot: %dcould not acquire a read lock on slot: %d attempting to release lock on slot: %dcould not release lock on slot: %d [login=%s] [service=%s] [realm=%s]: %sfound with invalid passwd, update pendingcould not allocate memory/cache.mmapcould not open mmap file: %sopen: %smmap: %scache mmap file removed: %s/cache.flockcould not open flock file: %sflock file opened at %sSASLAUTHD_CACHE_MAGICbucket size: %d bytesstats size : %d bytestimeout : %d secondscache table: %d total bytescache table: %d slotscache table: %d bucketsflock file removed: %sfcntl: %sfound with valid passwdnot found, update pendinglookup committedcfile_read: no memorycfile_read: cannot open %s%s: line %d: no colon separator%s: line %d: keyword %s: no valuekrbtf_init: not compiled!krbtf_name: not compiled!saslauthd[%d] :%s%s %-16s: %swrite failurewrite: %sread failureread: %sresponse: %sNULL login receivedNULL password receivedNULL response from mechanism/mux.acceptusing accept lock file: %s/muxcould not create socketcould not bind to socket: %sbind: %scould not chmod socket: %schmod: %slisten: %slistening on socket: %sacquired accept lockreleased accept locksocket accept failureaccept: %scould not release accept lockcould not acquire accept lockaccept lock file removed: %ssocket removed: %slogin exceeded MAX_REQ_LEN: %dpassword exceeded MAX_REQ_LEN: %dservice exceeded MAX_REQ_LEN: %drealm exceeded MAX_REQ_LEN: %dcould not open accept lock file: %scould not listen on socket: %s2.1.28usage: saslauthd [options] option information: mechanism. child exited: %luchild exited: %dpid file removed: %spid file lock removed: %smaster exited: %dUnknownNO internal mechanism failuresigaction: %sfork failed, retryingCannot start saslauthdCheck syslog for errorsfailed to set session id: %s/dev/nullfailed to open /dev/null: %s%lu master pid is: %lucould not fork child processfork: %sforked child: %lustarting %sa:cdhO:lm:n:rs:t:vV/run/saslauthdcan not mkdir: %snum_procs : %dmech_option: NULLmech_option: %srun_path : %sauth_mech : %scould not chdir to: %schdir: %s/saslauthd.pid.lockcan't create startup pipeusing process modelsaslauthd %s authentication mechanisms: -a Selects the authentication mechanism to use. -c Enable credential caching. -d Debugging (don't detach from tty, implies -V) -r Combine the realm with the login before passing to authentication mechanism Ex. login: "foo" realm: "bar" will get passed as login: "foo@bar" The realm name is passed untouched. -O