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.
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);