1.. saslman:: sasl_getprop(3)
2
3.. _sasl-reference-manpages-library-sasl_getprop:
4
5
6======================================
7**sasl_getprop** - Get a SASL property
8======================================
9
10Synopsis
11========
12
13.. code-block:: C
14
15    #include <sasl/sasl.h>
16
17    int sasl_getprop(sasl_conn_t *conn,
18                    int propnum,
19                    const void ** pvalue);
20
21Description
22===========
23
24.. c:function::  int sasl_getprop(sasl_conn_t *conn,
25        int propnum,
26        const void ** pvalue);
27
28    **sasl_getprop**  gets the value of a SASL property. For example after
29    successful authentication a server may  wish  to know  the  authorization
30    name. Or a client application may wish to know  the  strength  of  the
31    negotiated  security layer.
32
33    :param conn: is the SASL connection context
34
35    :param propnum: is the identifier for the property requested
36
37    :param pvalue: is filled on success. List of properties:
38
39        * SASL_USERNAME     ‐  pointer to NUL terminated user name
40        * SASL_SSF          ‐  security layer security strength factor,
41            if 0, call to :saslman:`sasl_encode(3)`, :saslman:`sasl_decode(3)`
42            unnecessary
43        * SASL_MAXOUTBUF    ‐  security layer max output buf unsigned
44        * SASL_DEFUSERREALM ‐  server authentication realm used
45        * SASL_GETOPTCTX    ‐  context for getopt callback
46        * SASL_IPLOCALPORT  ‐  local address string
47        * SASL_IPREMOTEPORT ‐  remote address string
48        * SASL_SERVICE      ‐  service passed to `sasl_*_new`
49        * SASL_SERVERFQDN   ‐  serverFQDN passed to `sasl_*_new`
50        * SASL_AUTHSOURCE   ‐  name of auth source last used, useful for failed
51            authentication tracking
52        * SASL_MECHNAME     ‐  active mechanism name, if any
53        * SASL_PLUGERR      ‐  similar to `sasl_errdetail`
54
55
56Return Value
57============
58
59SASL  callback  functions should return SASL return codes.
60See sasl.h for a complete list. :c:macro:`SASL_OK` indicates success.
61
62Other return codes indicate errors and should be handled.
63
64See Also
65========
66
67:rfc:`4422`,:saslman:`sasl(3)`, :saslman:`sasl_errors(3)`
68:saslman:`sasl_server_new(3)`, :saslman:`sasl_client_new(3)`
69