git.samba.org
/
sfrench
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
836bfb3
)
Ensure can_delete returns correct error code.
author
Jeremy Allison
<jra@samba.org>
Tue, 5 Nov 2002 22:49:54 +0000
(22:49 +0000)
committer
Jeremy Allison
<jra@samba.org>
Tue, 5 Nov 2002 22:49:54 +0000
(22:49 +0000)
Jeremy.
source/smbd/reply.c
patch
|
blob
|
history
diff --git
a/source/smbd/reply.c
b/source/smbd/reply.c
index a881e135c08c1cecb4ae19f73a66e982984bed72..3371d9b54411b2e6ecb866820e888583beaa37bc 100644
(file)
--- a/
source/smbd/reply.c
+++ b/
source/smbd/reply.c
@@
-1278,10
+1278,13
@@
static NTSTATUS can_delete(char *fname,connection_struct *conn, int dirtype)
if (!fsp) {
NTSTATUS ret = NT_STATUS_ACCESS_DENIED;
- if (unix_ERR_class == ERRDOS && unix_ERR_code == ERRbadshare)
+ if (!NT_STATUS_IS_OK(unix_ERR_ntstatus))
+ ret = unix_ERR_ntstatus;
+ else if (unix_ERR_class == ERRDOS && unix_ERR_code == ERRbadshare)
ret = NT_STATUS_SHARING_VIOLATION;
unix_ERR_class = 0;
unix_ERR_code = 0;
+ unix_ERR_ntstatus = NT_STATUS_OK;
return ret;
}
close_file(fsp,False);