summaryrefslogtreecommitdiff
path: root/source3/smbd/error.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-06-09 00:43:43 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:51:54 -0500
commitb28d08cc14bd37c6263ed029a57f390687746bb9 (patch)
treeebe3a15914524ee56bdb5ef76c01d46f3500436c /source3/smbd/error.c
parenteffd4a33856bf315122df9e4fbbb241a161caa62 (diff)
downloadsamba-b28d08cc14bd37c6263ed029a57f390687746bb9.tar.gz
samba-b28d08cc14bd37c6263ed029a57f390687746bb9.tar.bz2
samba-b28d08cc14bd37c6263ed029a57f390687746bb9.zip
r1093: Ensure we clear any cached errors on a deferred open call so
we don't return the wrong error code on the next packet. Jeremy. (This used to be commit c1b06deb574d7b8e746bdf0d6f0eab16848a6cc1)
Diffstat (limited to 'source3/smbd/error.c')
-rw-r--r--source3/smbd/error.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source3/smbd/error.c b/source3/smbd/error.c
index 9c81d465e7..d611e0ef87 100644
--- a/source3/smbd/error.c
+++ b/source3/smbd/error.c
@@ -29,6 +29,17 @@ NTSTATUS unix_ERR_ntstatus = NT_STATUS_OK;
extern struct unix_error_map unix_dos_nt_errmap[];
/****************************************************************************
+ Ensure we don't have any errors cached.
+****************************************************************************/
+
+void clear_cached_errors(void)
+{
+ unix_ERR_class = SMB_SUCCESS;
+ unix_ERR_code = 0;
+ unix_ERR_ntstatus = NT_STATUS_OK;
+}
+
+/****************************************************************************
Create an error packet from a cached error.
****************************************************************************/