---
name: "sasl_getprop"
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_getprop"
---

# sasl\_getprop(3)

Cyrus SASL documentation

## NAME

sasl\_getprop - Cyrus SASL documentation

## SYNOPSIS

```
#include <sasl/sasl.h>
int sasl_getprop(sasl_conn_t *conn,
                int propnum,
                const void ** pvalue);
```

## DESCRIPTION

- **int sasl\_getprop(sasl\_conn\_t \*conn,**

  - **int propnum,**

  - **const void \*\* pvalue);**

  **sasl\_getprop**  gets the value of a SASL property. For example after successful authentication a server may  wish  to know  the  authorization name. Or a client application may wish to know  the  strength  of  the negotiated  security layer.

  - **Parameters**

    - •

      **conn** – is the SASL connection context

    - •

      **propnum** – is the identifier for the property requested

    - •

      **pvalue** –

      is filled on success. List of properties:

      - •

        SASL\_USERNAME     ‐  pointer to NUL terminated user name

      - •

        - **SASL\_SSF ‐ security layer security strength factor,**

          if 0, call to *[sasl\_encode(3)](/sasl_encode/3.md)*, *[sasl\_decode(3)](/sasl_decode/3.md)* unnecessary

      - •

        SASL\_MAXOUTBUF    ‐  security layer max output buf unsigned

      - •

        SASL\_DEFUSERREALM ‐  server authentication realm used

      - •

        SASL\_GETOPTCTX    ‐  context for getopt callback

      - •

        SASL\_IPLOCALPORT  ‐  local address string

      - •

        SASL\_IPREMOTEPORT ‐  remote address string

      - •

        SASL\_SERVICE      ‐  service passed to *sasl\_\*\_new*

      - •

        SASL\_SERVERFQDN   ‐  serverFQDN passed to *sasl\_\*\_new*

      - •

        - **SASL\_AUTHSOURCE ‐ name of auth source last used, useful for failed**

          authentication tracking

      - •

        SASL\_MECHNAME     ‐  active mechanism name, if any

      - •

        SASL\_PLUGERR      ‐  similar to *sasl\_errdetail*

## RETURN VALUE

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

Other return codes indicate errors and should be handled.

## SEE ALSO

*RFC 4422*,:saslman:*[sasl(3)](/sasl/3.md)*, *[sasl\_errors(3)](/sasl_errors/3.md)* *[sasl\_server\_new(3)](/sasl_server_new/3.md)*, *[sasl\_client\_new(3)](/sasl_client_new/3.md)*

## AUTHOR

The Cyrus Team

## COPYRIGHT

1993-2016, The Cyrus Team
