mirror of
https://github.com/containers/podman.git
synced 2025-11-04 00:50:15 +08:00
Add --accept-repositories integration tests
This adds the integration tests for the repository or namespaced registry feature introduced in c/common. Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
This commit is contained in:
11
vendor/github.com/containers/common/pkg/config/config.go
generated
vendored
11
vendor/github.com/containers/common/pkg/config/config.go
generated
vendored
@ -637,9 +637,14 @@ func (c *Config) CheckCgroupsAndAdjustConfig() {
|
||||
|
||||
session := os.Getenv("DBUS_SESSION_BUS_ADDRESS")
|
||||
hasSession := session != ""
|
||||
if hasSession && strings.HasPrefix(session, "unix:path=") {
|
||||
_, err := os.Stat(strings.TrimPrefix(session, "unix:path="))
|
||||
hasSession = err == nil
|
||||
if hasSession {
|
||||
for _, part := range strings.Split(session, ",") {
|
||||
if strings.HasPrefix(part, "unix:path=") {
|
||||
_, err := os.Stat(strings.TrimPrefix(part, "unix:path="))
|
||||
hasSession = err == nil
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if !hasSession && unshare.GetRootlessUID() != 0 {
|
||||
|
||||
Reference in New Issue
Block a user