summaryrefslogtreecommitdiff
path: root/source4/ntvfs
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-12-17 05:03:57 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:07:28 -0500
commitd5d0651bb98be2d060a61048c50cbc20e7901416 (patch)
treee25061eed382dd4a08540317310674dac8d9e401 /source4/ntvfs
parent3b8e83a8c8f32ca658841f1fae344399a48d66a4 (diff)
downloadsamba-d5d0651bb98be2d060a61048c50cbc20e7901416.tar.gz
samba-d5d0651bb98be2d060a61048c50cbc20e7901416.tar.bz2
samba-d5d0651bb98be2d060a61048c50cbc20e7901416.zip
r4244: add more calls to pvfs_xattr_unlink_hook() on file/dir create, to try to beat race
conditions in the tdb xattr backend (This used to be commit 3ac840159881ce6eeac27ff0dc324e4d6ac0a70a)
Diffstat (limited to 'source4/ntvfs')
-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 549f4b9780..c4c03f3ad4 100644
--- a/source4/ntvfs/posix/pvfs_mkdir.c
+++ b/source4/ntvfs/posix/pvfs_mkdir.c
@@ -49,6 +49,8 @@ static NTSTATUS pvfs_t2mkdir(struct pvfs_state *pvfs,
return pvfs_map_errno(pvfs, errno);
}
+ pvfs_xattr_unlink_hook(pvfs, name->full_name);
+
status = pvfs_resolve_name(pvfs, req, md->t2mkdir.in.path, 0, &name);
if (!NT_STATUS_IS_OK(status)) {
return status;
@@ -105,6 +107,8 @@ NTSTATUS pvfs_mkdir(struct ntvfs_module_context *ntvfs,
return pvfs_map_errno(pvfs, errno);
}
+ pvfs_xattr_unlink_hook(pvfs, name->full_name);
+
return NT_STATUS_OK;
}