summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/librpc/config.mk2
-rw-r--r--source4/scripting/ejs/ejsrpc.c17
-rw-r--r--source4/scripting/ejs/ejsrpc.h8
3 files changed, 25 insertions, 2 deletions
diff --git a/source4/librpc/config.mk b/source4/librpc/config.mk
index 5f07723ce3..70159ecb20 100644
--- a/source4/librpc/config.mk
+++ b/source4/librpc/config.mk
@@ -593,7 +593,6 @@ NOPROTO = YES
INIT_FUNCTION = ejs_init_drsuapi
OBJ_FILES = gen_ndr/ndr_drsuapi_ejs.o
SUBSYSTEM = SMBCALLS
-ENABLE = NO
REQUIRED_SUBSYSTEMS = LIBRPC NDR_DRSUAPI
NOPROTO = YES
@@ -644,7 +643,6 @@ NOPROTO = YES
INIT_FUNCTION = ejs_init_netlogon
OBJ_FILES = gen_ndr/ndr_netlogon_ejs.o
SUBSYSTEM = SMBCALLS
-ENABLE = NO
REQUIRED_SUBSYSTEMS = LIBRPC NDR_NETLOGON
NOPROTO = YES
diff --git a/source4/scripting/ejs/ejsrpc.c b/source4/scripting/ejs/ejsrpc.c
index a0fee2efe7..c84f9eb6fb 100644
--- a/source4/scripting/ejs/ejsrpc.c
+++ b/source4/scripting/ejs/ejsrpc.c
@@ -133,6 +133,23 @@ NTSTATUS ejs_push_int32(struct ejs_rpc *ejs,
return mprSetVar(v, name, mprCreateIntegerVar(*r));
}
+/*
+ pull a uint32 from a mpr variable to a C element
+*/
+NTSTATUS ejs_pull_time_t(struct ejs_rpc *ejs,
+ struct MprVar *v, const char *name, time_t *r)
+{
+ NDR_CHECK(mprGetVar(&v, name));
+ *r = mprVarToInteger(v);
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ejs_push_time_t(struct ejs_rpc *ejs,
+ struct MprVar *v, const char *name, const time_t *r)
+{
+ return mprSetVar(v, name, mprCreateIntegerVar(*r));
+}
+
NTSTATUS ejs_pull_hyper(struct ejs_rpc *ejs,
struct MprVar *v, const char *name, uint64_t *r)
{
diff --git a/source4/scripting/ejs/ejsrpc.h b/source4/scripting/ejs/ejsrpc.h
index d710ff375c..80674fc43b 100644
--- a/source4/scripting/ejs/ejsrpc.h
+++ b/source4/scripting/ejs/ejsrpc.h
@@ -78,6 +78,10 @@ NTSTATUS ejs_pull_NTTIME(struct ejs_rpc *ejs,
struct MprVar *v, const char *name, uint64_t *r);
NTSTATUS ejs_push_NTTIME(struct ejs_rpc *ejs,
struct MprVar *v, const char *name, const uint64_t *r);
+NTSTATUS ejs_pull_time_t(struct ejs_rpc *ejs,
+ struct MprVar *v, const char *name, time_t *r);
+NTSTATUS ejs_push_time_t(struct ejs_rpc *ejs,
+ struct MprVar *v, const char *name, const time_t *r);
NTSTATUS ejs_pull_enum(struct ejs_rpc *ejs,
struct MprVar *v, const char *name, unsigned *r);
NTSTATUS ejs_push_enum(struct ejs_rpc *ejs,
@@ -149,6 +153,10 @@ NTSTATUS ejs_push_winreg_String(struct ejs_rpc *ejs,
/* some types are equivalent for ejs */
#define ejs_pull_dom_sid2 ejs_pull_dom_sid
#define ejs_push_dom_sid2 ejs_push_dom_sid
+#define ejs_pull_dom_sid28 ejs_pull_dom_sid
+#define ejs_push_dom_sid28 ejs_push_dom_sid
#define ejs_pull_NTTIME_hyper ejs_pull_NTTIME
#define ejs_push_NTTIME_hyper ejs_push_NTTIME
+#define ejs_pull_NTTIME_1sec ejs_pull_NTTIME
+#define ejs_push_NTTIME_1sec ejs_push_NTTIME