summaryrefslogtreecommitdiff
path: root/source4/librpc/ndr
Commit message (Collapse)AuthorAgeFilesLines
* s4/rpc/py_security: don't deref NULL for invalid valuesDouglas Bagnall2019-07-221-2/+10
| | | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* py3: Remove PyStr_AsUTF8AndSize() compatability macroAndrew Bartlett2019-06-241-1/+1
| | | | | | | | We no longer need Samba to be py2/py3 compatible so we choose to return to the standard function names. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Noel Power <noel.power@suse.com>
* py3: Remove PyStr_FromFormat() compatability macroAndrew Bartlett2019-06-243-5/+5
| | | | | | | | We no longer need Samba to be py2/py3 compatible so we choose to return to the standard function names. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Noel Power <noel.power@suse.com>
* py3: Remove PyStr_FromString() compatability macroAndrew Bartlett2019-06-243-7/+7
| | | | | | | | We no longer need Samba to be py2/py3 compatible so we choose to return to the standard function names. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Noel Power <noel.power@suse.com>
* s4/librpc: squash 'cast between incompatible function types' warningNoel Power2019-05-161-5/+10
| | | | | | | | | | Where possible make PyCFunction definition signature match. Sometimes this is not possible (e.g. when the c-function is associated with a python method definition with 'METH_VARARGS|METH_KEYWORDS' in this case we use the PY_DISCARD_FUNC_SIG macro. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4/librpc/py_misc: ParseTuple format should match actual typesDouglas Bagnall2019-02-081-1/+1
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Noel Power <npower@samba.org>
* Clean up reference used with PyDict_SetxxxNoel Power2019-02-073-0/+3
| | | | | | | | | | | | PyDictSetxxx methods don't steal reference so if the items added to the dictionary were created just for the purpose of inserting into the dict then we need to decref them. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Autobuild-User(master): Noel Power <npower@samba.org> Autobuild-Date(master): Thu Feb 7 17:17:46 CET 2019 on sn-devel-144
* s4:librpc: Use C99 initializer for PyGetSetDef in py_authAndreas Schneider2019-01-171-2/+6
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* pysecurity: Use dom_sid_str_bufVolker Lendecke2019-01-081-6/+5
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:librpc: Use discard_const_p for ndr/py_miscAndreas Schneider2018-11-141-3/+5
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
* s4/librpc/ndr: allow GUID to accept unicode alsoNoel Power2018-07-131-1/+1
| | | | | | | | | | This needed since _GUID_string method change (in source4/torture/drs/python/drs_base.py) which makes use use a unicode guid at times now Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* s4/librpc: GUID should accept string or bytes in python3Noel Power2018-03-231-3/+11
| | | | | | | | | | In python3 you can't store a binary blob GUID in a string class, you need to use 'bytes'. This change ensures python2 code continues to use a string and in python3 both 'bytes' and 'string' are supported. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* py-librpc: Strictly check the type of the incoming sid pointerAndrew Bartlett2017-08-151-0/+7
| | | | | | | | | | This avoids casting another type of object to a void* and then to a SID Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Autobuild-User(master): Garming Sam <garming@samba.org> Autobuild-Date(master): Tue Aug 15 12:00:58 CEST 2017 on sn-devel-144
* lsa.String: add String constructor, str and reprGary Lockyer2017-06-221-0/+77
| | | | | | | | | Add a String constructor, str and repr methods to the samba.dcerpc.lsa.String python object Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* python: samba.dcerpc: Port security module to Python 3 comp. formLumir Balhar2017-03-101-4/+36
| | | | | | Signed-off-by: Lumir Balhar <lbalhar@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* python: samba.dcerpc: Port RPC related stuff to Python 3Lumir Balhar2017-03-101-7/+39
| | | | | | | | | | Port RPC related stuff like samba.dcerpc.misc and samba.dcerpc Python modules and pyrpc_util to Python 3 compatible form. Signed-off-by: Lumir Balhar <lbalhar@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Pair-programmed-by: Andrew Bartlett <abartlet@samba.org>
* py_xattr: Fix a "ignoring return value" warningVolker Lendecke2016-02-231-2/+6
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* samba:python - Py_RETURN_NONE remove compatibility code for releases < 2.4Matthias Dieter Wallnöfer2014-01-094-16/+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
* py_security: Fix comparison between two dom_sid objectsAmitay Isaacs2011-08-191-1/+9
| | | | | | | | dom_sid_compare() function can return values other than -1, 0, 1. Python requires compare function to return value from [-1, 0, 1]. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* pytalloc: Use consistent prefix for functions, add ABI file.Jelmer Vernooij2011-08-104-45/+48
|
* auth: Move auth_session_info into IDLAndrew Bartlett2011-04-051-0/+74
| | | | | | | | | | This changes auth_session_info_transport to just be a wrapper, rather than a copy that has to be kept in sync. As auth_session_info was already wrapped in python, this required changes to the existing pyauth wrapper and it's users. Andrew Bartlett
* s4-librpc Handle all types of GUID in the GUID() initialiserAndrew Bartlett2010-12-011-3/+11
| | | | | | | By taking a length-limited string, we can parse binary and string GUID values, which is particularly useful when reading from ldb. Andrew Bartlett
* librpc: finally merge ndr_string.c.Günther Deschner2010-05-201-705/+0
| | | | Guenther
* Finish removal of iconv_convenience in public API's.Jelmer Vernooij2010-05-181-20/+14
|
* s4-libndr: fix ndr_pull_string_array() for non utf16 arrays in s4 as well.Günther Deschner2010-05-141-1/+1
| | | | Guenther
* pyxattr: Fix memory leaks.Jelmer Vernooij2010-01-211-1/+1
|
* pyxattr: Fix return value, raise exception, fix memory leak.Jelmer Vernooij2010-01-211-1/+6
|
* s4: allow python code to dump NTACL object as wellMatthieu Patou2010-01-211-0/+94
|
* pyldb: Add dom_sid.split in favor of less powerful dom_sid_to_rid().Jelmer Vernooij2009-12-311-0/+36
| | | | Signed-off-by: Andrew Tridgell <tridge@samba.org>
* provision: Avoid linking in multiple copies of security python module.Jelmer Vernooij2009-09-232-28/+0
|
* s4:py_security Add missing headerAndrew Bartlett2009-09-201-0/+23
|
* s4:provision Use code to store domain join in 'net join' as wellAndrew Bartlett2009-09-201-0/+5
| | | | | | | | This ensures we only have one codepath to store the secret, and therefore that we have a single choke point for setting the saltPrincipal, which we were previously skipping. Andrew Bartlett
* pyldb: Don't segfault when invalid type is specified to as_sddl and from_sddl.Matthieu Patou2009-09-171-2/+2
| | | | Fix bug #6723
* try to give some hint as to what is causing NDR string errorsAndrew Tridgell2009-08-121-8/+8
|
* DCE/RPC(Python): Rename py_talloc_import to py_talloc_steal.Jelmer Vernooij2009-07-301-4/+4
| | | | | Use py_talloc_reference in DCE/RPC code, fixes access to SAMR pipe.
* py_talloc_import now uses a steal, so this free is incorrectAndrew Tridgell2009-07-011-1/+0
|
* Fix of a bug in the security.descriptor.as_sddl() methodnadezhda ivanova2009-04-231-1/+1
| | | | | | | | security.descriptor.as_sddl() method did not work correctly when invoked without supplying the domain sid. Returned the same value as when the sid was provided. Test added for this case in libcli/security/tests/bindings.py Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
* Add str() for policy_handles.Andrew Bartlett2009-04-211-1/+11
| | | | Pair programmed with Jelmer
* python/dcerpc: Custom implementations of policy_handle.__init__ and ↵Andrew Bartlett2009-04-211-0/+38
| | | | | | policy_handle.__repr__ pair-programmed with Jelmer
* python/rpc: Add custom GUID.__str__, GUID.__repr__, GUID.__init__ and ↵Andrew Bartlett2009-04-211-0/+92
| | | | GUID.__cmp__.
* Make domain sid argument to as_sddl() optional.Jelmer Vernooij2009-04-201-3/+12
|
* s4: Use same function signature for convert_* as s3.Jelmer Vernooij2009-03-011-33/+23
|
* Add allow_badcharcnv argument to all conversion function, forJelmer Vernooij2009-03-011-10/+10
| | | | consistency with Samba 3.
* s4:librpc/ndr: if uninitialized variable in string_array codeStefan Metzmacher2009-02-191-1/+1
| | | | metze
* spoolss: move ndr spoolss helper to main librpc dir.Günther Deschner2009-02-051-532/+0
| | | | Guenther
* librpc: add ndr_size_string_array().Günther Deschner2009-02-031-0/+23
| | | | Guenther
* s4:py_security: avoid 'this' and use 'py_self' and 'self'Stefan Metzmacher2009-02-021-9/+9
| | | | metze
* Implement as_sddl.Jelmer Vernooij2009-01-221-1/+19
|
* Support parsing sddl for security descriptors.Jelmer Vernooij2009-01-221-2/+29
|
* Avoid using a utility header for Python replacements included in Samba,Jelmer Vernooij2009-01-081-1/+5
| | | | since this will not be shipped with talloc/tdb/tevent/etc.