Subject: Re: Problem with setgid
To: Roland McGrath <roland@frob.com>
From: Bernd Ernesti <erbe0011@FH-Karlsruhe.DE>
List: current-users
Date: 12/06/1994 16:41:27
Roland McGrath writes:

>What is the argument to the setgid call which fails?  You must give
[..]

Try this programm:


#include <sys/types.h>
#include <unistd.h>
main()
{
	int groupid;
	int setgidtest;
	groupid = getegid();
	printf("groupid: %d\n", groupid);
	setgidtest = setgid(groupid);
	printf("setgid test: %d\n",setgidtest);
}


compile it, chmod 2755 programm and then try it under root and an
normal user.

It works when I also make this program setuid root and that is not
acceptable.

Bernd