summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-03-26 22:20:43 +0000
committerJeremy Allison <jra@samba.org>2001-03-26 22:20:43 +0000
commitfab898f9cd06d136efbd2f1de047c744bdd1fd07 (patch)
treea7c69300fbfbd33219b58097ae2fee491fcfdd30 /source3/smbd
parent071a770ed444f2ed35d96a3b371dd587bd64f993 (diff)
downloadsamba-fab898f9cd06d136efbd2f1de047c744bdd1fd07.tar.gz
samba-fab898f9cd06d136efbd2f1de047c744bdd1fd07.tar.bz2
samba-fab898f9cd06d136efbd2f1de047c744bdd1fd07.zip
Patch from Sean.Batt@anu.edu.au to ensure error reporting is done before
any code that could modify errno is called. Jeremy. (This used to be commit 109a174de9e23ccc89ae17d6b5b425b5947c8565)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/error.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/smbd/error.c b/source3/smbd/error.c
index d879f9a93c..472a8d8fd1 100644
--- a/source3/smbd/error.c
+++ b/source3/smbd/error.c
@@ -119,6 +119,9 @@ int error_packet(char *inbuf,char *outbuf,int error_class,uint32 error_code,int
int cmd = CVAL(inbuf,smb_com);
int flgs2 = SVAL(outbuf,smb_flg2);
+ if (errno != 0)
+ DEBUG(3,("error string = %s\n",strerror(errno)));
+
if ((flgs2 & FLAGS2_32_BIT_ERROR_CODES) == FLAGS2_32_BIT_ERROR_CODES)
{
SIVAL(outbuf,smb_rcls,error_code);
@@ -139,8 +142,5 @@ int error_packet(char *inbuf,char *outbuf,int error_class,uint32 error_code,int
}
- if (errno != 0)
- DEBUG(3,("error string = %s\n",strerror(errno)));
-
return(outsize);
}