summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-01-12 16:50:40 -0800
committerJeremy Allison <jra@samba.org>2010-01-12 16:50:40 -0800
commitce8dcbe91ba0252140a0e4f84ea4bc746259ddde (patch)
tree60ae3e906cdb810ee44bf1c2911f66235b397b64 /source3/smbd
parent47c1d9b39f292772e8d8f7a737ddff6c8bdfdeae (diff)
downloadsamba-ce8dcbe91ba0252140a0e4f84ea4bc746259ddde.tar.gz
samba-ce8dcbe91ba0252140a0e4f84ea4bc746259ddde.tar.bz2
samba-ce8dcbe91ba0252140a0e4f84ea4bc746259ddde.zip
Fix bug #7033 - SMBrmdir call always returns true, even on failure to delete a directory.
There is a codepath missing to propagate back error returns from the rmdir POSIX call inside close_directory when delete on close is set. This means doing an rmdir on a Windows command line will always report success, even when the directory was not deleted. This fix adds that codepath back into Samba. Jeremy.
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/reply.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index b2d98bfbc0..b6316aac46 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -5368,8 +5368,12 @@ void reply_rmdir(struct smb_request *req)
goto out;
}
- close_file(req, fsp, NORMAL_CLOSE);
- reply_outbuf(req, 0, 0);
+ status = close_file(req, fsp, NORMAL_CLOSE);
+ if (!NT_STATUS_IS_OK(status)) {
+ reply_nterror(req, status);
+ } else {
+ reply_outbuf(req, 0, 0);
+ }
dptr_closepath(sconn, smb_dname->base_name, req->smbpid);