Commit Graph

4 Commits

Author SHA1 Message Date
Giuseppe Scrivano 758b4e2730 unshare: add getenv from cgo
if CGO is enabled, make sure to use C.getenv instead of os.Getenv to
read environment variables.  It is required since rootless libpod
joins the user namespace through Cgo.

The variables set via C.setenv are not visible through os.Getenv, as
the latter uses sync.Once to read the variables once.

Requires: https://github.com/containers/libpod/pull/4911

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-01-20 15:53:55 +01:00
Qi Wang 894913abdf add libpod.conf to containers.conf
Add configurations from libpod.conf to containers.conf.Use merge code from libpod to read and merge configurations from file.

Add unshare_linux for build linux: HomeDir should buildah not only for linux. so add unshare_linux for linux and unshare.go for other

convert bool to optinalbool:Use OptionalBool for on-disk configurations so we can distinguish field is undefined  vs. user set to false.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-12-06 15:55:47 -05:00
Valentin Rothberg 66d9591d6f unshare.HomeDir: get home dir of current user
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-11-22 11:18:27 +01:00
Qi Wang 676d4298d3 move pkg/unshare from buildah
move the buildah/pkg/unshare into containers/common

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-10-10 22:35:31 -04:00