]> git.puffer.fish Git - matthieu/frr.git/commit
libs: make privilege escalation thread-safe
authorMark Stapp <mjs@voltanet.io>
Tue, 5 Mar 2019 20:28:26 +0000 (15:28 -0500)
committerMark Stapp <mjs@voltanet.io>
Tue, 5 Mar 2019 16:08:31 +0000 (11:08 -0500)
commitc5c44d4b41717484f23e11882e85983585b59e95
tree1e14b9dfc1bbc52639c679541dec156f586d6010
parentb19abe1131daa38d1d0e31c4793925bb89f11c07
libs: make privilege escalation thread-safe

Privs escalation is process-wide, and a multi-threaded process
can deadlock. This adds a mutex and a counter to the privs
object, preventing multiple threads from making the privs
escalation system call.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
lib/privs.c
lib/privs.h