Skip to content

Commit

Permalink
Merge pull request #481 from nkryuchkov/fix/enable-linter
Browse files Browse the repository at this point in the history
Enable linter in TravisCI
  • Loading branch information
nkryuchkov authored Nov 4, 2020
2 parents a21dd15 + b85cc8e commit 13dda11
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
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

0 comments on commit 13dda11

Please sign in to comment.