diff options
Diffstat (limited to 'source4/scripting')
-rw-r--r-- | source4/scripting/ejs/ejsrpc.h | 17 | ||||
-rw-r--r-- | source4/scripting/ejs/smbcalls.c | 1 | ||||
-rw-r--r-- | source4/scripting/ejs/smbcalls_rpc.c | 37 |
3 files changed, 17 insertions, 38 deletions
diff --git a/source4/scripting/ejs/ejsrpc.h b/source4/scripting/ejs/ejsrpc.h index a790beb804..d710ff375c 100644 --- a/source4/scripting/ejs/ejsrpc.h +++ b/source4/scripting/ejs/ejsrpc.h @@ -115,6 +115,23 @@ NTSTATUS ejs_push_array_uint8(struct ejs_rpc *ejs, struct MprVar *v, const char *name, const uint8_t *r, uint32_t length); +NTSTATUS ejs_pull_GUID(struct ejs_rpc *ejs, + struct MprVar *v, const char *name, struct GUID *r); +NTSTATUS ejs_push_GUID(struct ejs_rpc *ejs, + struct MprVar *v, const char *name, const struct GUID *r); + +struct lsa_String; +NTSTATUS ejs_pull_lsa_String(struct ejs_rpc *ejs, + struct MprVar *v, const char *name, struct lsa_String *r); +NTSTATUS ejs_push_lsa_String(struct ejs_rpc *ejs, + struct MprVar *v, const char *name, const struct lsa_String *r); + +struct winreg_String; +NTSTATUS ejs_pull_winreg_String(struct ejs_rpc *ejs, + struct MprVar *v, const char *name, struct winreg_String *r); +NTSTATUS ejs_push_winreg_String(struct ejs_rpc *ejs, + struct MprVar *v, const char *name, const struct winreg_String *r); + #define EJS_ALLOC_SIZE(ejs, s, size) do { \ (s) = talloc_size(ejs, size); \ if (!(s)) return ejs_panic(ejs, "out of memory"); \ diff --git a/source4/scripting/ejs/smbcalls.c b/source4/scripting/ejs/smbcalls.c index ee999402a5..3e96f8bef2 100644 --- a/source4/scripting/ejs/smbcalls.c +++ b/source4/scripting/ejs/smbcalls.c @@ -124,7 +124,6 @@ void smb_setup_ejs_functions(void) smb_setup_ejs_ldb(); smb_setup_ejs_nbt(); smb_setup_ejs_cli(); - smb_setup_ejs_rpc(); smb_setup_ejs_auth(); smb_setup_ejs_options(); smb_setup_ejs_nss(); diff --git a/source4/scripting/ejs/smbcalls_rpc.c b/source4/scripting/ejs/smbcalls_rpc.c index c71a475a92..6d2d411957 100644 --- a/source4/scripting/ejs/smbcalls_rpc.c +++ b/source4/scripting/ejs/smbcalls_rpc.c @@ -363,43 +363,6 @@ done: return 0; } -/* a list of registered ejs rpc modules */ -static struct ejs_register { - struct ejs_register *next, *prev; - const char *name; - MprCFunction fn; -} *ejs_registered; - -/* - register a generated ejs module -*/ - NTSTATUS smbcalls_register_ejs(const char *name, MprCFunction fn) -{ - struct ejs_register *r; - void *ctx = ejs_registered; - if (ctx == NULL) { - ctx = talloc_autofree_context(); - } - r = talloc(ctx, struct ejs_register); - NT_STATUS_HAVE_NO_MEMORY(r); - r->name = name; - r->fn = fn; - DLIST_ADD(ejs_registered, r); - return NT_STATUS_OK; -} - -/* - setup C functions that be called from ejs -*/ -void smb_setup_ejs_rpc(void) -{ - struct ejs_register *r; - - for (r=ejs_registered;r;r=r->next) { - ejsDefineCFunction(-1, r->name, r->fn, NULL, MPR_VAR_SCRIPT_HANDLE); - } -} - /* hook called by generated RPC interfaces at the end of their init routines used to add generic operations on the pipe |