aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman/main.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-05-01 16:20:41 +0200
committerGitHub <noreply@github.com>2019-05-01 16:20:41 +0200
commitad68036a88e35dc3c7a19962b8e21867b459f8f1 (patch)
treeb3854bdbf0971e58b85bdd039ea447ef6390d933 /cmd/podman/main.go
parenteea77b5ae3e7fb8a60d438a79d3a4b30d35bb67c (diff)
parent0b6bb6a3d3c3c15b9c6629a6949a616a30b0478a (diff)
downloadpodman-ad68036a88e35dc3c7a19962b8e21867b459f8f1.tar.gz
podman-ad68036a88e35dc3c7a19962b8e21867b459f8f1.tar.bz2
podman-ad68036a88e35dc3c7a19962b8e21867b459f8f1.zip
Merge pull request #3031 from baude/remotewindows
enable podman-remote on windows
Diffstat (limited to 'cmd/podman/main.go')
-rw-r--r--cmd/podman/main.go20
1 files changed, 3 insertions, 17 deletions
diff --git a/cmd/podman/main.go b/cmd/podman/main.go
index a0f1cf401..f501ee674 100644
--- a/cmd/podman/main.go
+++ b/cmd/podman/main.go
@@ -4,7 +4,6 @@ import (
"context"
"io"
"os"
- "syscall"
"github.com/containers/libpod/cmd/podman/cliconfig"
"github.com/containers/libpod/libpod"
@@ -13,7 +12,6 @@ import (
"github.com/containers/libpod/version"
"github.com/containers/storage/pkg/reexec"
"github.com/opentracing/opentracing-go"
- "github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
@@ -118,25 +116,13 @@ func before(cmd *cobra.Command, args []string) error {
}
logrus.SetLevel(level)
- 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")
- }
+ if err := setRLimits(); err != nil {
+ return err
}
-
if rootless.IsRootless() {
logrus.Info("running as rootless")
}
-
- // Be sure we can create directories with 0755 mode.
- syscall.Umask(0022)
+ setUMask()
return profileOn(cmd)
}