lib/specinfra/command/base/user.rb in specinfra-2.44.1 vs lib/specinfra/command/base/user.rb in specinfra-2.44.2

- old
+ new

@@ -3,10 +3,10 @@ def check_exists(user) "id #{escape(user)}" end def check_belongs_to_group(user, group) - "id #{escape(user)} | awk '{print $3}' | grep -- #{escape(group)}" + "id #{escape(user)} | sed 's/ context=.*//g' |awk -F= '{print $4}' | grep -- #{escape(group)}" end def check_belongs_to_primary_group(user, group) "id -gn #{escape(user)}| grep ^#{escape(group)}$" end