Check we read off the compelte event from inotify
commit1cd8f66ad37fe8222d09ed0909ea8514cc843d9e
authorSimo Sorce <idra@samba.org>
Sat, 5 Sep 2009 14:18:12 +0000 (5 10:18 -0400)
committerKarolin Seeger <kseeger@samba.org>
Wed, 7 Oct 2009 06:54:48 +0000 (7 08:54 +0200)
treebc4cb86eab00a9552cc51fb95018abde13322fdf
parent46fcb7cb14af4a2af05d10dab3532e3915942b66
Check we read off the compelte event from inotify

The kernel may return a short read, so we must use read_data() to make sure we
read off the full buffer. If somethign bad happens we also need to kill the
inotify watch because the filedescriptor will return out of sync structures if
we read only part of the data.

Fixes bug #6693.
(cherry picked from commit 7fd407fefe92939ecb78400d22aac55590851f70)
source/smbd/notify_inotify.c