#define PM_SIG_SET m2_sigset /* sigset_t */
#define PM_SIG_CTX m2_p1 /* struct sigcontext * */
-/* Field names for the setuid(2)/seteuid(2) calls. */
-#define PM_SETUID_UID m1_i1 /* uid_t */
-
/* Field names for the setgid(2)/setegid(2) calls. */
#define PM_SETGID_GID m1_i1 /* gid_t */
} mess_lc_pm_reboot;
_ASSERT_MSG_SIZE(mess_lc_pm_reboot);
+typedef struct {
+ uid_t uid;
+
+ uint8_t padding[52];
+} mess_lc_pm_setuid;
+_ASSERT_MSG_SIZE(mess_lc_pm_setuid);
+
typedef struct {
int req;
int field;
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_setuid m_lc_pm_setuid;
mess_lc_pm_sysuname m_lc_pm_sysuname;
mess_lc_pm_time m_lc_pm_time;
mess_lc_pm_waitpid m_lc_pm_waitpid;
message m;
memset(&m, 0, sizeof(m));
- m.PM_SETUID_UID = usr;
+ m.m_lc_pm_setuid.uid = usr;
return(_syscall(PM_PROC_NR, PM_SETUID, &m));
}
message m;
memset(&m, 0, sizeof(m));
- m.PM_SETUID_UID = usr;
+ m.m_lc_pm_setuid.uid = usr;
return(_syscall(PM_PROC_NR, PM_SETEUID, &m));
}
switch(call_nr) {
case PM_SETUID:
case PM_SETEUID:
- uid = (uid_t) m_in.PM_SETUID_UID;
+ uid = m_in.m_lc_pm_setuid.uid;
if (rmp->mp_realuid != uid && rmp->mp_effuid != SUPER_USER)
return(EPERM);
if(call_nr == PM_SETUID) rmp->mp_realuid = uid;