minix/lib/libc/sys-minix/setgid.c
Lionel Sambuc cc852e7783 Message type for PM_SET{,E}GID
Change-Id: I489d9290553b28361344e0cfd59c31e7e672c22c
2014-07-28 17:05:37 +02:00

25 lines
399 B
C

#include <sys/cdefs.h>
#include <lib.h>
#include "namespace.h"
#include <string.h>
#include <unistd.h>
int setgid(gid_t grp)
{
message m;
memset(&m, 0, sizeof(m));
m.m_lc_pm_setgid.gid = grp;
return(_syscall(PM_PROC_NR, PM_SETGID, &m));
}
int setegid(gid_t grp)
{
message m;
memset(&m, 0, sizeof(m));
m.m_lc_pm_setgid.gid = grp;
return(_syscall(PM_PROC_NR, PM_SETEGID, &m));
}