summaryrefslogtreecommitdiff
path: root/python/pyglue.c
AgeCommit message (Collapse)AuthorFilesLines
2019-01-13python: use 'et' as format for ParseTuple with python2Noel Power1-2/+6
Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-13python: Fix memory leak with ParseTuple (using 'es' format)Noel Power1-7/+15
Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-11-08debug: Use debuglevel_(get|set) functionAndreas Schneider1-2/+3
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Nov 8 11:03:11 CET 2018 on sn-devel-144
2018-10-23python: py_strcasecmp_m & py_strstr_m don't handle unicode properlyNoel Power1-5/+9
py_strcasecmp_m & py_strstr_m use PyArg_ParseTuple() with 's' which in Py2 tries to decode string with the default (e.g. ascii) encoding Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-06-12python: export fault_setup() to python bindingsStefan Metzmacher1-0/+12
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13469 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2017-12-18pyglue: Add function to generate a random byte stringGary Lockyer1-0/+21
Adds a function to generate a random byte string using the samba random routines. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2017-12-10samba-tool: validate password early in `domain provision`Jamie McClymont1-0/+17
Checks password against default quality and length standards when it is entered, allowing a second chance to enter one (if interactive), rather than running through the provisioning process and bailing on an exception Includes unit tests for the newly-added python wrapper of check_password_quality plus black-box tests for the checks in samba-tool. Breaks an openldap test which uses an invalid password. BUG: https://bugzilla.samba.org/show_bug.cgi?id=9710 BUG: https://bugzilla.samba.org/show_bug.cgi?id=12235 Signed-off-by: Jamie McClymont <jamiemcclymont@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2017-04-29python: Add py_is_heimdal_built() to pyglueAndreas Schneider1-0/+11
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlet <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2017-03-10python: samba._glue: Port samba._glue module to Python 3.Lumir Balhar1-11/+20
Signed-off-by: Lumir Balhar <lbalhar@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2017-02-21pyglue: add generate_random_machine_password() wrapperStefan Metzmacher1-1/+25
We use PyUnicode_FromString() (which is available from 2.6) because we really have non-ascii strings. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12262 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2016-11-04python: Add DsExtendedError ExceptionAndrew Bartlett1-0/+8
This will be used for checking errors during a GetNCChanges EXOP like RID Set allocation. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> BUG: https://bugzilla.samba.org/show_bug.cgi?id=12398
2016-11-04python: create NTSTATUSError, HRESULTError and WERRORErrorAndrew Bartlett1-0/+20
The advantage of these over the previous use of just RuntimeError is that we can catch just the errors we want, without having to catch all possible RuntimeError cases and assume they decode to a tuple Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> BUG: https://bugzilla.samba.org/show_bug.cgi?id=12398
2015-10-23build: Enable NTVFS file server to be omittedAndrew Bartlett1-0/+11
We now only build it by default with --enable-sefltest, or otherwise if requested. The NTVFS file server still has features not present in the smbd file server, such as a CIFS/SMB proxy, and a radically different design, but it is also not undergoing any ongoing development so this keeps it in a safe state for care and maintaince, with less of a security risk if such an issue were to come up. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2014-01-09samba:python - Py_RETURN_NONE remove compatibility code for releases < 2.4Matthias Dieter Wallnöfer1-4/+0
http://www.python.org/doc//current/c-api/none.html Reviewed-By: Jelmer Vernooij <jelmer@samba.org> Autobuild-User(master): Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date(master): Thu Jan 9 16:27:47 CET 2014 on sn-devel-104
2013-08-30python/pyglue: filter out loopback and linklocal addresses unless ↵Stefan Metzmacher1-2/+43
all_interfaces is given Bug: https://bugzilla.samba.org/show_bug.cgi?id=10030 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Bjoern Jacke <bj@sernet.de>
2013-03-02Move python modules from source4/scripting/python/ to python/.Jelmer Vernooij1-0/+250
Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sat Mar 2 03:57:34 CET 2013 on sn-devel-104