1038:Change result code for bind with DN but no password
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | * Portions Copyright 2006-2007 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.core; |
| | | |
| | |
| | | if (DirectoryServer.bindWithDNRequiresPassword() && |
| | | ((bindDN != null) && (! bindDN.isNullDN()))) |
| | | { |
| | | setResultCode(ResultCode.INVALID_CREDENTIALS); |
| | | setResultCode(ResultCode.UNWILLING_TO_PERFORM); |
| | | |
| | | int msgID = MSGID_BIND_DN_BUT_NO_PASSWORD; |
| | | String message = getMessage(msgID); |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | * Portions Copyright 2006-2007 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.core; |
| | | |
| | |
| | | BindOperation bindOperation = |
| | | conn.processSimpleBind(new ASN1OctetString("cn=Directory Manager"), |
| | | new ASN1OctetString()); |
| | | assertEquals(bindOperation.getResultCode(), ResultCode.INVALID_CREDENTIALS); |
| | | assertEquals(bindOperation.getResultCode(), ResultCode.UNWILLING_TO_PERFORM); |
| | | } |
| | | |
| | | |