1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-27 22:50:26 +03:00

Add header for pyparam.

This commit is contained in:
Jelmer Vernooij 2008-12-22 04:38:57 +01:00
parent 24b62772ab
commit d58270c537
7 changed files with 31 additions and 11 deletions

View File

@ -22,9 +22,7 @@
#include "lib/cmdline/credentials.h"
#include "librpc/gen_ndr/samr.h" /* for struct samr_Password */
#include "libcli/util/pyerrors.h"
/* Here until param/param.i gets rewritten in "manual" C */
extern struct loadparm_context *lp_from_py_object(PyObject *py_obj);
#include "param/pyparam.h"
struct cli_credentials *cli_credentials_from_py_object(PyObject *py_obj)
{

View File

@ -20,10 +20,7 @@
#include "param/param.h"
#include "pyauth.h"
#include "auth/system_session_proto.h"
/* FIXME: These should be in a header file somewhere, once we finish moving
* away from SWIG .. */
extern struct loadparm_context *lp_from_py_object(PyObject *py_obj);
#include "param/pyparam.h"
PyTypeObject PyAuthSession = {
.tp_name = "AuthSession",

View File

@ -24,8 +24,8 @@
#include "scripting/python/modules.h" /* for py_iconv_convenience() */
#include <pytalloc.h>
#include <tevent.h>
#include "param/pyparam.h"
extern struct loadparm_context *lp_from_py_object(PyObject *py_obj);
extern struct cli_credentials *cli_credentials_from_py_object(PyObject *py_obj);
PyAPI_DATA(PyTypeObject) PyRegistryKey;

View File

@ -23,6 +23,7 @@
#include "librpc/rpc/pyrpc.h"
#include "librpc/rpc/dcerpc.h"
#include "lib/events/events.h"
#include "param/pyparam.h"
static PyObject *py_dcerpc_run_function(dcerpc_InterfaceObject *iface, struct PyNdrRpcMethodDef *md, PyObject *args, PyObject *kwargs)
{
@ -315,7 +316,6 @@ static PyObject *dcerpc_interface_new(PyTypeObject *self, PyObject *args, PyObje
const char *kwnames[] = {
"binding", "syntax", "lp_ctx", "credentials", "basis_connection", NULL
};
extern struct loadparm_context *lp_from_py_object(PyObject *py_obj);
extern struct cli_credentials *cli_credentials_from_py_object(PyObject *py_obj);
struct ndr_interface_table *table;

View File

@ -28,12 +28,12 @@
#include <Python.h>
#include "scripting/python/modules.h"
#include "lib/ldb/pyldb.h"
#include "param/pyparam.h"
NTSTATUS provision_bare(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx,
struct provision_settings *settings,
struct provision_result *result)
{
extern struct loadparm_context *lp_from_py_object(PyObject *py_obj);
PyObject *provision_mod, *provision_dict, *provision_fn, *py_result, *parameters;
DEBUG(0,("Provision for Become-DC test using python\n"));

25
source4/param/pyparam.h Normal file
View File

@ -0,0 +1,25 @@
/*
Unix SMB/CIFS implementation.
Samba utility functions
Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2008
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _PYPARAM_H_
#define _PYPARAM_H_
struct loadparm_context *lp_from_py_object(PyObject *py_obj);
#endif /* _PYPARAM_H_ */

View File

@ -29,10 +29,10 @@
#include "libcli/util/pyerrors.h"
#include "libcli/security/security.h"
#include "auth/pyauth.h"
#include "param/pyparam.h"
/* FIXME: These should be in a header file somewhere, once we finish moving
* away from SWIG .. */
extern struct loadparm_context *lp_from_py_object(PyObject *py_obj);
extern struct cli_credentials *cli_credentials_from_py_object(PyObject *py_obj);
#define PyErr_LDB_OR_RAISE(py_ldb, ldb) \