From: Lionel Sambuc Date: Tue, 13 May 2014 12:47:11 +0000 (+0200) Subject: Message type for PM_GETGID X-Git-Tag: v3.3.0~283 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/Bv9ARM.ch11.html?a=commitdiff_plain;h=b9939b3ed8d9e9d4618867fc5c76a67af9a03ba8;p=minix.git Message type for PM_GETGID Change-Id: If3f788b0ad5a7389a62ecec3da78d6d71090f9a8 --- diff --git a/include/minix/callnr.h b/include/minix/callnr.h index 813d9d03f..9646a8e9b 100644 --- a/include/minix/callnr.h +++ b/include/minix/callnr.h @@ -85,9 +85,6 @@ #define PM_SIG_SET m2_sigset /* sigset_t */ #define PM_SIG_CTX m2_p1 /* struct sigcontext * */ -/* Field names for the getgid(2) call. */ -#define PM_GETGID_EGID m1_i1 /* gid_t */ - /* Field names for the setuid(2)/seteuid(2) calls. */ #define PM_SETUID_UID m1_i1 /* uid_t */ diff --git a/include/minix/ipc.h b/include/minix/ipc.h index 721c3818d..9aebc8442 100644 --- a/include/minix/ipc.h +++ b/include/minix/ipc.h @@ -554,6 +554,13 @@ typedef struct { } mess_lsys_vfs_mapdriver; _ASSERT_MSG_SIZE(mess_lsys_vfs_mapdriver); +typedef struct { + uid_t egid; + + uint8_t padding[52]; +} mess_pm_lc_getgid; +_ASSERT_MSG_SIZE(mess_pm_lc_getgid); + typedef struct { uid_t euid; @@ -1068,6 +1075,7 @@ typedef struct { mess_pm_lexec_exec_new m_pm_lexec_exec_new; + mess_pm_lc_getgid m_pm_lc_getgid; mess_pm_lc_getuid m_pm_lc_getuid; mess_pm_lc_ptrace m_pm_lc_ptrace; mess_pm_lc_time m_pm_lc_time; diff --git a/lib/libc/sys-minix/getegid.c b/lib/libc/sys-minix/getegid.c index 9aa368f85..190f79556 100644 --- a/lib/libc/sys-minix/getegid.c +++ b/lib/libc/sys-minix/getegid.c @@ -15,6 +15,6 @@ gid_t getegid(void) * are not always successful and Minix returns the unreserved value * (gid_t) -1 when there is an error. */ - if (_syscall(PM_PROC_NR, PM_GETGID, &m) < 0) return ( (gid_t) -1); - return( (gid_t) m.PM_GETGID_EGID); + if (_syscall(PM_PROC_NR, PM_GETGID, &m) < 0) return(-1); + return(m.m_pm_lc_getgid.egid); } diff --git a/servers/pm/getset.c b/servers/pm/getset.c index a6c38c139..6a0f09426 100644 --- a/servers/pm/getset.c +++ b/servers/pm/getset.c @@ -54,7 +54,7 @@ int do_get() case PM_GETGID: r = rmp->mp_realgid; - rmp->mp_reply.PM_GETGID_EGID = rmp->mp_effgid; + rmp->mp_reply.m_pm_lc_getgid.egid = rmp->mp_effgid; break; case PM_GETPID: