• Miklos Szeredi's avatar
    ovl: fix sgid on directory · bb0d2b8a
    Miklos Szeredi authored
    When creating directory in workdir, the group/sgid inheritance from the
    parent dir was omitted completely.  Fix this by calling inode_init_owner()
    on overlay inode and using the resulting uid/gid/mode to create the file.
    
    Unfortunately the sgid bit can be stripped off due to umask, so need to
    reset the mode in this case in workdir before moving the directory in
    place.
    Reported-by: default avatarEryu Guan <eguan@redhat.com>
    Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
    bb0d2b8a
dir.c 21 KB