servers/pm: Fix EFAULT check for SETGROUPS
The previous test would return EFAULT as soon as the group pointer was NULL, while it is sensible when the count is also 0. In that case, the SETGROUP syscall is expected to clear all the group entries as the new set is empty. Change-Id: I07b7e1d1f023a52e3035d53f7d9b42b660e039e8
This commit is contained in:
parent
61f6e2f5f0
commit
f0d23d912d
1 changed files with 1 additions and 1 deletions
|
@ -141,7 +141,7 @@ int do_set()
|
|||
if (ngroups > NGROUPS_MAX || ngroups < 0)
|
||||
return(EINVAL);
|
||||
|
||||
if (m_in.groupsp == NULL)
|
||||
if (m_in.grp_no > 0 && m_in.groupsp == NULL)
|
||||
return(EFAULT);
|
||||
|
||||
r = sys_datacopy(who_e, (vir_bytes) m_in.groupsp, SELF,
|
||||
|
|
Loading…
Reference in a new issue