Skip to content

Permission denied for bind mounts inside XFS filesystems #519

@sbraz

Description

@sbraz

Hi,
I recently noticed that there are permission errors for mount points outside of the folders on which I run rmlint. It only seems to happen inside XFS filesystems.

I believe the problem happens somewhere around here:

while((wrap_entry = rm_mount_list_next(self))) {

To reproduce:

# Inside an XFS filesystem
cd /mnt/xfs
mkdir source target
chmod 700 source
mount --bind source target

# In a different folder
cd /tmp/empty
rmlint

This will output: /mnt/xfs/target: Permission denied. Strace shows openat(AT_FDCWD, "/mnt/xfs/target", O_RDONLY) = -1 EACCES (Permission denied).

Does rmlint really need to enumerate each mount point? The error is also present when -x is used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions