1.. saslman:: sasl_usererr(3)
2
3.. _sasl-reference-manpages-library-sasl_usererr:
4
5
6===============================================================================
7**sasl_usererr** - Remove information leak about accounts from sasl error codes
8===============================================================================
9
10Synopsis
11========
12
13.. code-block:: C
14
15    #include <sasl/sasl.h>
16
17    static int sasl_usererr(int saslerr)
18
19Description
20===========
21
22.. c:function::  int sasl_usererr(int saslerr)
23
24    **sasl_usererr** is called to hide any potential data leaks to a client,
25    by preventing a client from discovering if a username exists or if
26    a user exists but the password is wrong.
27
28    :param saslerr: specifies the error number to convert.
29
30    This function should be called before calling :saslman:`sasl_errstring(3)`
31    or :saslman:`sasl_errdetail(3)` if information is being passed to a client.
32
33Return Value
34============
35
36Returns a client-safe error code.
37
38See Also
39========
40
41:rfc:`4422`,:saslman:`sasl(3)`, :saslman:`sasl_errdetail(3)`,
42:saslman:`sasl_errors(3)`, :saslman:`sasl_errstring(3)`
43