Skip to content

Commit

Permalink
cmd: do not require userns for "version"
Browse files Browse the repository at this point in the history
Closes: containers#17657

[NO NEW TESTS NEEDED]

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
  • Loading branch information
giuseppe committed Mar 3, 2023
1 parent 2860d55 commit 0498ce3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/podman/system/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ var (
Short: "Display the Podman version information",
RunE: version,
ValidArgsFunction: completion.AutocompleteNone,
Annotations: map[string]string{
registry.ParentNSRequired: "",
},
}
versionFormat string
)
Expand Down
1 change: 1 addition & 0 deletions pkg/rootless/rootless_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ can_use_shortcut (char **argv)

if (strcmp (argv[argc], "mount") == 0
|| strcmp (argv[argc], "machine") == 0
|| strcmp (argv[argc], "version") == 0
|| strcmp (argv[argc], "context") == 0
|| strcmp (argv[argc], "search") == 0
|| (strcmp (argv[argc], "system") == 0 && argv[argc+1] && strcmp (argv[argc+1], "service") != 0))
Expand Down

0 comments on commit 0498ce3

Please sign in to comment.