[Samba] libsamba-policy.cpython: where it is used in samba?
Andrew Bartlett
abartlet at samba.org
Sun May 26 10:13:25 UTC 2024
On Sat, 2024-05-25 at 14:25 +0300, Michael Tokarev via samba wrote:
> Hi!
> I'm trying to find where various components of samba belongs to and
> where they're used.There are quite a few files with unknown
> purpose. For example, a cpython library(python code which is to be
> linked to from a C program) libsamba-policy. On currentdebian it is
> like:
> usr/lib/x86_64-linux-gnu/libsamba-policy.cpython-311-x86-64-linux-
> gnu.so.0.0.1 usr/lib/python3/dist-packages/samba/policy.cpython-
> 311-x86_64-linux-gnu.so usr/lib/x86_64-linux-gnu/pkgconfig/samba-
> policy.cpython-311-x86_64-linux-gnu.pc
> (the libraries are part of python3-samba package, the .pc file is
> part of samba-dev).
> I don't see these are referenced anywhere. What it is for?
> Also, what it *is* to begin with? It looks like it is a python code
> embeddableinto a C program, and next it's linked to with a python
> extension?
> Can't the said python extension (samba-policy.cpython) run python
> code inlibsamba-policy directly, without the C/so wrapper?
This is a component used in the samba.policy python lib and also
available as an public library for other software to use (!).
I don't think anybody has considered if this is a wise API to be
exposing since it was added in the pre 4.0 days.
I also am unclear if
commit 5324b943e72d597da178d362f7c938fe0a4e57b0Author: Jelmer Vernooij
<jelmer at samba.org>Date: Mon Oct 11 01:09:26 2010 +0200
wafsamba: Fix handling of pyembed/pyext.
Is correct here, I think this is a normal Samba library that is called
from python, it doesn't use python things (unlike pyldb-util/pytalloc-
util)
I would put in in the python package, and hopefully we can at least
make it a normal librar and perhaps deprecate it being public soon.
Andrew Bartlett
--
Andrew Bartlett (he/him) https://samba.org/~abartlet/Samba Team Member (since 2001) https://samba.orgSamba Team Lead https://catalyst.net.nz/services/sambaCatalyst.Net Ltd
Proudly developing Samba for Catalyst.Net Ltd - a Catalyst IT group
company
Samba Development and Support: https://catalyst.net.nz/services/samba
Catalyst IT - Expert Open Source Solutions
More information about the samba
mailing list