summaryrefslogtreecommitdiff
path: root/sys/arch/i386/stand/boot/conf.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2019-08-03 15:22:22 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2019-08-03 15:22:22 +0000
commit2c7c7e7056c013722aab8f2972f87904c9605b1a (patch)
tree3ebbbfd1882c0beee6b78ba5c17c06952511110c /sys/arch/i386/stand/boot/conf.c
parent609f17c4c92366068b20c4cedc30b030b38fce98 (diff)
In the bootblocks, after discovering and opening /bsd.upgrade, fchmod -x
so the file cannot be re-executed upon the next boot. This provides a stronger one-shot-upgrade model than the upgrade script's rm /bsd.upgrade. Now various forms of upgrade failure will reboot into /bsd, which is probably more recoverable. Performing fchmod -x depends on (1) use of MI boot.c (not alpha/macppc/sparc64/sgi/octeon) and (2) "can write blocks" functionality in the IO layer. Most architectures have this support now. Two diagnostics "fchmod a-x %s: failed" and "/bsd.upgrade is not u+x" will remain in the tree while refinements happen for some of the laggard architectures. based upon a discussion florian tested in snapshots for more than a week without any complaints
Diffstat (limited to 'sys/arch/i386/stand/boot/conf.c')
-rw-r--r--sys/arch/i386/stand/boot/conf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/i386/stand/boot/conf.c b/sys/arch/i386/stand/boot/conf.c
index 0e6cccc3741..37a8f006347 100644
--- a/sys/arch/i386/stand/boot/conf.c
+++ b/sys/arch/i386/stand/boot/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.69 2019/06/08 02:52:20 jsg Exp $ */
+/* $OpenBSD: conf.c,v 1.70 2019/08/03 15:22:20 deraadt Exp $ */
/*
* Copyright (c) 1996 Michael Shalayeff
@@ -65,7 +65,7 @@ int nibprobes = nitems(probe_list);
struct fs_ops file_system[] = {
{ ufs_open, ufs_close, ufs_read, ufs_write, ufs_seek,
- ufs_stat, ufs_readdir },
+ ufs_stat, ufs_readdir, ufs_fchmod },
#ifdef notdef
{ fat_open, fat_close, fat_read, fat_write, fat_seek,
fat_stat, fat_readdir },