[Wine-patches] [eterhack] server: Do not open second file descriptor for locks if file is not regular.
Alexander Morozov
amorozov на etersoft.ru
Вт Авг 4 18:55:46 MSD 2009
----------- следующая часть -----------
From 5a599cbff4c6880f2917608e92ee2043c6a2a2ed Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov на etersoft.ru>
Date: Tue, 4 Aug 2009 18:54:07 +0400
Subject: [eterhack] server: Do not open second file descriptor for locks if file is not regular.
---
server/fd.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/server/fd.c b/server/fd.c
index 9071611..8259ea5 100644
--- a/server/fd.c
+++ b/server/fd.c
@@ -1767,7 +1767,8 @@ struct fd *open_fd( const char *name, int flags, mode_t *mode, unsigned int acce
fd->closed = closed_fd;
list_add_head( &inode->open, &fd->inode_entry );
- if (rw_mode != O_RDWR && inode_get_lock_fd( inode ) == -1 &&
+ if (S_ISREG(st.st_mode) && rw_mode != O_RDWR &&
+ inode_get_lock_fd( inode ) == -1 &&
(!etersoft_check_cifs || !etersoft_check_cifs()))
{
lock_fd = open( name, O_RDWR );
--
1.6.3.3
Подробная информация о списке рассылки Wine-patches