#!/bin/ksh

##########################################################################
# sshroot:  Forced command for ssh/pka access to root.  If remote command
#           is given, this script will log the command to syslog;
#           otherwise, it'll log in normally, source the profile, and execute
#           ksh.
# Author:   Doug O'Leary
# Created:  01/02/08
##########################################################################
# $Log: sshroot,v $
# Revision 1.1  2010/12/08 20:48:56  dkoleary
# Initial revision
#
# Revision 1.2  2008/01/04  09:52:05  09:52:05  root ()
# replaced exec w/eval to allow multiple commands in ssh batch mode
# 
# Revision 1.1  2008/01/02  22:12:01  22:12:01  root ()
# Initial revision
# 
##########################################################################

if [ "${SSH_ORIGINAL_COMMAND}x" != "x" ]
then
	logger -p auth.info "ssh/pka executed ${SSH_ORIGINAL_COMMAND}"
	eval "${SSH_ORIGINAL_COMMAND}"
else
	. ./.profile
	/bin/ksh -o vi
fi

