1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00
Commit Graph

27 Commits

Author SHA1 Message Date
Stefan Metzmacher
4fcdb01808 libcli/util: let nt_errstr() fallback to hresult_errstr()
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-12-18 18:30:08 +00:00
Joseph Sutton
093ce69e15 libcli: Fix code spelling
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-10-25 22:23:37 +00:00
Joseph Sutton
efb85e3d6d s4/scripting/bin: Add NT_STATUS_OK to list of definitions
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-06-14 22:57:35 +00:00
Volker Lendecke
b7fc678107 libcli: Remove NT_STATUS_INACCESSIBLE_SYSTEM_SHORTCUT error code
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-11-11 19:08:37 +00:00
Christof Schmitt
e1335efa16 libcli: Remove define STATUS_EA_LIST_INCONSISTENT
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-22 13:30:51 +00:00
Christof Schmitt
b467f86a4a libcli: Remove define STATUS_STOPPED_ON_SYMLINK
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-22 12:07:38 +00:00
Christof Schmitt
6c2b1981da libcli: Remove define for STATUS_NOTIFY_ENUM_DIR
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-22 12:07:38 +00:00
Christof Schmitt
d5f29c0765 libcli: Remove define for STATUS_NOTIFY_CLEANUP
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-22 12:07:38 +00:00
Christof Schmitt
b7062251bc libcli: Remove define for STATUS_INVALID_EA_FLAG
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-22 12:07:37 +00:00
Christof Schmitt
172ae564ce libcli: Remove define STATUS_NO_MORE_EAS
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-22 12:07:37 +00:00
Bob Campbell
b7b289f372 errors: add gen_ntstatus.py to build system
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-14 09:46:23 +01:00
Michael Adam
d3ed269074 libcli: add new NTSTATUS codes from SMB 3.1
NT_STATUS_SMB_NO_PREAUTH_INTEGRITY_HASH_OVERLAP
NT_STATUS_SMB_BAD_CLUSTER_DIALECT

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2015-05-08 13:00:27 +02:00
Michael Adam
fae184e805 libcli: add missing printable form of NT_STATUS_VHD_SHARED
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2015-05-08 13:00:27 +02:00
Volker Lendecke
3ffff13e0d lib: Fix samba-util dep in "errors" module
This piece of code pulls in talloc_stackframe and smb_panic into what
should be a very simple mapping library. I'm trying to reduce our
dependencies right now a bit, and I think the use cases that this fixes
(unknown NTSTATUS together with double nt_errstr() calls in the same
DEBUG) are rare enough that this is not justified.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2014-09-18 20:36:11 +02:00
Volker Lendecke
6ce6262014 lib: Make nt_err_code_struct private
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Sep 17 02:56:54 CEST 2014 on sn-devel-104
2014-09-17 02:56:54 +02:00
Noel Power
e9522b5ee3 Add error codes and message descriptions for NTSTATUS
Error codes and descriptions were autogenerated from [MS-ERREF]
see http://msdn.microsoft.com/en-us/library/cc704588.aspx
Additionally some missing error descriptions for existing errors were
identified and generated.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-04-02 20:25:07 +02:00
Stefan Metzmacher
83a746d7f5 libcli/util: add NT_STATUS_FILE_NOT_AVAILABLE
metze
2012-08-07 11:16:36 +02:00
Stefan Metzmacher
f6fb55aeae libcli/util: fix typo in nt_errs[] for NT_STATUS_NETWORK_SESSION_EXPIRED
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sun Jan 29 14:11:12 CET 2012 on sn-devel-104
2012-01-29 14:11:12 +01:00
Stefan Metzmacher
23a034335c libcli/util: add NT_STATUS_NETWORK_SESSION_EXPIRED and NT_STATUS_ALL_SIDS_FILTERED
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sat Dec 17 14:24:40 CET 2011 on sn-devel-104
2011-12-17 14:24:40 +01:00
Volker Lendecke
61d0afeab3 s3: Add STATUS_STOPPED_ON_SYMLINK error code 2011-07-03 11:31:28 +02:00
Volker Lendecke
21b30d52f5 Add NT_STATUS_IO_REPARSE_TAG_NOT_HANDLED
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Jun 24 22:36:50 CEST 2011 on sn-devel-104
2011-06-24 22:36:50 +02:00
Volker Lendecke
61ad606016 Add NT_STATUS_IO_REPARSE_DATA_INVALID
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Jun 24 17:58:00 CEST 2011 on sn-devel-104
2011-06-24 17:58:00 +02:00
Andrew Tridgell
b341979adb util: moved nt_errstr() into common code
this brings nt_errstr() into common code, using the new
talloc_stackframe_exists() to ensure that we only allocate an error
string using talloc_tos() if a talloc stackframe does currently
exists. This makes it safe to use in external libraries

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-06-17 17:08:59 +10:00
Andrew Bartlett
1233ba7bf3 libclu/util: Move get_friendly_nt_error_msg() in common.
Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-06-17 17:08:59 +10:00
Andrew Bartlett
db74cad1c6 libcli/util Move NTSTATUS table to the top level 2011-05-06 07:51:24 +02:00
Jelmer Vernooij
44b728958a Use common error definitions. 2008-10-23 15:35:21 +02:00
Jelmer Vernooij
3be0f6ea56 Move libcli-util error code to top-level. 2008-10-23 03:11:19 +02:00