mirror of
https://github.com/bitwarden/browser
synced 2024-12-26 09:54:35 +01:00
fix userid comparisons
This commit is contained in:
parent
05cc9b45e6
commit
14bac6a744
@ -8,8 +8,7 @@ USERNAME="bitwarden"
|
|||||||
CURRENTGID=`getent group $GROUPNAME | cut -d: -f3`
|
CURRENTGID=`getent group $GROUPNAME | cut -d: -f3`
|
||||||
LGID=${LOCAL_GID:-999}
|
LGID=${LOCAL_GID:-999}
|
||||||
|
|
||||||
CURRENTUID=`id -u $USERNAME`
|
NOUSER=`id -u $USERNAME > /dev/null 2>&1; echo $?`
|
||||||
NOUSER=`$CURRENTUID > /dev/null 2>&1; echo $?`
|
|
||||||
LUID=${LOCAL_UID:-999}
|
LUID=${LOCAL_UID:-999}
|
||||||
|
|
||||||
# Step down from host root
|
# Step down from host root
|
||||||
@ -38,7 +37,7 @@ fi
|
|||||||
|
|
||||||
# Create user and assign group
|
# Create user and assign group
|
||||||
|
|
||||||
if [ $NOUSER == 0 ] && [ "$CURRENTUID" != "$LUID" ]
|
if [ $NOUSER == 0 ] && [ `id -u $USERNAME` != $LUID ]
|
||||||
then
|
then
|
||||||
usermod -u $LUID $USERNAME
|
usermod -u $LUID $USERNAME
|
||||||
elif [ $NOUSER == 1 ]
|
elif [ $NOUSER == 1 ]
|
||||||
|
Loading…
Reference in New Issue
Block a user