Message type for PM_GETGID
Change-Id: If3f788b0ad5a7389a62ecec3da78d6d71090f9a8
This commit is contained in:
parent
ba70f58845
commit
b9939b3ed8
4 changed files with 11 additions and 6 deletions
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue