mirror of
https://github.com/containers/podman.git
synced 2025-06-20 17:13:43 +08:00
Fix bug where podman mount
didn't error as rootless
We require that rootless `podman mount` be run inside a shell spawned by `podman unshare` (which gives us a mount namespace which actually lets other commands use the mounted filesystem). The fix is simple - we need to mark the command as requiring the rootless user namespace not be configured, so we can test for it later as part of the mount code and error if we needed to make one. Fixes #6856 Signed-off-by: Matthew Heon <matthew.heon@pm.me>
This commit is contained in:
@ -30,13 +30,18 @@ var (
|
||||
Args: func(cmd *cobra.Command, args []string) error {
|
||||
return validate.CheckAllLatestAndCIDFile(cmd, args, true, false)
|
||||
},
|
||||
Annotations: map[string]string{
|
||||
registry.ParentNSRequired: "",
|
||||
},
|
||||
}
|
||||
|
||||
containerMountCommmand = &cobra.Command{
|
||||
Use: mountCommand.Use,
|
||||
Short: mountCommand.Short,
|
||||
Long: mountCommand.Long,
|
||||
RunE: mountCommand.RunE,
|
||||
Use: mountCommand.Use,
|
||||
Short: mountCommand.Short,
|
||||
Long: mountCommand.Long,
|
||||
RunE: mountCommand.RunE,
|
||||
Args: mountCommand.Args,
|
||||
Annotations: mountCommand.Annotations,
|
||||
}
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user