---
name: "sasl_client_init"
section: "3"
platform: "linux"
package: "libsasl2-dev"
version: "2.1.28+dfsg1-9"
release: "Debian 13 (Trixie)"
platforms: ["linux", "macos"]
url: "https://new.carta.tech/sasl_client_init"
---

# sasl\_client\_init(3)

Cyrus SASL documentation

## NAME

sasl\_client\_init - Cyrus SASL documentation

## SYNOPSIS

```
#include <sasl/sasl.h>
int sasl_client_init(const  sasl_callback_t *callbacks )
```

## DESCRIPTION

**sasl\_client\_init** initializes SASL.

It  must  be  called  before  any  calls  to *[sasl\_client\_start(3)](/sasl_client_start/3.md)*. This call initializes all SASL client  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.

## RETURN VALUE

SASL  callback  functions should return SASL return codes. See sasl.h for a complete list. *SASL\_OK* indicates success.

The following return codes indicate errors and should either be handled or the authentication session should be quit:

- •

  *SASL\_BADVERS*: Mechanism version mismatch

- •

  *SASL\_BADPARAM*: Error in config file

- •

  *SASL\_NOMEM*: Not enough memory to complete operation

## SEE ALSO

*RFC 4422*,:saslman:*[sasl(3)](/sasl/3.md)*, *[sasl\_callbacks(3)](/sasl_callbacks/3.md)*, *[sasl\_client\_new(3)](/sasl_client_new/3.md)*, *[sasl\_client\_start(3)](/sasl_client_start/3.md)*, *[sasl\_client\_step(3)](/sasl_client_step/3.md)*

## AUTHOR

The Cyrus Team

## COPYRIGHT

1993-2016, The Cyrus Team
