]> git.ipfire.org Git - thirdparty/coreutils.git/commit
nohup: avoid FORTIFY runtime failure on Bionic libc
authorPádraig Brady <P@draigBrady.com>
Tue, 9 Sep 2025 11:11:00 +0000 (12:11 +0100)
committerPádraig Brady <P@draigBrady.com>
Tue, 9 Sep 2025 11:21:41 +0000 (12:21 +0100)
commit2ed207cb1fe7ae51ffc1c987ef1c7848f2b56358
treec6529be35b67bfd3cb851379992f8ae21bd1fdda
parentd9b68362edcb509ecb00cf900617f55574212a96
nohup: avoid FORTIFY runtime failure on Bionic libc

The meaning of non-file permission umask bits is implementation defined.
On Bionic libc, attempting to set them triggers a FORTIFY runtime check.

  $ nohup true
  FORTIFY: umask: called with invalid mask -601
  Aborted                    nohup true

* src/nohup.c: (main) Avoid setting non-permission bits in umask.
Just clear the umask to ensure we create nohup.out with u+rw,
as we restore the original umask before the exec().
* tests/misc/nohup.sh: Add a test case.
* NEWS: Mention the bug fix.
NEWS
src/nohup.c
tests/misc/nohup.sh