summaryrefslogtreecommitdiff
path: root/libcli/util
AgeCommit message (Collapse)AuthorFilesLines
2025-04-18libcli/util: map EPROTONOSUPPORT to NT_STATUS_PROTOCOL_NOT_SUPPORTEDStefan Metzmacher1-0/+3
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-01-02libsamba-errors: eliminate dependency on samba-debugMichael Tokarev2-4/+1
libsamba-errors is a collection of error codes/descriptions like strerror(), - it is a set of simple functions converting error code to string or the like. However, in one single place there's a DBG_DEBUG() "call" in errmap_unix.c, in map_errno_from_nt_status(), which is here for a very long time (since before samba3, initially with debug level 10). Drop this debugging info, and eliminate extra dependency. This makes libsamba-errors independent and self-contained, with a well-known and stable ABI. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2024-12-18libcli/util: let nt_errstr() fallback to hresult_errstr()Stefan Metzmacher1-0/+15
Sometimes NTSTATUS fields return things like HRES_SEC_E_WRONG_PRINCIPAL. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Wed Dec 18 18:30:08 UTC 2024 on atb-devel-224
2024-10-23Add ntstatus_gen for RustDavid Mulder1-2/+2
Signed-off-by: David Mulder <dmulder@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
2024-01-15python: Generate HRESULT definitions automaticallyJoseph Sutton1-2/+8
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Autobuild-User(master): Joseph Sutton <jsutton@samba.org> Autobuild-Date(master): Mon Jan 15 01:56:53 UTC 2024 on atb-devel-224
2024-01-15s4:scripting: Generate HRESULT definitions as part of the build processJoseph Sutton4-17690/+20527
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-01-15libcli:util: Update NTSTATUS definitionsJoseph Sutton1-3/+3
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-01-15libcli:util: Update HRESULT definitionsJoseph Sutton2-2/+2
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2023-10-25libcli/util: add struct tstream_context to tstream_read_pdu_blob_full_fn_tRalph Boehme2-2/+6
Add struct tstream_context to tstream_read_pdu_blob_full_fn_t and update all callers of tstream_read_pdu_blob_send() to use the correct callback. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-10-25libcli/util: add tstream_full_request_u32 and tstream_full_request_u16Ralph Boehme2-0/+54
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-10-25libcli: Fix code spellingJoseph Sutton2-3/+3
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-10-17libcli/util: let win_errstr() fallback to hresult_errstr()Stefan Metzmacher1-0/+14
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-06-14s4/scripting/bin: Add NT_STATUS_OK to list of definitionsJoseph Sutton2-3/+0
Add NT_STATUS_OK to our pre-generated list of status codes. Ensure it goes first in the list to ensure that code that previously found this error code in ‘special_errs’ maintains the same behaviour by falling back to ‘nt_errs’. This makes NT_STATUS_OK available to Python code using the ‘ntstatus’ module. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-05-18libcli: Add missing includeJoseph Sutton1-0/+2
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-03-09libcli: Shrink .data segment by 43264 bytesVolker Lendecke1-7/+4
A case statement only references const strings, pointers in an array need to be relocated at exec() time. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2023-03-09libcli: Shrink .data segment by 43264 bytesVolker Lendecke2-8/+6
A case statement only references const strings, pointers in an array need to be relocated at exec() time. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2023-03-09build: Fix a long lineVolker Lendecke1-1/+5
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2023-03-09libcli/util: Avoid an includes.hVolker Lendecke1-1/+2
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2023-03-09lib: Fix whitespaceVolker Lendecke7-46/+46
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2022-08-17waf: Fix SO version number of libsamba-errorsAndreas Schneider1-1/+1
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15141 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
2022-06-14libcli:util: Update werror tableJoseph Sutton2-4/+17
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2021-11-11libcli: Remove NT_STATUS_INACCESSIBLE_SYSTEM_SHORTCUT error codeVolker Lendecke2-2/+0
This is the same as STATUS_STOPPED_ON_SYMLINK, and this is what also wireshark displays. Avoid some confusion. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2021-07-08libcli: Move map_errno_from_nt_status from s3 lib to common libcliSamuel Cabrero2-0/+145
Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2020-11-30libcli: Align a few integer typesVolker Lendecke3-4/+4
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2020-06-22libcli: Remove define STATUS_EA_LIST_INCONSISTENTChristof Schmitt2-2/+0
The auto-generated define NT_STATUS_EA_LIST_INCONSISTENT is still available. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Jun 22 13:30:51 UTC 2020 on sn-devel-184
2020-06-22libcli: Remove define STATUS_STOPPED_ON_SYMLINKChristof Schmitt2-2/+0
The auto-generated define NT_STATUS_STOPPED_ON_SYMLINK is still available. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2020-06-22libcli: Remove define for STATUS_PENDINGChristof Schmitt1-1/+0
The auto-generated define NT_STATUS_PENDING is still available. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2020-06-22libcli: Remove define for STATUS_NOTIFY_ENUM_DIRChristof Schmitt2-2/+0
The auto-generated define NT_STATUS_NOTIFY_ENUM_DIR is still available. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2020-06-22libcli: Remove define for STATUS_NOTIFY_CLEANUPChristof Schmitt2-2/+0
The auto-generated NT_STATUS_NOTIFY_CLEANUP is still available. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2020-06-22libcli: Remove define for STATUS_INVALID_EA_FLAGChristof Schmitt2-2/+0
The auto-generated define NT_STATUS_INVALID_EA_FLAG is still available. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2020-06-22libcli: Remove define STATUS_NO_MORE_EASChristof Schmitt2-2/+0
The auto-generated define NT_STATUS_NO_MORE_EAS is still available. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2020-06-22libcli: Remove define for ERROR_INVALID_DATATYPEChristof Schmitt1-1/+0
The auto-generated define WERR_INVALID_DATATYPE is still available. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2019-06-27lib/crypto: move gnutls error wrapper to own subsystemAndrew Bartlett3-102/+2
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2019-06-24libcli:util: Add gnutls_errorAndreas Schneider3-2/+103
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-03-21build: Remove bld.gen_python_environments()Andrew Bartlett1-3/+2
This was part of --extra-python support. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2019-01-16libcli: remove declaration of nt_errstr_constPhilipp Gesang1-9/+0
nt_errstr_const was renamed nt_errstr in 2011, rendering the declaration useless. Signed-off-by: Philipp Gesang <philipp.gesang@intra2net.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2018-11-30Fix spelling mistakesOlly Betts1-2/+2
Signed-off-by: Olly Betts <olly@survex.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2017-08-22python: Make generated modules samba.ntstatus and samba.werror Python 3 ↵Lumir Balhar1-10/+11
compatible. Signed-off-by: Lumir Balhar <lbalhar@redhat.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlet <abartlet@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Tue Aug 22 17:38:17 CEST 2017 on sn-devel-144
2017-08-18werror: Add WERR_DS_DRA_RECYCLED_TARGETTim Beale1-0/+1
When the DRS client encounters a linked attribute with an unknown target object, it should return a RECYCLED_TARGET error, which should result in the client resending the GETNCChanges request with the GET_TGT flag set. This error code is currently documented by Microsoft under System Error Codes (8200-8999). I contacted them and they will also add it to the MS-ERREF doc in future. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Garming Sam <garming@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> BUG: https://bugzilla.samba.org/show_bug.cgi?id=12972
2017-06-07libcli:util: Update werror tableAndreas Schneider2-4/+7
This adds ERROR_PRINTER_DRIVER_DOWNLOAD_NEEDED for MS-PAR. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2017-03-13getncchanges: Return correct denied REPL_SECRET error codeGarming Sam1-0/+2
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2017-02-14errors: add WERROR generation to build systemBob Campbell3-7850/+143
Parts of doserr.c and werror.h are now generated into werror_gen.c and werror_gen.h, respectively. Also, py_werror.c is now generated. Some errors were not included in the list which we now generate WERRORs from. These errors have been manually included. Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2017-02-14errors: add table to generate WERRORs fromBob Campbell1-0/+18929
Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2017-02-14errors: pull out code into common fileBob Campbell1-1/+1
This is a precursor to generating other types of errors. Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2017-02-14python: Add python module with NTSTATUS constantsBob Campbell1-0/+5
This has been generated by gen_ntstatus.py Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2017-02-14errors: add gen_ntstatus.py to build systemBob Campbell3-5456/+102
nterr_gen.c, ntstatus_gen.h and py_ntstatus.c are now generated files. Errors which are now generated have been removed from nterr.c and ntstatus.h. Errors which existed previously but are not in the table we generated from have been manually added. Some errors are incorrectly named; e.g. STATUS_MORE_ENTRIES should be NT_STATUS_MORE_ENTRIES. These are simply remapped to the correct names. Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2017-02-14errors/gen_ntstatus: add error table for generation scriptBob Campbell1-0/+12629
Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-09-28werror: removed WERR_RPC_E_INVALID_HEADER (unused, already known as ↵Günther Deschner1-4/+0
HRES_RPC_E_INVALID_HEADER) Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28werror: removed WERR_RPC_E_REMOTE_DISABLED (replaced with ↵Günther Deschner2-2/+0
HRES_RPC_E_REMOTE_DISABLED) Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28werror: removed WERR_SEC_E_ALGORITHM_MISMATCH (unused, already known as ↵Günther Deschner2-4/+0
HRES_SEC_E_ALGORITHM_MISMATCH) Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>