Συντάκτης: Wakko Warner Ημερομηνία: Προς: exim-dev Αντικείμενο: Re: [exim-dev] fopen(), umask, and file permissions
Philip Hazel wrote: > On Wed, 22 Feb 2006, Wakko Warner wrote:
>
> > You're creating a file with mode 777 and later chmodding it.
>
> No, I'm creating it with mode 000.
Yes, sorry, I have not dealt with umask in some time.
> > I don't know the code that uses fopen, but it could also be possible that a
> > file that already exsists with a specific mode gets it's mode clobbered.
>
> These files should not exist - they are all "working files" used by the
> content scanning code. Anyway, whether they exist or not, they should
> all have the mode that is being set for them.
Agreed, but I was thinking of a generic case.
> > One could use open(2) then fdopen(3), but again, I don't know the code well
> > enough to know for sure.
>
> That is another possibility, but it would involve decoding the second
> argument of "fopen", and I'm not sure it is worth it.
I'm not fully familiar with the sematics of fopen (I personally dislike fopen &c)
--
Lab tests show that use of micro$oft causes cancer in lab animals
Got Gas???