A little help please

Marcelo Gallardo marcelo at deadzone.uucp
Fri May 10 12:28:43 AEST 1991


	I've been trying to get a peice of code from a BBS to work for a
	few days now, but since my experience in C is limited to
	spelling it, I'm asking for help from the NET.

	Essentially, when a user logs in, his "shell" is the bbs
	program, but he has his own directory. The one peice of code
	that is causing me grief, is supposed to let the user drop to a
	real shell - either /bin/sh or /bin/csh. Well as luck would have
	it, when a user attempts to drop to a shell, the program dumps
	core and I'm left with a bunch of fancy characters that I can't
	read.

	Here's the code...

osshell()
{
	if(sec>=SEC_OSSHELL) {
	sprintf();
	header();
	sprintf(cbuf,SHELL);
	when();
	openlog();
	fprintf(lp,"%s dropped to system shell at
	%s",iam,asctime(stime));
	closelog();
	printf("Type 'exit' to return to bbs.");
	catchup();
	system(cbuf);
	when();
	openlog();
	fprintf(lp,"%s returneded from system shell at
	%s",iam,asctime(stime));
	closelog();
}
	commchoice();
}

	The SHELL is either "/bin/sh" or "/bin/csh". If anyone can offer
	any help in solving this problem, I would be most grateful.


-- 
Marcelo Gallardo			marcelo%deadzone at princeton.edu
Test and Evaluation Specialist		...!princeton!deadzone!marcelo
Princeton University			marcelo at sparcwood.princeton.edu
Advanced Technologies and Applications		(609) 258-5661



More information about the Comp.unix.aux mailing list