]> git.ipfire.org Git - thirdparty/lldpd.git/commit
lldpcli: root is privileged
authorVincent Bernat <bernat@luffy.cx>
Thu, 20 Feb 2014 20:37:22 +0000 (21:37 +0100)
committerVincent Bernat <bernat@luffy.cx>
Thu, 20 Feb 2014 20:39:14 +0000 (21:39 +0100)
commit91f424d16491c6628a39638c0dea5a7cc2251edf
tree1f3fd0836584e85f3acb272244c6b07bf5a15438
parentcc160b8878585f2695c69e6df2db121c223f2d0f
lldpcli: root is privileged

For some reason, this bug was not catched before. It was expected that
`lldpcli` can be installed as suid `_lldpd` to give user read access to
the neighbor information. However, to avoid write access, we checked if
the user was privileged by checking equality of effective and real user
uid. However, even for root, they don't have to match. Maybe they
matched in the past?

Therefore, directly check for UID == 0 too.

This should fix #56
src/client/lldpcli.c