Fix to correctly return NT_STATUS_DELETE_PENDING.
authorJeremy Allison <jra@samba.org>
Tue, 5 Nov 2002 21:46:33 +0000 (21:46 +0000)
committerJeremy Allison <jra@samba.org>
Tue, 5 Nov 2002 21:46:33 +0000 (21:46 +0000)
Jeremy.
(This used to be commit 075987f1db4de5e21ebf205a16a847ce0b2a926e)

source3/smbd/error.c
source3/smbd/open.c

index 2f993fb41ef03dd8c93394a3dc6ae242cc7bfb17..9d0e34bf52714f2a36c67fc7b01ce9f6ccc03486 100644 (file)
@@ -23,6 +23,7 @@
 /* these can be set by some functions to override the error codes */
 int unix_ERR_class=SMB_SUCCESS;
 int unix_ERR_code=0;
+NTSTATUS unix_ERR_ntstatus = NT_STATUS_OK;
 
 /* From lib/error.c */
 extern struct unix_error_map unix_dos_nt_errmap[];
@@ -59,8 +60,10 @@ int unix_error_packet(char *outbuf,int def_class,uint32 def_code,
        if (unix_ERR_class != SMB_SUCCESS) {
                eclass = unix_ERR_class;
                ecode = unix_ERR_code;
+               ntstatus = unix_ERR_ntstatus;
                unix_ERR_class = SMB_SUCCESS;
                unix_ERR_code = 0;
+               unix_ERR_ntstatus = NT_STATUS_OK;
        } else {
                while (unix_dos_nt_errmap[i].dos_class != 0) {
                        if (unix_dos_nt_errmap[i].unix_error == errno) {
index 417a9dd039043950f2a2f1e3c58d27a0d3e470e9..94a705e6b63c09215a8252536730160733ea4e0b 100644 (file)
@@ -401,6 +401,7 @@ static BOOL check_share_mode(connection_struct *conn, share_mode_entry *share, i
                        fname ));
                unix_ERR_class = ERRDOS;
                unix_ERR_code = ERRnoaccess;
+               unix_ERR_ntstatus = NT_STATUS_DELETE_PENDING;
                return False;
        }