etc/services - sync with NetBSD-8
[minix.git] / minix / lib / libc / sys / setuid.c
blobe14ad4ceda2d3d201eec404466a0476003d4056a
1 #include <sys/cdefs.h>
2 #include <lib.h>
3 #include "namespace.h"
5 #include <string.h>
6 #include <unistd.h>
8 int setuid(uid_t usr)
10 message m;
12 memset(&m, 0, sizeof(m));
13 m.m_lc_pm_setuid.uid = usr;
14 return(_syscall(PM_PROC_NR, PM_SETUID, &m));
17 int seteuid(uid_t usr)
19 message m;
21 memset(&m, 0, sizeof(m));
22 m.m_lc_pm_setuid.uid = usr;
23 return(_syscall(PM_PROC_NR, PM_SETEUID, &m));