ldb: always return PROTOCOL_ERROR if an operation is unsupported
authorMatthias Dieter Wallnöfer <mdw@samba.org>
Mon, 18 Oct 2010 19:21:45 +0000 (21:21 +0200)
committerMatthias Dieter Wallnöfer <mdw@samba.org>
Mon, 18 Oct 2010 19:51:19 +0000 (19:51 +0000)
That's exactly the behaviour of various LDAP servers.

source4/lib/ldb/ldb_ildap/ldb_ildap.c
source4/lib/ldb/ldb_ldap/ldb_ldap.c
source4/lib/ldb/ldb_sqlite3/ldb_sqlite3.c
source4/lib/ldb/ldb_tdb/ldb_tdb.c

index 774336b82edc676dd520a21b822f3bc458a90da8..dab5abf6618659eee1eb6ee22f0f749d7a8cb50c 100644 (file)
@@ -759,7 +759,7 @@ static int ildb_handle_request(struct ldb_module *module, struct ldb_request *re
                break;
        default:
                /* no other op supported */
-               ret = LDB_ERR_OPERATIONS_ERROR;
+               ret = LDB_ERR_PROTOCOL_ERROR;
                break;
        }
 
index 8383627694c759254ff3fc32b0323ec2bbfecb84..b83ca87c5cf117ad85cece77d345afcb2ebef9a3 100644 (file)
@@ -810,7 +810,7 @@ static int lldb_handle_request(struct ldb_module *module, struct ldb_request *re
                break;
        default:
                /* no other op supported */
-               ret = LDB_ERR_OPERATIONS_ERROR;
+               ret = LDB_ERR_PROTOCOL_ERROR;
                break;
        }
 
index 2225327bbe4390a6291cec5efb5503b6a6b6f894..3aa6672964f5050b92cb43948ead23192b002f11 100644 (file)
@@ -1520,7 +1520,7 @@ static void lsql_callback(struct tevent_context *ev,
  */
        default:
                /* no other op supported */
-               ret = LDB_ERR_UNWILLING_TO_PERFORM;
+               ret = LDB_ERR_PROTOCOL_ERROR;
        }
 
        if (!ctx->callback_failed) {
index 435053703e318642ee7d21dd7c84764be063b8b4..1637c66734e352a8a3718c2e092b994c9507c4ac 100644 (file)
@@ -1241,7 +1241,7 @@ static void ltdb_callback(struct tevent_context *ev,
                goto done;
        default:
                /* no other op supported */
-               ret = LDB_ERR_UNWILLING_TO_PERFORM;
+               ret = LDB_ERR_PROTOCOL_ERROR;
        }
 
        if (!ctx->request_terminated) {