service_user="`echo "$service_block" | sed -nr "s/^[[:space:]]*user[[:space:]]*=[[:space:]]*(.*)[[:space:]]*$/\1/p"`"
if [ -n "$service_user" ]; then
- service_user_chk="`getent passwd "$service_user"`" || true
- if [ -z "$service_user_chk" ]; then
- cp_echo "CN: Error in /etc/xinetd.d/$services_file for service '$service' - user '$service_user' does not exist."
- service_disable=1
- fi
+ for service_user_x in $service_user; do
+ service_user_chk="`getent passwd $service_user_x`" || true
+ if [ -z "$service_user_chk" ]; then
+ cp_echo "CN: Error in /etc/xinetd.d/$services_file for service '$service' - user '$service_user_x' does not exist."
+ service_disable=1
+ break
+ fi
+ done
fi
# Check service's group
service_group="`echo "$service_block" | sed -nr "s/^[[:space:]]*group[[:space:]]*=[[:space:]]*(.*)[[:space:]]*$/\1/p"`"
if [ -n "$service_group" ]; then
- service_group_chk="`getent passwd "$service_group"`" || true
- if [ -z "$service_group_chk" ]; then
- cp_echo "CN: Error in /etc/xinetd.d/$services_file for service '$service' - group '$service_group' does not exist."
- service_disable=1
- fi
+ for service_group_x in $service_user; do
+ service_group_chk="`getent passwd $service_group_x`" || true
+ if [ -z "$service_group_chk" ]; then
+ cp_echo "CN: Error in /etc/xinetd.d/$services_file for service '$service' - group '$service_group_x' does not exist."
+ service_disable=1
+ break
+ fi
+ done
fi
# Check service's binary