Re: [libvirt] [PATCH 3/4] security: avoid use of dirent d_type field

2019-04-02 Thread Daniel P . Berrangé
On Tue, Apr 02, 2019 at 03:27:47PM +0200, Michal Privoznik wrote: > On 4/2/19 2:40 PM, Daniel P. Berrangé wrote: > > The d_type field cannot be assumed to be filled. Some filesystems, such > > as older XFS, will simply report DT_UNKNOWN. > > > > Even if the d_type is filled in, the use of it in

Re: [libvirt] [PATCH 3/4] security: avoid use of dirent d_type field

2019-04-02 Thread Michal Privoznik
On 4/2/19 2:40 PM, Daniel P. Berrangé wrote: The d_type field cannot be assumed to be filled. Some filesystems, such as older XFS, will simply report DT_UNKNOWN. Even if the d_type is filled in, the use of it in the SELinux functions is dubious. If labelling all files in a directory there's no

[libvirt] [PATCH 3/4] security: avoid use of dirent d_type field

2019-04-02 Thread Daniel P . Berrangé
The d_type field cannot be assumed to be filled. Some filesystems, such as older XFS, will simply report DT_UNKNOWN. Even if the d_type is filled in, the use of it in the SELinux functions is dubious. If labelling all files in a directory there's no reason to skip things which are not regular