]> git.ipfire.org Git - thirdparty/lldpd.git/commit
client: use a dedicated file lock to prevent concurrent changes
authorVincent Bernat <vincent@bernat.ch>
Tue, 4 May 2021 13:55:21 +0000 (15:55 +0200)
committerVincent Bernat <vincent@bernat.ch>
Tue, 4 May 2021 14:00:04 +0000 (16:00 +0200)
commitc38c53d012f3331d22ae6d8d7a2b130e72d9afb6
treee47cd9997e778aca3bbb81fd6de4307ce11b920b
parent1b297ccc0956648aea46e16799a1f9c490c4fc00
client: use a dedicated file lock to prevent concurrent changes

We were using a lock on the Unix socket. This was working on Linux but
this is not portable. Therefore, we have to use a dedicated file for
this purpose. We use /var/lock by default.

We don't do a secure creation as the lock file is only opened in
append mode, so a symlink attack could only create empty file or reset
the timestamp of a file. No content can be erased this way.

Fix #445
NEWS
configure.ac
src/client/commands.c