execCertutil will execute a "certutil" command and if needed re-execute the command with commandWithSudo to work around file permissions.
(path string, arg ...string)
| 382 | // execCertutil will execute a "certutil" command and if needed re-execute |
| 383 | // the command with commandWithSudo to work around file permissions. |
| 384 | func (s *NSS) execCertutil(path string, arg ...string) ([]byte, error) { |
| 385 | out, err := s.SysFS.Exec(s.SysFS.Command(path, arg...)) |
| 386 | if err != nil && bytes.Contains(out, []byte(certUtilSecReadOnlyOutput)) && runtime.GOOS != "windows" { |
| 387 | out, err = s.SysFS.SudoExec(s.SysFS.Command(path, arg...)) |
| 388 | } |
| 389 | return out, err |
| 390 | } |
| 391 | |
| 392 | func (s *NSS) forEachNSSProfile(f func(profile string) error) (found int, err error) { |
| 393 | var profiles []string |
no test coverage detected