#ifndef lint
static char *sccsid = "@(#)dorexinit.c	1.1 (UKC) 3/11/87";
#endif  lint

/*
 *	dorexinit.
 *
 *	This program is the local binary which joe user calls when he
 *	wants to stoke up a remotely executing program.
 *
 *	It just calls /etc/rexinit with the same arguments as it
 *	was passed.
 *
 *	This may seem pretty pointless, but it enables us to have
 *	setgid programs (so that they can get to tsb ports) without
 *	having to have N copies of /etc/rexinit, all with different
 *	names which would make software updates a nightmare.
 *
 *	If you don't need privilege, just make a symlink to /etc/rexinit.
 *
 *		Martin Guy, UKC, 3 Nov 1987
 */

#include <stdio.h>

#include "config.h"			/* for location of rexinit binary */

main(argc, argv)
char **argv;
{
	static char rexinit[] = REXINIT;

	execv(rexinit, argv);

	fprintf(stderr, "%s: Cannot execute ", argv[0]);
	perror(rexinit);
}
