sort tempfile permissions

utzoo!henry utzoo!henry
Fri May 14 00:19:55 AEST 1982


The sort(1) program carefully makes its first tempfile mode 0600, but
then fopen(...,"w")'s the rest without bothering to make them private.
This is a bit inappropriate when the user may be sorting confidential
data.  The fix is easy;  in sort.c/newfile(), just before "nfiles++;",
add this line:
		chmod(f, 0600);



More information about the Net.bugs.v7 mailing list