MCPcopy
hub / github.com/hardentools/hardentools / hardenDefaultsAgain

Function hardenDefaultsAgain

gui.go:457–482  ·  view source on GitHub ↗

hardenDefaultsAgain restores the original settings and hardens using the default settings (no custom settings apply).

()

Source from the content-addressed store, hash-verified

455// hardenDefaultsAgain restores the original settings and
456// hardens using the default settings (no custom settings apply).
457func hardenDefaultsAgain() {
458 showEventsTextArea()
459
460 // Use goroutine to allow gui to update window.
461 go func() {
462 // Restore hardened settings.
463 triggerAll(false)
464 restoreSavedRegistryKeys()
465 markStatus(false)
466
467 // Reset expertConfig (is set to currently already hardened settings
468 // in case of restore).
469 expertConfig = make(map[string]bool)
470 for _, hardenSubject := range allHardenSubjects {
471 expertConfig[hardenSubject.Name()] = hardenSubject.HardenByDefault()
472 }
473
474 // Harden all settings.
475 triggerAll(true)
476 markStatus(true)
477 showStatus()
478
479 showEndDialog("Done!\nRisky features have been hardened!\nFor all changes to take effect please restart Windows.")
480 os.Exit(0)
481 }()
482}

Callers

nothing calls this directly

Calls 8

showEventsTextAreaFunction · 0.85
triggerAllFunction · 0.85
restoreSavedRegistryKeysFunction · 0.85
markStatusFunction · 0.85
showEndDialogFunction · 0.85
showStatusFunction · 0.70
NameMethod · 0.65
HardenByDefaultMethod · 0.65

Tested by

no test coverage detected