diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-12-27 18:15:18 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:47:51 -0500 |
commit | 00ace36e07f128df4596cfc8b6743fbfda2252bd (patch) | |
tree | 2ccecf2b459854bf3d3e3227397b3001a51bf7c0 /source4/scripting | |
parent | 05b141c5c93eecdc07b17d19804a0cf7b77f3ebd (diff) | |
download | samba-00ace36e07f128df4596cfc8b6743fbfda2252bd.tar.gz samba-00ace36e07f128df4596cfc8b6743fbfda2252bd.tar.bz2 samba-00ace36e07f128df4596cfc8b6743fbfda2252bd.zip |
r12516: Fix drsuapi and netlogon javascript bindings
(This used to be commit b46eeba9fcb059ef83743de8be7dab26f9ef21b2)
Diffstat (limited to 'source4/scripting')
-rw-r--r-- | source4/scripting/ejs/ejsrpc.c | 17 | ||||
-rw-r--r-- | source4/scripting/ejs/ejsrpc.h | 8 |
2 files changed, 25 insertions, 0 deletions
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 |