Skip to content
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 .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
sudo apt -qy install libseccomp-dev
- uses: golangci/golangci-lint-action@v8
with:
version: v2.4
version: v2.5
# Extra linters, only checking new code from a pull request.
- name: lint-extra
if: github.event_name == 'pull_request'
Expand Down
6 changes: 3 additions & 3 deletions libcontainer/exeseal/cloned_binary_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func getSealableFile(comment, tmpDir string) (file *os.File, sealFn SealFunc, er
// First, try an executable memfd (supported since Linux 3.17).
file, sealFn, err = Memfd(comment)
if err == nil {
return
return file, sealFn, err
}
logrus.Debugf("memfd cloned binary failed, falling back to O_TMPFILE: %v", err)

Expand Down Expand Up @@ -154,7 +154,7 @@ func getSealableFile(comment, tmpDir string) (file *os.File, sealFn SealFunc, er
file.Close()
continue
}
return
return file, sealFn, err
}
logrus.Debugf("O_TMPFILE cloned binary failed, falling back to mktemp(): %v", err)
// Finally, try a classic unlinked temporary file.
Expand All @@ -168,7 +168,7 @@ func getSealableFile(comment, tmpDir string) (file *os.File, sealFn SealFunc, er
file.Close()
continue
}
return
return file, sealFn, err
}
return nil, nil, fmt.Errorf("could not create sealable file for cloned binary: %w", err)
}
Expand Down
2 changes: 1 addition & 1 deletion libcontainer/integration/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ func runContainer(t testing.TB, config *configs.Config, args ...string) (buffers
} else {
return buffers, -1, err
}
return
return buffers, exitCode, err
}

// runContainerOk is a wrapper for runContainer, simplifying its use for cases
Expand Down
2 changes: 1 addition & 1 deletion libcontainer/internal/userns/usernsfd_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (m Mapping) toSys() (uids, gids []syscall.SysProcIDMap) {
Size: int(gid.Size),
})
}
return
return uids, gids
}

// id returns a unique identifier for this mapping, agnostic of the order of
Expand Down
2 changes: 1 addition & 1 deletion libcontainer/mount_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ func syscallMode(i fs.FileMode) (o uint32) {
o |= unix.S_ISVTX
}
// No mapping for Go's ModeTemporary (plan9 only).
return
return o
}

// mountFd creates a "mount source fd" (either through open_tree(2) or just
Expand Down
2 changes: 1 addition & 1 deletion libcontainer/nsenter/nsenter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func newPipe(t *testing.T) (parent *os.File, child *os.File) {
parent.Close()
child.Close()
})
return
return parent, child
}

func reapChildren(t *testing.T, parent *os.File) {
Expand Down
2 changes: 1 addition & 1 deletion libcontainer/rootfs_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ func msMoveRoot(rootfs string) error {
strings.HasPrefix(info.Mountpoint, rootfs) {
skip = true
}
return
return skip, stop
})
if err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions libcontainer/seccomp/patchbpf/enosys_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ func filterFlags(config *configs.Seccomp, filter *libseccomp.ScmpFilter) (flags
}
}

return
return flags, noNewPrivs, err
}

func sysSeccompSetFilter(flags uint, filter []unix.SockFilter) (fd int, err error) {
Expand Down Expand Up @@ -706,7 +706,7 @@ func sysSeccompSetFilter(flags uint, filter []unix.SockFilter) (fd int, err erro
}
runtime.KeepAlive(filter)
runtime.KeepAlive(fprog)
return
return fd, err
}

// PatchAndLoad takes a seccomp configuration and a libseccomp filter which has
Expand Down
2 changes: 1 addition & 1 deletion libcontainer/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,5 @@ func Annotations(labels []string) (bundle string, userAnnotations map[string]str
userAnnotations[name] = value
}
}
return
return bundle, userAnnotations
}