macosmacos-mojavesaslcyrus

What is the status of SASL on macOS in 2019?


I have a linux application I am trying to compile on macOS. It relies on Cyrus SASL library.

During compilation I get deprecation warnings related to SASL, but the app compiles and seems to work.

/Users/travis/build/apache/qpid-proton/c/src/sasl/cyrus_sasl.c:101:30: warning: 'sasl_errdetail' is deprecated: first deprecated in macOS 10.11 [-Wdeprecated-declarations]
    const char* err = conn ? sasl_errdetail(conn) : sasl_errstring(r, NULL, NULL);

Cyrus SASL on linux comes with utility program saslpasswd2. This does not seem to be present on macOS.

I want to ask what is the Apple-recommended way to provide SASL on macOS that would give me the libraries to compile against and saslpasswd2 utility.


Solution

  • Cyrus SASL can be installed using MacPorts, https://www.macports.org/.

    sudo port install cyrus-sasl2
    

    When this is done, then /opt/local/sbin/saslpasswd2 is added to the system. Because /opt/local/{bin,sbin} is the default path where MacPorts installs things.