| | |
| | | import java.text.ParseException; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.concurrent.locks.Lock; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.server.ConfigurationChangeListener; |
| | | import org.opends.server.admin.std.server.CramMD5SASLMechanismHandlerCfg; |
| | |
| | | userDN = rootDN; |
| | | } |
| | | |
| | | // Acquire a read lock on the user entry. If this fails, then so will the |
| | | // authentication. |
| | | final Lock readLock = LockManager.lockRead(userDN); |
| | | if (readLock == null) |
| | | { |
| | | bindOperation.setResultCode(ResultCode.BUSY); |
| | | bindOperation.setAuthFailureReason(INFO_SASLCRAMMD5_CANNOT_LOCK_ENTRY.get(userDN)); |
| | | return; |
| | | } |
| | | |
| | | try |
| | | { |
| | | userEntry = DirectoryServer.getEntry(userDN); |
| | |
| | | bindOperation.setAuthFailureReason(message); |
| | | return; |
| | | } |
| | | finally |
| | | { |
| | | LockManager.unlock(userDN, readLock); |
| | | } |
| | | } |
| | | else |
| | | { |