#define PM_SIG_SET m2_sigset /* sigset_t */
#define PM_SIG_CTX m2_p1 /* struct sigcontext * */
-/* Field names for the setgid(2)/setegid(2) calls. */
-#define PM_SETGID_GID m1_i1 /* gid_t */
-
/* Field names for the getppid(2) call. */
#define PM_GETPID_PARENT m2_i1 /* pid_t */
} mess_lc_pm_reboot;
_ASSERT_MSG_SIZE(mess_lc_pm_reboot);
+typedef struct {
+ gid_t gid;
+
+ uint8_t padding[52];
+} mess_lc_pm_setgid;
+_ASSERT_MSG_SIZE(mess_lc_pm_setgid);
+
typedef struct {
uid_t uid;
mess_lc_pm_priority m_lc_pm_priority;
mess_lc_pm_ptrace m_lc_pm_ptrace;
mess_lc_pm_reboot m_lc_pm_reboot;
+ mess_lc_pm_setgid m_lc_pm_setgid;
mess_lc_pm_setuid m_lc_pm_setuid;
mess_lc_pm_sysuname m_lc_pm_sysuname;
mess_lc_pm_time m_lc_pm_time;
message m;
memset(&m, 0, sizeof(m));
- m.PM_SETGID_GID = (int) grp;
+ m.m_lc_pm_setgid.gid = grp;
return(_syscall(PM_PROC_NR, PM_SETGID, &m));
}
message m;
memset(&m, 0, sizeof(m));
- m.PM_SETGID_GID = (int) grp;
+ m.m_lc_pm_setgid.gid = grp;
return(_syscall(PM_PROC_NR, PM_SETEGID, &m));
}
case PM_SETGID:
case PM_SETEGID:
- gid = (gid_t) m_in.PM_SETGID_GID;
+ gid = m_in.m_lc_pm_setgid.gid;
if (rmp->mp_realgid != gid && rmp->mp_effuid != SUPER_USER)
return(EPERM);
if(call_nr == PM_SETGID) rmp->mp_realgid = gid;