Improve docs and logs

This commit is contained in:
Daniel
2021-05-13 22:15:50 +02:00
parent f930734742
commit 5e5992be3b
2 changed files with 5 additions and 5 deletions

View File

@@ -67,7 +67,7 @@ func downloadUpdates() error {
}
}
// add updates that we require on all helper.PlatformIdentifiers.
// add updates that we require on all platforms.
registry.MandatoryUpdates = append(
registry.MandatoryUpdates,
helper.PlatformIdentifier("app/portmaster-app.zip"),

View File

@@ -18,14 +18,14 @@ var pmElectronUpdate *updater.File
// by our app-electron package has the SUID bit set on systems that do not
// allow unprivileged CLONE_NEWUSER (clone(3)).
// On non-linux systems or systems that have kernel.unprivileged_userns_clone
// set to 1 EnsureChromeSandboPermissions is a NO-OP
// set to 1 EnsureChromeSandboPermissions is a NO-OP.
func EnsureChromeSandboxPermissions(reg *updater.ResourceRegistry) error {
if runtime.GOOS != "linux" {
return nil
}
if checkSysctl("kernel.unprivileged_userns_clone", '1') {
log.Infof("Kernel support for unprivileged USERNS_CLONE enabled.")
log.Debug("updates: kernel support for unprivileged USERNS_CLONE is enabled")
return nil
}
@@ -34,7 +34,7 @@ func EnsureChromeSandboxPermissions(reg *updater.ResourceRegistry) error {
}
identifier := PlatformIdentifier("app/portmaster-app.zip")
log.Infof("Kernel support for unprivileged USERNS_CLONE disabled.")
log.Debug("updates: kernel support for unprivileged USERNS_CLONE disabled")
var err error
pmElectronUpdate, err = reg.GetFile(identifier)
@@ -49,7 +49,7 @@ func EnsureChromeSandboxPermissions(reg *updater.ResourceRegistry) error {
if err := os.Chmod(sandboxFile, 0755|os.ModeSetuid); err != nil {
return err
}
log.Infof("Fixed SUID permissions for chrome-sandbox")
log.Infof("updates: fixed SUID permission for chrome-sandbox")
return nil
}