Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable linter in TravisCI #481

Merged
merged 5 commits into from
Nov 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ before_script:
- ci_scripts/create-ip-aliases.sh

script:
# - make lint TODO(evanlinjin): Temporary due to https://github.com/golangci/golangci-lint/issues/827
- make lint # TODO(evanlinjin): Temporary due to https://github.com/golangci/golangci-lint/issues/827
- make test
- make test-no-ci
- make install-deps-ui
Expand Down
8 changes: 4 additions & 4 deletions internal/vpn/os_client_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ func setupClientSysPrivileges() (suid int, err error) {

// set `CAP_NET_ADMIN` capability to needed caps sets.
caps.Set(capability.CAPS|capability.BOUNDS|capability.AMBIENT, capability.CAP_NET_ADMIN)
if err := caps.Apply(capability.CAPS | capability.BOUNDS | capability.AMBIENT); err != nil {
err = fmt.Errorf("failed to apply capabilties: %w", err)
if e := caps.Apply(capability.CAPS | capability.BOUNDS | capability.AMBIENT); e != nil {
err = fmt.Errorf("failed to apply capabilties: %w", e)
return
}

// let child process keep caps sets from the parent, so we may do calls to
// system utilities with these caps.
if err := unix.Prctl(unix.PR_SET_KEEPCAPS, 1, 0, 0, 0); err != nil {
err = fmt.Errorf("failed to set PR_SET_KEEPCAPS: %w", err)
if e := unix.Prctl(unix.PR_SET_KEEPCAPS, 1, 0, 0, 0); e != nil {
err = fmt.Errorf("failed to set PR_SET_KEEPCAPS: %w", e)
return
}
})
Expand Down