Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Oct 1998 15:36:22 -0700 (PDT)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        Warner Losh <imp@village.org>
Cc:        Bruce Evans <bde@zeta.org.au>, peter@netplex.com.au, cvs-all@FreeBSD.ORG, cvs-committers@FreeBSD.ORG
Subject:   Re: cvs commit: src/lib/libc/stdio mktemp.c 
Message-ID:  <199810202236.PAA29307@apollo.backplane.com>
References:  <199810201912.MAA28626@apollo.backplane.com>  <199810201628.CAA15294@godzilla.zeta.org.au>  <199810202134.PAA28899@harmony.village.org>

next in thread | previous in thread | raw e-mail | index | archive | help

    And here's another reason why we have to be careful... calling umask() in
    stdio at all is dangerous.

    What happens when a signal handler comes along in the middle of a library
    call that has temporarily changed the umask?

    BEWM.  Security hole that nobody notices.

    This is why code such as /usr/src/lib/libc/gen/setmode.c blocks signals
    while it is messing with the umask.

						-Matt

    Matthew Dillon  Engineering, HiWay Technologies, Inc. & BEST Internet 
                    Communications & God knows what else.
    <dillon@backplane.com> (Please include original email in any response)    

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199810202236.PAA29307>