Blame tests/p_shadow-utils/33-newgrp_tests

Athmane Madjoudj 536354
#!/bin/bash
Athmane Madjoudj 536354
# Author: Iain Douglas <centos@1n6.org.uk>
Athmane Madjoudj 536354
Athmane Madjoudj 536354
# Check that the user can change their primary group. This relies on the 
Athmane Madjoudj 536354
# observation that the current primary group is printed first
Athmane Madjoudj 536354
#
Athmane Madjoudj 536354
echo "Basic newgrp test"
Athmane Madjoudj 536354
groups testshadow | grep -q "testshadow testgroup" || { t_Log "FAIL: Default testshadow user group information incorrect"; exit $FAIL; }
Athmane Madjoudj 536354
echo OK
Athmane Madjoudj 536354
echo $( su - testshadow <
Athmane Madjoudj 536354
newgrp testgroup
Athmane Madjoudj 536354
groups
Athmane Madjoudj 536354
exit
Athmane Madjoudj 536354
EOF
Athmane Madjoudj 536354
) | grep -q "testgroup testshadow"
Athmane Madjoudj 536354
t_CheckExitStatus $?