附录 A. LDAP 结果码 (LDAP Result Codes)
LDAPResult 中的 resultCode 指示 operation 的结果. 常见成功和错误状态包括:
| 名称 (Name) | 值 (Value) | 含义 |
|---|---|---|
success | 0 | operation 成功完成. |
operationsError | 1 | server 检测到 operation 顺序或协议状态错误. |
protocolError | 2 | request 不符合 LDAP 协议语法或语义. |
timeLimitExceeded | 3 | operation 超出时间限制. |
sizeLimitExceeded | 4 | Search result 超出大小限制. |
compareFalse | 5 | Compare operation 判断为 false. |
compareTrue | 6 | Compare operation 判断为 true. |
authMethodNotSupported | 7 | server 不支持请求的 authentication method. |
strongerAuthRequired | 8 | server 要求更强的认证或安全保护. |
referral | 10 | server 返回 referral, 指向其他 LDAP URI. |
adminLimitExceeded | 11 | 超出管理策略限制. |
unavailableCriticalExtension | 12 | critical control 或 extension 不可用. |
confidentialityRequired | 13 | operation 需要 confidentiality protection. |
saslBindInProgress | 14 | SASL bind 仍在进行中. |
名称解析, attribute 约束, update 冲突和 service 状态也有对应结果码, 例如 noSuchObject, invalidDNSyntax, insufficientAccessRights, entryAlreadyExists, objectClassViolation, unavailable 和 other. 实现必须保留未知 result code 的数值语义, 并按扩展注册规则处理未来分配的代码.