svn commit: r350116 - head/lib/libc/gen

Brooks Davis brooks at freebsd.org
Thu Jul 18 21:41:18 UTC 2019


On Thu, Jul 18, 2019 at 09:33:56PM +0000, Brooks Davis wrote:
> Author: brooks
> Date: Thu Jul 18 21:33:55 2019
> New Revision: 350116
> URL: https://svnweb.freebsd.org/changeset/base/350116
> 
> Log:
>   Document that setmode(3) is not thread safe.
>   
>   In some circumstances, setmode(3) may call umask(2) twice to retrieve
>   the current mode and then restore it.  Between calls, the process will
>   have a umask of 0.

This race isn't especially serious, since it only occurs when
security.bsd.unprivileged_proc_debug=0, but it's probably something to
fix.  The easiest solution would probably be to implement a getumask()
syscall.

-- Brooks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20190718/6cc6f8ab/attachment.sig>


More information about the svn-src-head mailing list