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 | |
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)
-rw-r--r-- | source4/librpc/config.mk | 2 | ||||
-rw-r--r-- | source4/scripting/ejs/ejsrpc.c | 17 | ||||
-rw-r--r-- | source4/scripting/ejs/ejsrpc.h | 8 |
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 |