mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix tini version parsing
Invalid version strings for the init (tini) binary were still accepted, which lead to (e.g.) "hello world" Being used as "vhello world" This makes the version parsing slightly stricter Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
8b9d54c084
commit
984d99e19c
1 changed files with 1 additions and 1 deletions
|
@ -69,7 +69,7 @@ func (daemon *Daemon) FillPlatformInfo(v *types.Info, sysInfo *sysinfo.SysInfo)
|
|||
v.InitCommit.Expected = dockerversion.InitCommitID[0:len(v.InitCommit.ID)]
|
||||
}
|
||||
}
|
||||
if v.InitCommit.ID == "" && len(parts) >= 1 {
|
||||
if v.InitCommit.ID == "" && strings.HasPrefix(parts[0], "tini version") {
|
||||
vs := strings.TrimPrefix(parts[0], "tini version ")
|
||||
v.InitCommit.ID = "v" + vs
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue