svn commit: samba r19166 - in branches/SAMBA_4_0/services: .

derrell at samba.org derrell at samba.org
Sat Oct 7 20:33:10 GMT 2006


Author: derrell
Date: 2006-10-07 20:33:09 +0000 (Sat, 07 Oct 2006)
New Revision: 19166

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19166

Log:
better bug and reporting and proper authentication tracking
Modified:
   branches/SAMBA_4_0/services/request.esp


Changeset:
Modified: branches/SAMBA_4_0/services/request.esp
===================================================================
--- branches/SAMBA_4_0/services/request.esp	2006-10-07 20:31:27 UTC (rev 19165)
+++ branches/SAMBA_4_0/services/request.esp	2006-10-07 20:33:09 UTC (rev 19166)
@@ -13,6 +13,7 @@
  * This is a simple JSON-RPC server.
  */
 
+
 /* Bring in the json format/parse functions */
 jsonrpc_include("json.esp");
 
@@ -46,7 +47,6 @@
 jsonrpc.Constant.ErrorCode = new Object();   /* server-generated error codes */
 jsonrpc.method = new Object();       /* methods available in requested class */
 
-
 /*
  * ScriptTransport constants
  */
@@ -108,12 +108,15 @@
  */
 jsonrpc.Constant.ErrorCode.MethodNotFound        = 4;
 
-/**
+/*
  * Error code, value 5: Parameter Mismatch
  *
  * If a method discovers that the parameters (arguments) provided to it do not
  * match the requisite types for the method's parameters, it should return
  * this error code to indicate so to the caller.
+ *
+ * This error is also used to indicate an illegal parameter value, in server
+ * scripts.
  */
 jsonrpc.Constant.ErrorCode.PaameterMismatch      = 5;
 
@@ -136,12 +139,18 @@
  */
 jsonrpc.Constant.ErrorCode.UnexpectedOutput      = 7;
 
+/*
+ * Error code, value 8: Resource Error
+ *
+ * Too many resources were requested, a system limitation on the total number
+ * of resources has been reached, or a resource or resource id was misused.
+ */
+jsonrpc.Constant.ErrorCode.ResourceError         = 8;
 
 
 
 
 
-
 function sendReply(reply, scriptTransportId)
 {
     /* If not using ScriptTransport... */
@@ -447,7 +456,7 @@
 }
 
 /* Ensure the logged-in user is allowed to issue the requested method */
-if (! json_authenticate(serviceComponents, method))
+if (! json_authenticate(serviceComponents, jsonInput.method))
 {
     error.setError(jsonrpc.Constant.ErrorCode.PermissionDenied,
                    "Permission denied");



More information about the samba-cvs mailing list