Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Sep 1996 09:32:16 -0400 (EDT)
From:      Jeffrey Wheat <jeff@tad.cetlink.net>
To:        paul@nation-net.com (Paul Walsh)
Cc:        freebsd-questions@freebsd.org
Subject:   Re: suidperl from httpd not working
Message-ID:  <199609051332.JAA27682@tad.cetlink.net>
In-Reply-To: <322EC149.F3D@nation-net.com> from "Paul Walsh" at Sep 5, 96 01:02:17 pm

next in thread | previous in thread | raw e-mail | index | archive | help
In reply to Paul Walsh's email
> Is there any way an httpd user (nobody) can run a setuid perl script through 
> cgi? Does it have to be a 'real' user.

Paul,
	I use a wrapper to do this.

main(argc,argv)
	int argc;
	char **argv;
{
	setuid(0);
	seteuid(0);
	execv("my perl script", argv);
}

Regards,
Jeff




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609051332.JAA27682>