5 /* xsasl_cyrus_security 3
7 /* convert Cyrus SASL security properties to bit mask
9 /* #include <xsasl_cyrus_common.h>
11 /* int xsasl_cyrus_security_parse_opts(properties)
12 /* const char *properties;
14 /* xsasl_cyrus_security_parse_opts() converts a list of security
15 /* properties to a bit mask. The result is zero in case of error.
19 /* A comma or space separated list of zero or more of the
23 /* Disallow authentication methods that use plaintext passwords.
25 /* Disallow authentication methods that are vulnerable to
26 /* non-dictionary active attacks.
28 /* Disallow authentication methods that are vulnerable to
29 /* passive dictionary attack.
31 /* Disallow anonymous logins.
34 /* Warning: bad input.
38 /* The Secure Mailer license must be distributed with this software.
41 /* IBM T.J. Watson Research
43 /* Yorktown Heights, NY 10598, USA
50 /* Utility library. */
52 #include <name_mask.h>
54 /* Application-specific. */
56 #include <xsasl_cyrus_common.h>
58 #if defined(USE_SASL_AUTH) && defined(USE_CYRUS_SASL)
63 * SASL Security options.
65 static const NAME_MASK xsasl_cyrus_sec_mask
[] = {
66 "noplaintext", SASL_SEC_NOPLAINTEXT
,
67 "noactive", SASL_SEC_NOACTIVE
,
68 "nodictionary", SASL_SEC_NODICTIONARY
,
69 "noanonymous", SASL_SEC_NOANONYMOUS
,
70 #if SASL_VERSION_MAJOR >= 2
71 "mutual_auth", SASL_SEC_MUTUAL_AUTH
,
76 /* xsasl_cyrus_security - parse security options */
78 int xsasl_cyrus_security_parse_opts(const char *sasl_opts_val
)
80 return (name_mask_opt("SASL security options", xsasl_cyrus_sec_mask
,
81 sasl_opts_val
, NAME_MASK_RETURN
));