Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – planix.SVN – Blame – /os/branches/feature_posix/sys/src/ape/lib/ap/plan9/getgid.c – Rev 2

Subversion Repositories planix.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#include <sys/types.h>
2
#include <grp.h>
3
#include <unistd.h>
4
 
5
/*
6
 * BUG: assumes group that is same as user name
7
 * is the one wanted (plan 9 has no "current group")
8
 */
9
gid_t
10
getgid(void)
11
{
12
	struct group *g;
13
	g = getgrnam(getlogin());
14
	return g? g->gr_gid : 1;
15
}
16
 
17
gid_t
18
getegid(void)
19
{
20
	return getgid();
21
}