From: Vincent Bernat Date: Thu, 25 Mar 2021 10:31:55 +0000 (+0100) Subject: osx: handle empty groups correctly when looking for a free UID X-Git-Tag: 1.0.9~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bfa94529e74113978e2400ce478de0d871105ea6;p=thirdparty%2Flldpd.git osx: handle empty groups correctly when looking for a free UID This was already done this way with Homebrew. Fix #438. --- diff --git a/NEWS b/NEWS index 1bc423bc..efcf9fa2 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ lldpd (1.0.9) + Do not use interface alias if we set it ourselves. + More memory leak fixes on duplicate TLVs in LLDP, CDP and EDP (related to CVE-2020-27827). + + On OSX, handle empty groups correctly when looking for a free UID/GID. * Changes: + Display port status with "show interfaces". + Do not display "age" and "via" when using "show interfaces". diff --git a/osx/scripts/postinstall.in b/osx/scripts/postinstall.in index afca49c8..9a21e745 100755 --- a/osx/scripts/postinstall.in +++ b/osx/scripts/postinstall.in @@ -10,7 +10,7 @@ $dscl . -read "/Users/${user}" &> /dev/null || { # We need to find a free UID/GID uid=200 while $($dscl . -list /Users uid | grep -q "\b${uid}$") || \ - $($dscl . -list /Users gid | grep -q "\b${uid}$"); do + $($dscl . -list /Groups gid | grep -q "\b${uid}$"); do uid=$((${uid} + 1)) done $dscl . -create /Groups/${group}