Xref: utzoo comp.bugs.4bsd:1072 news.sysadmin:1218 Newsgroups: comp.bugs.4bsd,news.sysadmin Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: sort creates readable files in /usr/tmp Message-ID: <1988Nov9.195957.5778@utzoo.uucp> Organization: U of Toronto Zoology References: <7739@megaron.arizona.edu> Date: Wed, 9 Nov 88 19:59:57 GMT In article <7739@megaron.arizona.edu> wendt@arizona.edu (Alan Lee Wendt) writes: >Apropos of security, Berkeley sort creates readable temp files >in /usr/tmp, due to non-intuitive behavior in fopen, which >when it creates new files always does it with 0666 permissions. >The fix is to do the creat manually in the newfile() routine >before calling fopen... A cleaner and possibly somewhat more portable fix is to change umask for the fopen call, saving and restoring it if necessary. -- The Earth is our mother. | Henry Spencer at U of Toronto Zoology Our nine months are up. |uunet!attcan!utzoo!henry henry@zoo.toronto.edu