diff --git a/cmds/portmaster-start/lock.go b/cmds/portmaster-start/lock.go index 07fe0988..9635744d 100644 --- a/cmds/portmaster-start/lock.go +++ b/cmds/portmaster-start/lock.go @@ -85,6 +85,7 @@ func createInstanceLock(lockFilePath string) error { } // create lock file + // TODO: Investigate required permissions. err = ioutil.WriteFile(lockFilePath, []byte(fmt.Sprintf("%d", os.Getpid())), 0666) //nolint:gosec if err != nil { return err diff --git a/cmds/portmaster-start/logs.go b/cmds/portmaster-start/logs.go index c982febb..34f00867 100644 --- a/cmds/portmaster-start/logs.go +++ b/cmds/portmaster-start/logs.go @@ -96,7 +96,7 @@ func getPmStartLogFile(ext string) *os.File { }, info.Version(), ext) } -//nolint:unused // false positive on linux, currently used by windows only +//nolint:unused // false positive on linux, currently used by windows only. TODO: move to a _windows file. func logControlError(cErr error) { // check if error present if cErr == nil { @@ -112,7 +112,7 @@ func logControlError(cErr error) { fmt.Fprintln(errorFile, cErr.Error()) } -//nolint:deadcode,unused // false positive on linux, currently used by windows only +//nolint:deadcode,unused // false positive on linux, currently used by windows only. TODO: move to a _windows file. func runAndLogControlError(wrappedFunc func(cmd *cobra.Command, args []string) error) func(cmd *cobra.Command, args []string) error { return func(cmd *cobra.Command, args []string) error { err := wrappedFunc(cmd, args)