file to the new output file. In preparation for pledge(2).
Suggested by and OK millert@
-/* $OpenBSD: sort.c,v 1.80 2015/10/13 16:21:42 tim Exp $ */
+/* $OpenBSD: sort.c,v 1.81 2015/10/13 16:55:03 tim Exp $ */
/*-
* Copyright (C) 2009 Gabor Kovesdan <gabor@FreeBSD.org>
sort_asprintf(&outfile, "%s.XXXXXXXXXX",
real_outfile);
if ((fd = mkstemp(outfile)) == -1 ||
- fchmod(fd, sb.st_mode & ALLPERMS) == -1)
+ fchmod(fd, sb.st_mode & ACCESSPERMS) == -1)
err(2, "%s", outfile);
close(fd);
tmp_file_atexit(outfile);