summaryrefslogtreecommitdiff
path: root/source4/scripting/ejs/ejsrpc.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/scripting/ejs/ejsrpc.c')
-rw-r--r--source4/scripting/ejs/ejsrpc.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/source4/scripting/ejs/ejsrpc.c b/source4/scripting/ejs/ejsrpc.c
index f3abc3c34a..f107c84b73 100644
--- a/source4/scripting/ejs/ejsrpc.c
+++ b/source4/scripting/ejs/ejsrpc.c
@@ -25,6 +25,7 @@
#include "scripting/ejs/smbcalls.h"
#include "librpc/gen_ndr/ndr_security.h"
#include "librpc/gen_ndr/ndr_lsa.h"
+#include "librpc/gen_ndr/ndr_winreg.h"
#include "scripting/ejs/ejsrpc.h"
/*
@@ -182,6 +183,18 @@ NTSTATUS ejs_push_NTTIME(struct ejs_rpc *ejs,
return ejs_push_hyper(ejs, v, name, r);
}
+NTSTATUS ejs_push_WERROR(struct ejs_rpc *ejs,
+ struct MprVar *v, const char *name, const WERROR *r)
+{
+ return ejs_push_string(ejs, v, name, win_errstr(*r));
+}
+
+NTSTATUS ejs_push_NTSTATUS(struct ejs_rpc *ejs,
+ struct MprVar *v, const char *name, const NTSTATUS *r)
+{
+ return ejs_push_string(ejs, v, name, nt_errstr(*r));
+}
+
/*
pull a enum from a mpr variable to a C element
@@ -292,6 +305,24 @@ NTSTATUS ejs_push_lsa_String(struct ejs_rpc *ejs,
return ejs_push_string(ejs, v, name, r->string);
}
+/*
+ pull a winreg_String
+*/
+NTSTATUS ejs_pull_winreg_String(struct ejs_rpc *ejs,
+ struct MprVar *v, const char *name, struct winreg_String *r)
+{
+ return ejs_pull_string(ejs, v, name, &r->name);
+}
+
+/*
+ push a winreg_String
+*/
+NTSTATUS ejs_push_winreg_String(struct ejs_rpc *ejs,
+ struct MprVar *v, const char *name, const struct winreg_String *r)
+{
+ return ejs_push_string(ejs, v, name, r->name);
+}
+
NTSTATUS ejs_pull_DATA_BLOB(struct ejs_rpc *ejs,
struct MprVar *v, const char *name, DATA_BLOB *r)
{