$Id: PORTING,v 1.5 2002/06/26 22:21:21 hbo Exp $

Sudosciptd and sudoshell are written in Perl. They should be
pretty portable across POSIX implementations. Basically,
if sudo runs on your platform, then so should sudoshell.
The main portability issue is the facility in sudoshell 
that starts the daemon if it is not running. This is important
to ensure no loss of the audit trail, but requires sudoshell
to know how the daemon should be started on a given platform.
The code that implements this facility in sudoshell is:

my $initscr;
if ($^O eq 'solaris'){
  $PS="ps -ef";
  $initscr="/etc/init.d/sudoscriptd";
  $ENV{PATH} .= ':/usr/freeware/bin:/usr/bsd' if $^O eq 'irix';
} elsif ($^O eq 'linux'){
  $PS="ps -auxww";
  $initscr="/etc/init.d/sudoscriptd";
} elsif($^O eq 'freebsd' || $^O eq 'openbsd') {
  $PS="ps -aux";
  $initscr="/usr/local/etc/rc.d/sudoscriptd.sh";
} else {
  print <<'EOM';
Sorry, but your OS is not among the ones I support Currently, that's
linux, solaris, freebsd and openbsd. That's because those are the ones
I or other contributors have access to. If you'd like support for your OS, 
either give me a root shell (!) on a representative system running your OS, 
or port it yourself and send me (hbo@egbok.com) the diffs. If system directory
locations (i.e. /var/log and /var/run) don't have to change, and your system 
has Perl 5 and POSIX,  That shouldn't be too hard. See the PORTING document 
in the distribution for details.
EOM

  exit;
}

You also need to be sure that grep, ps and sudo can be
found in the PATH set by the following line:

	$ENV{PATH}="/bin:/usr/bin:/usr/sbin:/usr/local/bin"; # Give ourselves a safe one.

Later on, the $initscr variable is called using sudo with an argument
of 'start'. The $PS program is used to look for the running
sudoscriptd. Implementing a startup file, perhaps borrowed from one of
the existing ones, setting $PS and $initscr appropriately and adding
the $^O value for your OS to the above logic should do the trick as
far as the code is concerned. Please let me know if you do this, and
send me your [init|rc] script and the diffs to sudoshell so I can roll
them in to the distribution. I'll also do the OS dependent hacking on
the Makefile, unless you want to take this on too. I can be reached at
hbo@egbok.com. There is also a developer's mailing list at 
sudoscript-devel@lists.sourceforge.net. It's GNU Mailman based, so
you can subscribe from the web page at
	https://lists.sourceforge.net/lists/listinfo/sudoscript-devel


