1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

when sharing a /var/lib/docker dir with more than one distribution, an existing lxc-start-unconfined softlink may point to a non-existant path, following that link (as Stat does) will cause the daemon to fail to start

This commit is contained in:
Sven Dowideit 2013-12-14 15:29:08 +10:00
parent a6928e70ac
commit 0a3eedd4c9

View file

@ -868,7 +868,7 @@ func linkLxcStart(root string) error {
}
targetPath := path.Join(root, "lxc-start-unconfined")
if _, err := os.Stat(targetPath); err != nil && !os.IsNotExist(err) {
if _, err := os.Lstat(targetPath); err != nil && !os.IsNotExist(err) {
return err
} else if err == nil {
if err := os.Remove(targetPath); err != nil {