lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Wed, 18 Apr 2012 10:45:17 +0200
From:	alexandre p <ataaroap@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: Inotify and UNIX domain sockets

Hello list,

I have a simple daemon program that creates an AF_UNIX socket which it
uses for local communication, absolutely nothing fancy. A somewhat
minor annoyance with UNIX sockets is that the socket file may be
removed at the filesystem level, and the listening process isn't aware
of it. To that end I decided to use inotify to watch the socket and
kill the daemon if it gets removed.

This doesn't appear to work. Specifically, no inotify event is
generated for a *connected* UNIX domain socket on my system. If the
socket is unconnected, then a delete event is properly generated, and
a regular file with the same name of course works fine. But for a
connected socket, nothing (perhaps because the file is not in fact
unlinked in this instance, a reference to the inode being maintained
by the socket subsystem itself? This is a wild guess.)

The question is, is this by design?

Here at work I'm using a somewhat ancient version of the kernel, so my
apologies in advance if this was a known bug at some point that has
since been fixed. Unfortunately I cannot test it on a more recent
version easily.

Linux devx 2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38 EST 2008 x86_64
x86_64 x86_64 GNU/Linux

Best regards,

Alexander
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ