]> git.ipfire.org Git - thirdparty/shadow.git/commit
newgrp/useradd: always set SIGCHLD to default
authorSamanta Navarro <ferivoz@riseup.net>
Wed, 26 Apr 2023 11:59:51 +0000 (11:59 +0000)
committerSerge Hallyn <serge@hallyn.com>
Wed, 26 Apr 2023 13:27:45 +0000 (08:27 -0500)
commit7b686d8bd63e45bf2d20438452af58b7908c619f
tree51bbcd788c45053c1948aaecc3549d840ca267cd
parent7ed1df2e8061e296366ce77a7363ab09c4e73566
newgrp/useradd: always set SIGCHLD to default

The tools newgrp and useradd expect waitpid to behave as described in
its manual page. But the notes indicate that if SIGCHLD is ignored,
waitpid behaves differently.

A user could set SIGCHLD to ignore before starting newgrp through exec.
Children of newgrp would not become zombies and their PIDs could be
reassigned before newgrp could call kill with the child pid and SIGCONT.

The useradd tool is not installed setuid, but I have added the default
there as well (copied from vipw).

Signed-off-by: Samanta Navarro <ferivoz@riseup.net>
src/newgrp.c
src/useradd.c