#define VERSION "Change Rooted SHell, by pmsac@toxyn.org, 1998"

#include <stdio.h>
#include <unistd.h>

#define ROOT "/home"
#define SHELL "/bin/bash"
#define SHELLNAME "bash"

void main(int argc, char *argv[], char *envp[]) {
char *argp[] = { SHELLNAME, NULL };

	if (chroot(ROOT))
		printf("Unable to chroot !\n");
	else
		if (setgid(getgid()))
			printf("Unable to setgid !\n");
		else
			if (setuid(getuid()))
				printf("Unable to setuid !\n");
			else {
				execve(SHELL, argp, envp);
				printf("Unable to exec !\n");
			}
}
