summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-11-05 21:47:03 +0000
committerJeremy Allison <jra@samba.org>2002-11-05 21:47:03 +0000
commitb51160452eb992fd15bf45b9616a56bae9d16e37 (patch)
treedffad37beb857c71b53a96eb25f64d2942aaf73e
parentb81b71a8d121fdf937dc32aa007a5ce01676c54c (diff)
downloadsamba-b51160452eb992fd15bf45b9616a56bae9d16e37.tar.gz
samba-b51160452eb992fd15bf45b9616a56bae9d16e37.tar.bz2
samba-b51160452eb992fd15bf45b9616a56bae9d16e37.zip
Fix to correctly return NT_STATUS_DELETE_PENDING.
Jeremy. (This used to be commit 4ec381d64249203e0924b86600fe8e67ada1cb5b)
-rw-r--r--source3/smbd/error.c3
-rw-r--r--source3/smbd/open.c1
2 files changed, 4 insertions, 0 deletions
diff --git a/source3/smbd/error.c b/source3/smbd/error.c
index 2f993fb41e..9d0e34bf52 100644
--- a/source3/smbd/error.c
+++ b/source3/smbd/error.c
@@ -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) {
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 417a9dd039..94a705e6b6 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -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;
}