sort creates readable files in /usr/tmp

Alan Lee Wendt wendt at arizona.edu
Tue Nov 8 19:38:46 AEST 1988


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.  If you have a binary-only system, change
your umask before sorting.

Alan W.



More information about the Comp.bugs.4bsd.ucb-fixes mailing list