mirror of
https://github.com/samba-team/samba.git
synced 2025-08-03 04:22:09 +03:00
s3:libsmb: Revert SMB Py bindings name back to libsmb_samba_internal
In order to make it clear that the APIs in these Python bindings are unstable and should not be used by external consumers, this patch changes the name of the Python bindings back to libsmb_samba_internal. To make the Python code that uses these bindings (i.e. samba-tool, etc) look a little cleaner, we can just change the module name as we import it, e.g. from samba.samba3 import libsmb_samba_internal as libsmb Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Jan 9 14:30:31 CET 2019 on sn-devel-144
This commit is contained in:
committed by
Stefan Metzmacher
parent
84069c8a54
commit
a9def5c697
@ -32,7 +32,7 @@ from samba.samba3 import param as s3param
|
||||
from samba.dcerpc import security, xattr, idmap
|
||||
from samba.ndr import ndr_pack, ndr_unpack
|
||||
from samba.samba3 import smbd
|
||||
from samba.samba3 import libsmb
|
||||
from samba.samba3 import libsmb_samba_internal as libsmb
|
||||
|
||||
# don't include volumes
|
||||
SMB_FILE_ATTRIBUTE_FLAGS = libsmb.FILE_ATTRIBUTE_SYSTEM | \
|
||||
|
@ -35,7 +35,7 @@ from samba.ntstatus import (
|
||||
)
|
||||
from samba import NTSTATUSError
|
||||
from samba.samba3 import param as s3param
|
||||
from samba.samba3 import libsmb
|
||||
from samba.samba3 import libsmb_samba_internal as libsmb
|
||||
|
||||
class smb_pipe_socket(object):
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
"""Tests for samba.samba3.libsmb."""
|
||||
|
||||
from samba.samba3 import libsmb
|
||||
from samba.samba3 import libsmb_samba_internal as libsmb
|
||||
from samba.dcerpc import security
|
||||
from samba.samba3 import param as s3param
|
||||
from samba import credentials
|
||||
|
@ -22,7 +22,7 @@ import sys
|
||||
from samba import NTSTATUSError
|
||||
from samba.ntstatus import (NT_STATUS_OBJECT_NAME_NOT_FOUND,
|
||||
NT_STATUS_OBJECT_PATH_NOT_FOUND)
|
||||
from samba.samba3 import libsmb
|
||||
from samba.samba3 import libsmb_samba_internal as libsmb
|
||||
from samba.samba3 import param as s3param
|
||||
|
||||
PY3 = sys.version_info[0] == 3
|
||||
|
@ -1,6 +1,9 @@
|
||||
/*
|
||||
* Unix SMB/CIFS implementation.
|
||||
* Samba-internal work in progress Python binding for libsmbclient
|
||||
*
|
||||
* SMB client Python bindings used internally by Samba (for things like
|
||||
* samba-tool). These Python bindings may change without warning, and so
|
||||
* should not be used outside of the Samba codebase.
|
||||
*
|
||||
* Copyright (C) Volker Lendecke 2012
|
||||
*
|
||||
@ -1526,7 +1529,7 @@ static PyMethodDef py_cli_state_methods[] = {
|
||||
|
||||
static PyTypeObject py_cli_state_type = {
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
.tp_name = "libsmb.Conn",
|
||||
.tp_name = "libsmb_samba_internal.Conn",
|
||||
.tp_basicsize = sizeof(struct py_cli_state),
|
||||
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
|
||||
.tp_doc = "libsmb connection",
|
||||
@ -1540,17 +1543,17 @@ static PyMethodDef py_libsmb_methods[] = {
|
||||
{ NULL },
|
||||
};
|
||||
|
||||
void initlibsmb(void);
|
||||
void initlibsmb_samba_internal(void);
|
||||
|
||||
static struct PyModuleDef moduledef = {
|
||||
PyModuleDef_HEAD_INIT,
|
||||
.m_name = "libsmb",
|
||||
.m_name = "libsmb_samba_internal",
|
||||
.m_doc = "libsmb wrapper",
|
||||
.m_size = -1,
|
||||
.m_methods = py_libsmb_methods,
|
||||
};
|
||||
|
||||
MODULE_INIT_FUNC(libsmb)
|
||||
MODULE_INIT_FUNC(libsmb_samba_internal)
|
||||
{
|
||||
PyObject *m = NULL;
|
||||
|
||||
|
@ -1323,7 +1323,7 @@ for env in bld.gen_python_environments():
|
||||
bld.SAMBA3_PYTHON('pylibsmb',
|
||||
source='libsmb/pylibsmb.c',
|
||||
deps='smbclient samba-credentials %s' % pycredentials,
|
||||
realname='samba/samba3/libsmb.so'
|
||||
realname='samba/samba3/libsmb_samba_internal.so'
|
||||
)
|
||||
|
||||
bld.SAMBA3_BINARY('spotlight2sparql',
|
||||
|
Reference in New Issue
Block a user