mirror of
https://github.com/samba-team/samba.git
synced 2025-07-15 16:59:09 +03:00
r9146: - enable winreg pipe from ejs
- map the result code from rpc calls into the ejs objects
- treat winreg_String like lsa_String, hiding the length elements
(This used to be commit 2f6311c9a3
)
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
d87e1306c5
commit
31fa87f23b
@ -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)
|
||||
{
|
||||
|
@ -95,6 +95,10 @@ NTSTATUS ejs_push_dom_sid(struct ejs_rpc *ejs,
|
||||
struct MprVar *v, const char *name, const struct dom_sid *r);
|
||||
NTSTATUS ejs_push_null(struct ejs_rpc *ejs, struct MprVar *v, const char *name);
|
||||
BOOL ejs_pull_null(struct ejs_rpc *ejs, struct MprVar *v, const char *name);
|
||||
NTSTATUS ejs_push_WERROR(struct ejs_rpc *ejs,
|
||||
struct MprVar *v, const char *name, const WERROR *r);
|
||||
NTSTATUS ejs_push_NTSTATUS(struct ejs_rpc *ejs,
|
||||
struct MprVar *v, const char *name, const NTSTATUS *r);
|
||||
NTSTATUS ejs_pull_DATA_BLOB(struct ejs_rpc *ejs,
|
||||
struct MprVar *v, const char *name, DATA_BLOB *r);
|
||||
NTSTATUS ejs_push_DATA_BLOB(struct ejs_rpc *ejs,
|
||||
|
Reference in New Issue
Block a user