fix aufs mount option length calculation

We add ",dirperm1" but only increase length by len("dirperm1").

Signed-off-by: Peng Tao <bergwolf@gmail.com>
This commit is contained in:
Peng Tao 2017-06-08 19:21:52 +08:00
parent cd35e4beee
commit 1a6bf8248a
1 changed files with 1 additions and 1 deletions

View File

@ -573,7 +573,7 @@ func (a *Driver) aufsMount(ro []string, rw, target, mountLabel string) (err erro
offset := 54
if useDirperm() {
offset += len("dirperm1")
offset += len(",dirperm1")
}
b := make([]byte, syscall.Getpagesize()-len(mountLabel)-offset) // room for xino & mountLabel
bp := copy(b, fmt.Sprintf("br:%s=rw", rw))