summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-08-21 06:06:02 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:16:20 -0500
commitb950a91fb2a62c5429bbeb60679dfbd695fd6732 (patch)
tree6c8b33e88592503673493cef03c160ec4e9792da
parent3f229bd5838cf09bd3d5cf1942269143ecb7ea9e (diff)
downloadsamba-b950a91fb2a62c5429bbeb60679dfbd695fd6732.tar.gz
samba-b950a91fb2a62c5429bbeb60679dfbd695fd6732.tar.bz2
samba-b950a91fb2a62c5429bbeb60679dfbd695fd6732.zip
r17656: some systems (like older solaris) don't return ENOTEMPTY on rmdir()
with non-empty directory (This used to be commit 1775381afad8a97777a45b6e98802dda8b389ecb)
-rw-r--r--source4/ntvfs/posix/pvfs_mkdir.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/ntvfs/posix/pvfs_mkdir.c b/source4/ntvfs/posix/pvfs_mkdir.c
index 338fc7df0b..2f5ba0a744 100644
--- a/source4/ntvfs/posix/pvfs_mkdir.c
+++ b/source4/ntvfs/posix/pvfs_mkdir.c
@@ -179,6 +179,10 @@ NTSTATUS pvfs_rmdir(struct ntvfs_module_context *ntvfs,
}
if (rmdir(name->full_name) == -1) {
+ /* some olders systems don't return ENOTEMPTY to rmdir() */
+ if (errno == EEXIST) {
+ return NT_STATUS_DIRECTORY_NOT_EMPTY;
+ }
return pvfs_map_errno(pvfs, errno);
}