#!/bin/sh
#
# Copyright 1999 Sun Microsystems, Inc. All rights reserved.
#
# @(#)ss_ts_pset.sh	1.5 99/12/09 Sun Microsystems, Inc.
#

setpriv() {
   if [ -d "$1" ]; then
   	for file in `ls $1`
   	do
		if [ -d "$1/$file" ]
		then setpriv "$1/$file"

		elif [ -x "$1/$file" ]
		then setfpriv -s -a all $1/$file
		fi
   	done
   elif [ -x "$1" ]; then
	setfpriv -s -a all $1
   fi
}

OSVERSION=`uname -v`
if [ $OSVERSION = TS7 ]; then
	if [ ! -h /usr/lib/libjava.so  -a ! -f /usr/lib/libjava.so ]; then
		if [ -f /usr/java/lib/libjava.so ]; then
			ln -s /usr/java/lib/libjava.so /usr/lib/libjava.so
		fi
	fi
	for dir in /opt/SUNWicg/SunScreen/ssadm /opt/SUNWicg/SunScreen/bin /opt/SUNWicg/SunScreen/lib /opt/SUNWicg/SunScreen/proxies /usr/sbin/*skip* /usr/bin/htserver /usr/dt/bin/hotjava
	do
	setpriv "$dir"
	done

fi
