summaryrefslogtreecommitdiff
path: root/source3/smbd/error.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-09-30 17:13:37 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:04:48 -0500
commit54abd2aa66069e6baf7769c496f46d9dba18db39 (patch)
tree9cf8e88168011797319ba9e9866749201b1eac1e /source3/smbd/error.c
parent4a2cc231d22a82ed21771a72508f15d21ed63227 (diff)
downloadsamba-54abd2aa66069e6baf7769c496f46d9dba18db39.tar.gz
samba-54abd2aa66069e6baf7769c496f46d9dba18db39.tar.bz2
samba-54abd2aa66069e6baf7769c496f46d9dba18db39.zip
r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo * winbindd's {group,alias}membership new functions * winbindd's lookupsids() functionality * swat (trunk changes to be reverted as per discussion with Deryck) (This used to be commit 939c3cb5d78e3a2236209b296aa8aba8bdce32d3)
Diffstat (limited to 'source3/smbd/error.c')
-rw-r--r--source3/smbd/error.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/source3/smbd/error.c b/source3/smbd/error.c
index 090a2f6d81..3cdcae5c7f 100644
--- a/source3/smbd/error.c
+++ b/source3/smbd/error.c
@@ -41,23 +41,22 @@ void set_saved_error_triple(int eclass, int ecode, NTSTATUS status)
override_ERR_ntstatus = status;
}
+void set_saved_ntstatus(NTSTATUS status)
+{
+ uint8 tmp_eclass; /* Hmmm. override_ERR_class is not uint8... */
+ override_ERR_ntstatus = status;
+ ntstatus_to_dos(status, &tmp_eclass, &override_ERR_code);
+ override_ERR_class = tmp_eclass;
+
+}
+
/****************************************************************************
Return the current settings of the error triple. Return True if any are set.
****************************************************************************/
-BOOL get_saved_error_triple(int *peclass, int *pecode, NTSTATUS *pstatus)
+NTSTATUS get_saved_ntstatus(void)
{
- if (peclass) {
- *peclass = override_ERR_class;
- }
- if (pecode) {
- *pecode = override_ERR_code;
- }
- if (pstatus) {
- *pstatus = override_ERR_ntstatus;
- }
-
- return (override_ERR_class || !NT_STATUS_IS_OK(override_ERR_ntstatus));
+ return override_ERR_ntstatus;
}
/****************************************************************************