mirror of
https://github.com/samba-team/samba.git
synced 2025-07-25 00:59:11 +03:00
Export functions for setting NTSTATUS and WERRORs in python.
(This used to be commit 4bcb92d2d4
)
This commit is contained in:
@ -35,7 +35,7 @@
|
||||
%import "../../auth/credentials/credentials.i"
|
||||
%import "../../param/param.i"
|
||||
%import "../../libcli/security/security.i"
|
||||
%import "../../libcli/util/errors.i"
|
||||
%include "../../libcli/util/errors.i"
|
||||
|
||||
%feature("docstring") generate_random_str "S.random_password(len) -> string\n" \
|
||||
"Generate random password with specified length.";
|
||||
@ -97,7 +97,6 @@ bool dsdb_set_ntds_invocation_id(struct ldb_context *ldb, const char *guid)
|
||||
}
|
||||
%}
|
||||
|
||||
char *private_path(TALLOC_CTX* mem_ctx,
|
||||
struct loadparm_context *lp_ctx,
|
||||
const char *name);
|
||||
char *private_path(TALLOC_CTX* mem_ctx, struct loadparm_context *lp_ctx,
|
||||
const char *name);
|
||||
|
||||
|
@ -2554,6 +2554,9 @@ static swig_module_info swig_module = {swig_types, 27, 0, 0, 0, 0};
|
||||
#include "librpc/ndr/libndr.h"
|
||||
|
||||
|
||||
#include "libcli/util/pyerrors.h"
|
||||
|
||||
|
||||
SWIGINTERN int
|
||||
SWIG_AsVal_double (PyObject *obj, double *val)
|
||||
{
|
||||
@ -3046,8 +3049,7 @@ SWIGINTERN PyObject *_wrap_dsdb_attach_schema_from_ldif_file(PyObject *SWIGUNUSE
|
||||
"ldb context must be non-NULL");
|
||||
result = dsdb_attach_schema_from_ldif_file(arg1,(char const *)arg2,(char const *)arg3);
|
||||
if (!W_ERROR_IS_OK(result)) {
|
||||
PyObject *obj = Py_BuildValue((char *)"(i,s)", W_ERROR_V(result), win_errstr(result));
|
||||
PyErr_SetObject(PyExc_RuntimeError, obj);
|
||||
PyErr_SetWERROR(result);
|
||||
SWIG_fail;
|
||||
} else if (resultobj == NULL) {
|
||||
resultobj = Py_None;
|
||||
|
Reference in New Issue
Block a user