GNU/Linux |
CentOS 2.1AS(Slurm) |
|
![]() |
sasl_listmech(3) |
![]() |
sasl_listmech − Retrieve a list of the supported SASL mechanisms
#include <sasl.h>
int sasl_listmech(sasl_conn_t *conn,
const char *user, | |||
const char *prefix, | |||
const char *sep, | |||
const char *suffix, | |||
char **result, | |||
unsigned *plen, | |||
unsigned *pcount); |
sasl_listmech() 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.
conn the SASL context for this connection user (optional) restricts the mechanism list to only those available to the user. prefix appended to beginning of result sep appended between mechanisms suffix appended to end of result result NULL terminated result string (allocated by library) plen length of result filled in by library. May be NULL pcount Number of mechanisms available. May be NULL
Example:
sasl_listmech(conn,NULL,"(",",",")",&mechlist,NULL,NULL);
may give the
string
(ANONYMOUS,KERBEROS_V4,DIGEST-MD5)
as a result
sasl_server_step returns an integer which corresponds to one of the following codes. SASL_OK indicates that the authentication is complete. All other return codes indicate errors and should either be handled or the authentication session should be quit.
SASL_OK |
Success. Authentication complete |
SASL_CONTINUE
Success. keep going.
SASL_INTERACT
user interaction needed to fill in prompt_need list
SASL_BADVERS
Mechanism version mismatch
SASL_BADPARAM
error in config file
SASL_NOMEM
not enough memory to complete operation
RFC 2222
othersaslstuff
![]() |
sasl_listmech(3) | ![]() |