r21788: Add new JSON-RPC services.
[Samba/ekacnet.git] / services / samba / config.esp
blobbf4b789c13bea82d17309cd086ee2f81b02f9426
1 <%
3 /*
4  * Copyright (C)  Rafal Szczesniak 2007
5  */
7 /* Simple JSON-RPC access to the configuration parameters */
9 function _lp_get(params, error)
11   if (params.length < 1)
12   {
13     error.setError(jsonrpc.Constant.ServerError.ParameterMismatch,
14                    "no parameter specified");
15     return error;
16   }
18   var lp = loadparm_init();
19   var name = params[0];
20   var value = lp.get(name);
22   return value;
24 jsonrpc.method.lp_get = _lp_get;