summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/abi/system.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2020-07-17 13:58:22 +0200
committerMatthew Heon <matthew.heon@pm.me>2020-07-22 14:05:20 -0400
commite21a6368f9308292641ed5ce58321b1cd46abdc9 (patch)
tree3965dc2cfc5cea33cb04b10cf528f7570f3b38f5 /pkg/domain/infra/abi/system.go
parent92186cbd28df57bda027c90eb3715c8a636c1037 (diff)
downloadpodman-e21a6368f9308292641ed5ce58321b1cd46abdc9.tar.gz
podman-e21a6368f9308292641ed5ce58321b1cd46abdc9.tar.bz2
podman-e21a6368f9308292641ed5ce58321b1cd46abdc9.zip
abi: set default umask and rlimits
the code got lost in the migration to podman 2.0, reintroduce it. Closes: https://github.com/containers/podman/issues/6989 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com> <MH: Fixed build> Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'pkg/domain/infra/abi/system.go')
-rw-r--r--pkg/domain/infra/abi/system.go22
1 files changed, 0 insertions, 22 deletions
diff --git a/pkg/domain/infra/abi/system.go b/pkg/domain/infra/abi/system.go
index be14f52b8..435902ded 100644
--- a/pkg/domain/infra/abi/system.go
+++ b/pkg/domain/infra/abi/system.go
@@ -8,7 +8,6 @@ import (
"os/exec"
"path/filepath"
"strconv"
- "syscall"
"github.com/containers/common/pkg/config"
"github.com/containers/libpod/v2/libpod/define"
@@ -146,27 +145,6 @@ func movePauseProcessToScope() error {
return utils.RunUnderSystemdScope(int(pid), "user.slice", "podman-pause.scope")
}
-func setRLimits() error { // nolint:deadcode,unused
- rlimits := new(syscall.Rlimit)
- rlimits.Cur = 1048576
- rlimits.Max = 1048576
- if err := syscall.Setrlimit(syscall.RLIMIT_NOFILE, rlimits); err != nil {
- if err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, rlimits); err != nil {
- return errors.Wrapf(err, "error getting rlimits")
- }
- rlimits.Cur = rlimits.Max
- if err := syscall.Setrlimit(syscall.RLIMIT_NOFILE, rlimits); err != nil {
- return errors.Wrapf(err, "error setting new rlimits")
- }
- }
- return nil
-}
-
-func setUMask() { // nolint:deadcode,unused
- // Be sure we can create directories with 0755 mode.
- syscall.Umask(0022)
-}
-
// checkInput can be used to verify any of the globalopt values
func checkInput() error { // nolint:deadcode,unused
return nil