Re: [exim-dev] fopen(), umask, and file permissions

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Nigel Metheringham
Ημερομηνία:  
Προς: Wakko Warner
Υ/ο: exim-dev
Αντικείμενο: Re: [exim-dev] fopen(), umask, and file permissions
Wakko Warner wrote:
> Is it possible this could be a slight security concern?
>
> You're creating a file with mode 777 and later chmodding it.
>

Not mode. umask - ie almost entirely the opposite!

I don't like the way the function has a global side effect, (changing
umask) although in this context I guess its OK.

Maybe a reimplementation of fopen based on open and fdopen? For that
matter it seems rather likely that theres a BSD implementation of fopen
with file mode.

    Nigel.