Allow users to disable detach keys

If user specifies --detach-keys="", this will disable the feature.

Adding define.DefaultDetachKeys to help screen to help identify detach keys.

Updated man pages with additonal information.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh
2019-11-04 14:37:14 -05:00
parent a904e21cf0
commit 7c623bd41f
11 changed files with 13 additions and 28 deletions

View File

@ -152,7 +152,7 @@ func (c *Container) attachToExec(streams *AttachStreams, keys string, resize <-c
func processDetachKeys(keys string) ([]byte, error) {
// Check the validity of the provided keys first
if len(keys) == 0 {
keys = define.DefaultDetachKeys
return []byte{}, nil
}
detachKeys, err := term.ToBytes(keys)
if err != nil {