1.. saslman:: sasl_setpass(3) 2 3.. _sasl-reference-manpages-library-sasl_setpass: 4 5 6============================================= 7**sasl_setpass** - Check a plaintext password 8============================================= 9 10Synopsis 11======== 12 13.. code-block:: C 14 15 #include <sasl/sasl.h> 16 17 int sasl_setpass(sasl_conn_t *conn, 18 const char *user, 19 const char *pass, unsigned passlen, 20 const char *oldpass, unsigned oldpasslen, 21 unsigned flags) 22 23Description 24=========== 25 26.. c:function:: int sasl_setpass(sasl_conn_t *conn, 27 const char *user, 28 const char *pass, unsigned passlen, 29 const char *oldpass, unsigned oldpasslen, 30 unsigned flags) 31 32 **sasl_setpass** will set passwords in the sasldb, and trigger the setpass 33 callbacks for all available mechanisms. 34 35 :param conn: is the SASL connection context 36 37 :param user: is the username to set the password for 38 39 :param pass: the password to set 40 :param passlen: length of the password to set (`pass`) 41 42 :param oldpass: optional. The old password. 43 :param oldpasslen: optional. The old password length. 44 45 :param flags: are flags including `SASL_SET_CREATE` and 46 `SASL_SET_DISABLE` (to cause the creating of nonexistent accounts and the 47 disabling of an account, respectively) 48 49 `oldpass` and `oldpasslen` are unused in the Cyrus SASL implementation, though 50 are passed on to any mechanisms that may require them. 51 52 53Return Value 54============ 55 56SASL callback functions should return SASL return codes. 57See sasl.h for a complete list. :c:macro:`SASL_OK` indicates success. 58 59Other return codes indicate errors and should be handled. 60 61See Also 62======== 63 64:rfc:`4422`,:saslman:`sasl(3)`, :saslman:`sasl_errors(3)`, 65:saslman:`sasl_checkpass(3)` 66