diff --git a/pkg/exploits/cve20220847/exploit.go b/pkg/exploits/cve20220847/exploit.go index 2463805d..b587caa8 100644 --- a/pkg/exploits/cve20220847/exploit.go +++ b/pkg/exploits/cve20220847/exploit.go @@ -112,7 +112,7 @@ func (v *cve20220847Exploit) Exploit(ctx context.Context, s *state.State, log lo found = true if parts[3] != "" { users := strings.Split(parts[3], ",") - var canAdd bool + canAdd := true for _, existing := range users { if existing == u.Username { log.Printf("NOTE: Your user is already in the %s group - you can likely sudo already...", parts[0])