1.. saslman:: sasl_server_userdb_setpass_t(3)
2
3.. _sasl-reference-manpages-library-sasl_server_userdb_setpass_t:
4
5
6=============================================================================
7**sasl_server_userdb_setpass_t** - UserDB Plaintext Password Setting Callback
8=============================================================================
9
10Synopsis
11========
12
13.. code-block:: C
14
15    #include <sasl/sasl.h>
16
17    int sasl_server_userdb_setpass_t(sasl_conn_t *conn,
18                                     void *context,
19                                     const char *user,
20                                     const char *pass,
21                                     unsigned passlen,
22                                     struct propctx *propctx,
23                                     unsigned flags)
24
25Description
26===========
27
28.. c:function:: int sasl_server_userdb_setpass_t(sasl_conn_t *conn,
29        void *context,
30        const char *user,
31        const char *pass,
32        unsigned passlen,
33        struct propctx *propctx,
34        unsigned flags)
35
36    **sasl_server_userdb_setpass_t** is used to store or change  a plaintext
37    password  in the callback‐supplier’s user database.
38
39    :param conn: is the SASL connection
40
41    :param context: context from the callback record
42
43    :param user: NUL terminated user name with `user@realm` syntax
44
45    :param pass: password to check (may not be NUL terminated)
46
47    :param passlen: length of the password
48
49    :param propctx: Auxilliary Properties (not stored)
50
51    :param flags: These  are  the  same  flags  that  are  passed  to
52        :saslman:`sasl_setpass(3)`, and are documented on that man page.
53
54Return Value
55============
56
57SASL  callback  functions should return SASL return codes.
58See sasl.h for a complete list. :c:macro:`SASL_OK` indicates success.
59
60Other return codes indicate errors and should be handled.
61
62See Also
63========
64
65:rfc:`4422`,:saslman:`sasl(3)`, :saslman:`sasl_errors(3)`
66:saslman:`sasl_callbacks(3)`, :saslman:`sasl_server_userdb_checkpass_t(3)`,
67:saslman:`sasl_setpass(3)`
68