On Mon, 19.01.15 16:54, Jan Engelhardt (jengelh@xxxxxxx) wrote: > > On Monday 2015-01-19 14:06, Pablo Neira Ayuso wrote: > > > >I think the best solution is to use to flock() as others do but then > >we need a writable filesystem() which is what Phil was trying to skip. > > If semaphores are no longer on the table, using shm_open for an > flockable fd seems like an option. > The /dev/shm directory implicitly used for that should be there in > a normal system, so as to support POSIX shm/sem in the first place. /dev/shm is a world-writable directory. If you use that, then unprivileged processes can play games with you again by taking the name away from you, and the original problem is back. This really should be a file in /run, and nothing else. Lennart -- Lennart Poettering, Red Hat -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html