From c673b8284302dedfe8a276cd1e9e1ae8fad15f8d Mon Sep 17 00:00:00 2001 From: deraadt Date: Sat, 3 Jun 2017 23:31:37 +0000 Subject: [PATCH] config -e mode should match our other policies which ensure og-rwx /bsd. pointed out by brynet --- usr.sbin/config/exec_elf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/config/exec_elf.c b/usr.sbin/config/exec_elf.c index d6821392d9d..64c2ac5ad9b 100644 --- a/usr.sbin/config/exec_elf.c +++ b/usr.sbin/config/exec_elf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_elf.c,v 1.14 2015/09/25 03:17:02 guenther Exp $ */ +/* $OpenBSD: exec_elf.c,v 1.15 2017/06/03 23:31:37 deraadt Exp $ */ /* * Copyright (c) 1999 Mats O Jansson. All rights reserved. @@ -140,7 +140,7 @@ savekernel(char *outfile) { int fd; - if ((fd = open(outfile, O_WRONLY | O_CREAT | O_TRUNC, 0755)) < 0) + if ((fd = open(outfile, O_WRONLY | O_CREAT | O_TRUNC, 0700)) < 0) err(1, "%s", outfile); if (write(fd, elf_total, (size_t)elf_size) != elf_size) -- 2.20.1