#!/bin/sh


# ---------------------------------------------------------------------------- #
#
# Return the effective userid
#
# Parameters:
#           input : - 
#           output: - error code ("0": ok; "1": error)
#                   - effective userid
#
# ---------------------------------------------------------------------------- #


if ( test -x /usr/bin/whoami )
then
    echo "0 `/usr/bin/whoami`" > /usr/tmp/dm_ret 
elif ( test -x /bsd4.3/usr/ucb/whoami )
then
    echo "0 `/bsd4.3/usr/ucb/whoami`" > /usr/tmp/dm_ret     
elif ( test -x /usr/ucb/whoami )
then
    echo "0 `/usr/ucb/whoami`" > /usr/tmp/dm_ret     
else
    echo "1" > /usr/tmp/dm_ret 
fi


