summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-12-26 22:47:40 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:47:46 -0500
commitc1c01df22f7145ca86b97fce670131017b3df3b9 (patch)
tree6520734cb8e389ece00cd8c48a0cce0dbb8049fd /source4/scripting
parent09c44f6cae89621871d2e5475b0c0f99c25804b4 (diff)
downloadsamba-c1c01df22f7145ca86b97fce670131017b3df3b9.tar.gz
samba-c1c01df22f7145ca86b97fce670131017b3df3b9.tar.bz2
samba-c1c01df22f7145ca86b97fce670131017b3df3b9.zip
r12501: Merge EJSHeader.pm into EJS.pm and simplify smbcalls_rpc.c a bit,
now that it is guaranteed that the smbcalls modules are always initialized after the EJS subsystem itself. (This used to be commit 1e8670874bb7415c3e00a42516680fdb4ee2fca1)
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/ejs/ejsrpc.h17
-rw-r--r--source4/scripting/ejs/smbcalls.c1
-rw-r--r--source4/scripting/ejs/smbcalls_rpc.c37
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