summaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
authorDerrell Lipman <derrell@samba.org>2007-02-14 16:08:59 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:48:17 -0500
commit6d18b574e52c59e6ca495f0eb62737342cd90ae0 (patch)
tree93cd3fb4a353add89cb2ebf67ee4f708eef8dc35 /services
parentbe852780b427cf03817a87f264e2747ad2fb8e87 (diff)
downloadsamba-6d18b574e52c59e6ca495f0eb62737342cd90ae0.tar.gz
samba-6d18b574e52c59e6ca495f0eb62737342cd90ae0.tar.bz2
samba-6d18b574e52c59e6ca495f0eb62737342cd90ae0.zip
r21344: ensure that the full range of error values is available to applications. parameter errors are really server errors.
(This used to be commit 62fcd13da1c9738393781ff55eb3f4dbdf7357fc)
Diffstat (limited to 'services')
-rw-r--r--services/samba/ldb.esp10
1 files changed, 10 insertions, 0 deletions
diff --git a/services/samba/ldb.esp b/services/samba/ldb.esp
index 882afdde75..8b0a57d5e3 100644
--- a/services/samba/ldb.esp
+++ b/services/samba/ldb.esp
@@ -285,6 +285,7 @@ function _search(params, error)
{
if (params.length < 2 || params.length > 5)
{
+ error.setOrigin(jsonrpc.Constant.ErrorOrigin.Server);
error.setError(jsonrpc.Constant.ServerError.ParameterMismatch,
"usage: " +
"<resource_id> <expr> [<baseDN> [<scope> [<attrs>]]]");
@@ -327,6 +328,7 @@ function _search(params, error)
}
else
{
+ error.setOrigin(jsonrpc.Constant.ErrorOrigin.Server);
error.setError(jsonrpc.Constant.ServerError.ParameterMismatch,
"invalid scope: " + scope);
return error;
@@ -357,6 +359,7 @@ function _add(params, error)
{
if (params.length != 2)
{
+ error.setOrigin(jsonrpc.Constant.ErrorOrigin.Server);
error.setError(jsonrpc.Constant.ServerError.ParameterMismatch,
"usage: <resource_id> <ldif>");
return error;
@@ -393,6 +396,7 @@ function _modify(params, error)
{
if (params.length != 2)
{
+ error.setOrigin(jsonrpc.Constant.ErrorOrigin.Server);
error.setError(jsonrpc.Constant.ServerError.ParameterMismatch,
"usage: <resource_id> <ldif>");
return error;
@@ -429,6 +433,7 @@ function _del(params, error)
{
if (params.length != 2)
{
+ error.setOrigin(jsonrpc.Constant.ErrorOrigin.Server);
error.setError(jsonrpc.Constant.ServerError.ParameterMismatch,
"usage: <resource_id> <dn>");
return error;
@@ -468,6 +473,7 @@ function _rename(params, error)
{
if (params.length != 3)
{
+ error.setOrigin(jsonrpc.Constant.ErrorOrigin.Server);
error.setError(jsonrpc.Constant.ServerError.ParameterMismatch,
"usage: <resource_id> <old_dn> <new_dn>");
return error;
@@ -504,6 +510,7 @@ function _base64encode(params, error)
{
if (params.length != 2)
{
+ error.setOrigin(jsonrpc.Constant.ErrorOrigin.Server);
error.setError(jsonrpc.Constant.ServerError.ParameterMismatch,
"usage: <resource_id> <string_to_be_encoded>");
return error;
@@ -540,6 +547,7 @@ function _base64decode(params, error)
{
if (params.length != 2)
{
+ error.setOrigin(jsonrpc.Constant.ErrorOrigin.Server);
error.setError(jsonrpc.Constant.ServerError.ParameterMismatch,
"usage: <resource_id> <string_to_be_decoded>");
return error;
@@ -576,6 +584,7 @@ function _base64decode(params, error)
{
if (params.length != 2)
{
+ error.setOrigin(jsonrpc.Constant.ErrorOrigin.Server);
error.setError(jsonrpc.Constant.ServerError.ParameterMismatch,
"usage: <resource_id> <string_to_be_decoded>");
return error;
@@ -608,6 +617,7 @@ function _errstring(params, error)
{
if (params.length != 1)
{
+ error.setOrigin(jsonrpc.Constant.ErrorOrigin.Server);
error.setError(jsonrpc.Constant.ServerError.ParameterMismatch,
"usage: <resource_id>");
return error;