diff options
author | Jeremy Allison <jra@samba.org> | 2002-02-27 21:46:53 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-02-27 21:46:53 +0000 |
commit | 2da4d64cfcf289d18d622c67d3250c51e6b88466 (patch) | |
tree | e6e8897eff144ae4f8cc6a79b94760a737d2e1bb /source3/smbd/error.c | |
parent | 9e2a06611d5ab7e2dbba7e9fbc84e1fcae0c58ed (diff) | |
download | samba-2da4d64cfcf289d18d622c67d3250c51e6b88466.tar.gz samba-2da4d64cfcf289d18d622c67d3250c51e6b88466.tar.bz2 samba-2da4d64cfcf289d18d622c67d3250c51e6b88466.zip |
Added "nt status support" parameter. Fix offline synchronisation.
Jeremy.
(This used to be commit 9243a9778e52999d5c62cba484640637b24994d8)
Diffstat (limited to 'source3/smbd/error.c')
-rw-r--r-- | source3/smbd/error.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/source3/smbd/error.c b/source3/smbd/error.c index 6b3b73aa87..92a7c11b15 100644 --- a/source3/smbd/error.c +++ b/source3/smbd/error.c @@ -90,10 +90,17 @@ int error_packet(char *outbuf,NTSTATUS ntstatus, if (errno != 0) DEBUG(3,("error string = %s\n",strerror(errno))); - if (global_client_caps & CAP_STATUS32) { - if (NT_STATUS_V(ntstatus) == 0 && eclass) { + /* + * We can explicitly force 32 bit error codes even when the + * parameter "nt status" is set to no by pre-setting the + * FLAGS2_32_BIT_ERROR_CODES bit in the smb_flg2 outbuf. + * This is to allow work arounds for client bugs that are needed + * when talking with clients that normally expect nt status codes. JRA. + */ + + if ((lp_nt_status_support() || (SVAL(outbuf,smb_flg2) & FLAGS2_32_BIT_ERROR_CODES)) && (global_client_caps & CAP_STATUS32)) { + if (NT_STATUS_V(ntstatus) == 0 && eclass) ntstatus = dos_to_ntstatus(eclass, ecode); - } SIVAL(outbuf,smb_rcls,NT_STATUS_V(ntstatus)); SSVAL(outbuf,smb_flg2, SVAL(outbuf,smb_flg2)|FLAGS2_32_BIT_ERROR_CODES); DEBUG(3,("error packet at %s(%d) cmd=%d (%s) %s\n", @@ -104,9 +111,8 @@ int error_packet(char *outbuf,NTSTATUS ntstatus, return outsize; } - if (eclass == 0 && NT_STATUS_V(ntstatus)) { + if (eclass == 0 && NT_STATUS_V(ntstatus)) ntstatus_to_dos(ntstatus, &eclass, &ecode); - } SSVAL(outbuf,smb_flg2, SVAL(outbuf,smb_flg2)&~FLAGS2_32_BIT_ERROR_CODES); SSVAL(outbuf,smb_rcls,eclass); |