The big Anavrins security update (round 1)

This commit is contained in:
kepler155c@gmail.com
2019-06-27 21:08:46 -04:00
parent 97a442e999
commit bcd33af599
17 changed files with 2308 additions and 204 deletions

View File

@@ -1,11 +1,45 @@
local Config = require('config')
local Util = require('util')
local shell = _ENV.shell
local fs = _G.fs
local shell = _ENV.shell
local config = Config.load('os')
if not config.welcomed and shell.openForegroundTab then
config.welcomed = true
config.securityUpdate = true
config.readNotes = 1
Config.update('os', config)
shell.openForegroundTab('Welcome')
end
if not config.securityUpdate then
config.securityUpdate = true
config.secretKey = nil
config.password = nil
config.readNotes = 1
Config.update('os', config)
fs.delete('usr/.known_hosts')
Util.writeFile('sys/notes_1.txt', [[
An important security update has been applied.
Unfortunately, this update has reset the
password on the system. You can set a new
password in System->System->Password.
All computers that you connect to will also
need to be updated as well.
Thanks for your patience. And... thanks to
Anavrins for the much improved security.
]])
end
if fs.exists('sys/notes_1.txt') and shell.openForegroundTab then
shell.openForegroundTab('edit sys/notes_1.txt')
os.sleep(2)
fs.delete('sys/notes_1.txt')
end