mirror of
https://github.com/containers/podman.git
synced 2025-09-13 10:46:03 +08:00
Fix handling of overridden paths from database
If the first time you run podman in a user account you do a su - USER, and the second time, you run as the logged in USER podman fails, because it is not handling the tmpdir definition in the database. This PR fixes this problem. vendor containers/common v0.11.1 This should fix a couple of issues we have seen in podman 1.9.1 with handling of libpod.conf. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
11
vendor/github.com/containers/common/pkg/auth/cli.go
generated
vendored
11
vendor/github.com/containers/common/pkg/auth/cli.go
generated
vendored
@ -7,16 +7,19 @@ import (
|
||||
)
|
||||
|
||||
// LoginOptions represents common flags in login
|
||||
// caller should define bool or optionalBool fields for flags --get-login and --tls-verify
|
||||
// In addition, the caller should probably provide a --tls-verify flag (that affects the provided
|
||||
// *types.SystemContest)
|
||||
type LoginOptions struct {
|
||||
// CLI flags managed by the FlagSet returned by GetLoginFlags
|
||||
// Callers that use GetLoginFlags should not need to touch these values at all; callers that use
|
||||
// other CLI frameworks should set them based on user input.
|
||||
AuthFile string
|
||||
CertDir string
|
||||
Password string
|
||||
Username string
|
||||
StdinPassword bool
|
||||
GetLoginSet bool
|
||||
// Options caller can set
|
||||
GetLoginSet bool // set to true if --get-login is explicitly set
|
||||
Stdin io.Reader // set to os.Stdin
|
||||
Stdout io.Writer // set to os.Stdout
|
||||
AcceptUnspecifiedRegistry bool // set to true if allows login with unspecified registry
|
||||
@ -25,10 +28,11 @@ type LoginOptions struct {
|
||||
// LogoutOptions represents the results for flags in logout
|
||||
type LogoutOptions struct {
|
||||
// CLI flags managed by the FlagSet returned by GetLogoutFlags
|
||||
// Callers that use GetLogoutFlags should not need to touch these values at all; callers that use
|
||||
// other CLI frameworks should set them based on user input.
|
||||
AuthFile string
|
||||
All bool
|
||||
// Options caller can set
|
||||
Stdin io.Reader // set to os.Stdin
|
||||
Stdout io.Writer // set to os.Stdout
|
||||
AcceptUnspecifiedRegistry bool // set to true if allows logout with unspecified registry
|
||||
}
|
||||
@ -41,6 +45,7 @@ func GetLoginFlags(flags *LoginOptions) *pflag.FlagSet {
|
||||
fs.StringVarP(&flags.Password, "password", "p", "", "Password for registry")
|
||||
fs.StringVarP(&flags.Username, "username", "u", "", "Username for registry")
|
||||
fs.BoolVar(&flags.StdinPassword, "password-stdin", false, "Take the password from stdin")
|
||||
fs.BoolVar(&flags.GetLoginSet, "get-login", false, "Return the current login user for the registry")
|
||||
return &fs
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user