#!/bin/sh
#
#	Copyright (c) 2007 Brocade Communications Systems, Inc.
#	All rights reserved.
#
#	File name:	netstat			    
#	Module name: fabos/src/utils/sys
#
#	This script is wrapper to the traditional /bin/netstat command
#	for enforcing the RBAC check on the CLI.
#
PATH=/fabos/libexec:/bin

# Check RBAC permission on command.
/fabos/libexec/rbac_check `basename $0`

if [ $? -ne 0 ]; then
	exit 127
fi

if [ $# -eq 0 ]; then
	/bin/netstat
else
	/bin/netstat $*
fi
