|
From: Mark M. <Mar...@ij...> - 2004-04-14 19:28:18
|
Adam,
>shouldn't this be:
> (StatBuf.st_mode & ~(S_IRWXU|S_IRGRP|S_IXGRP)) )
Actually, it is still wrong. There are other bits there
besides the mode. I should have tried it before posting.
| >The umask should have take cane of this, or perhaps:
| > if ((priv->mlfi_fp = fopen(priv->mlfi_fname, "w+",
| > S_IRUSR|S_IWUSR|S_IRGRP)) == NULL) {
| Hmmm, not sure what you mean here. fopen(3) doesn't take a mode_t
| argument so this won't compile as is.
Silly me. My mind is still on Perl.
| With respect to the umask, i set the mode with fchmod(2) because
| amavis-milter generally seems to like to control permissions explicitly
| throughout rather than relying on umask so I stuck with that.
Ok.
Check this please:
http://www.ijs.si/software/amavisd/amavis-milter.c
Mark
|