From 5e31e90c742740ad39bdfc53ebaa1f122b29c82d Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sun, 10 Feb 2002 18:05:04 +0000 Subject: [PATCH] Fix compile error properly --- servers/slapd/sasl.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/servers/slapd/sasl.c b/servers/slapd/sasl.c index 0a97f945fc..4765c6f860 100644 --- a/servers/slapd/sasl.c +++ b/servers/slapd/sasl.c @@ -504,6 +504,20 @@ slap_sasl_authorize( authzid ? authzid : "" ); #endif + /* Figure out how much data we have for the dn */ + rc = sasl_getprop( conn->c_sasl_context, SASL_REALM, (void **)&realm ); + if( rc != SASL_OK && rc != SASL_NOTDONE ) { +#ifdef NEW_LOGGING + LDAP_LOG(( "sasl", LDAP_LEVEL_ERR, + "slap_sasl_authorize: getprop(REALM) failed.\n" )); +#else + Debug(LDAP_DEBUG_TRACE, + "authorize: getprop(REALM) failed!\n", 0,0,0); +#endif + *errstr = "Could not extract realm"; + return SASL_NOAUTHZ; + } + /* Convert the identities to DN's. If no authzid was given, client will be bound as the DN matching their username */ rc = slap_sasl_getdn( conn, (char *)authcid, realm, &authcDN, FLAG_GETDN_AUTHCID ); -- 2.39.5