summaryrefslogtreecommitdiffstats
path: root/source3/modules
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-10-16 16:37:20 -0700
committerKarolin Seeger <kseeger@samba.org>2009-11-26 11:39:29 +0100
commit9d4479655324c161d3cee480f13c1cd9d31330d2 (patch)
tree9f4d5939fa71b888f12a5a83b454f980c93537fc /source3/modules
parentde215dcadc4c0753715945595b6420227f832a31 (diff)
downloadsamba-9d4479655324c161d3cee480f13c1cd9d31330d2.tar.gz
samba-9d4479655324c161d3cee480f13c1cd9d31330d2.tar.xz
samba-9d4479655324c161d3cee480f13c1cd9d31330d2.zip
Fix one missing STAT -> LSTAT with POSIX pathnames in vfs_xattr_tdb.c. Caught by the torture tester. I love unit tests :-). Jeremy.
(cherry picked from commit 9180559b4ab26813699d3c1410b3fc1b775b0e1d)
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_xattr_tdb.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/modules/vfs_xattr_tdb.c b/source3/modules/vfs_xattr_tdb.c
index 55fb1417b71..f7fbfce4cb9 100644
--- a/source3/modules/vfs_xattr_tdb.c
+++ b/source3/modules/vfs_xattr_tdb.c
@@ -630,9 +630,15 @@ static int xattr_tdb_unlink(vfs_handle_struct *handle,
return -1;
}
- if (SMB_VFS_STAT(handle->conn, smb_fname_tmp) == -1) {
+ if (lp_posix_pathnames()) {
+ ret = SMB_VFS_LSTAT(handle->conn, smb_fname_tmp);
+ } else {
+ ret = SMB_VFS_STAT(handle->conn, smb_fname_tmp);
+ }
+ if (ret == -1) {
goto out;
}
+
if (smb_fname_tmp->st.st_ex_nlink == 1) {
/* Only remove record on last link to file. */
remove_record = true;