summaryrefslogtreecommitdiff
path: root/pkg/domain
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2020-07-17 13:58:22 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2020-07-17 20:53:38 +0200
commit65d382dc689805750c71756d9e43d04007ad4fd5 (patch)
treec4cd71f522523cb9f5be4ebcb4b53ead7be74575 /pkg/domain
parentdfca83d37cefdde966c8b770058a9b9fd5f8ed20 (diff)
downloadpodman-65d382dc689805750c71756d9e43d04007ad4fd5.tar.gz
podman-65d382dc689805750c71756d9e43d04007ad4fd5.tar.bz2
podman-65d382dc689805750c71756d9e43d04007ad4fd5.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>
Diffstat (limited to 'pkg/domain')
-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 e4ae6156c..bedd050ff 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