bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Suggested fix to mountlist.c: Define fuse.portal, devtmpfs and squas


From: Pádraig Brady
Subject: Re: Suggested fix to mountlist.c: Define fuse.portal, devtmpfs and squashfs mounts as dummy
Date: Sat, 13 Feb 2021 02:18:10 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Thunderbird/84.0

On 13/02/2021 01:40, Daniel Bonner wrote:
Hi gnulib developers,
At present many gnulib users encounter this error:
Running 'df' as user (not root) causes results in output that includes
this error message:
"df: /run/user/1000/doc: Operation not permitted"
I would like to pass on to you a suggested fix:
@@ -164,7 +164,10 @@
  #define ME_DUMMY_0(Fs_name, Fs_type)            \
    (strcmp (Fs_type, "autofs") == 0              \
+   || strcmp (Fs_type, "devtmpfs") == 0         \
+   || strcmp (Fs_type, "fuse.portal") == 0      \
     || strcmp (Fs_type, "proc") == 0             \
+   || strcmp (Fs_type, "squashfs") == 0         \
     || strcmp (Fs_type, "subfs") == 0            \
     /* for Linux 2.6/3.x */                      \
     || strcmp (Fs_type, "debugfs") == 0          \
Julian Klode, from Ubuntu, deserves credit for this suggested fix. He
published a patch that has been included in the Ubuntu Hirsute 21.04
package: coreutils 8.32-4ubuntu2.  See
1. https://bugs.launchpad.net/ubuntu/+source/xdg-desktop-portal/+bug/19056232.
2. 
https://launchpadlibrarian.net/510003931/coreutils_8.32-4ubuntu1_8.32-4ubuntu2.diff.gz
I have cc'ed Julian in this email.
The patch addresses a problem that particularly affects gnulib users
with fuse.portal mounts, such as users who have installed Flatpak.
This is a significant problem for users who depend on df not returning
an error exit code in their scripts.  Julian's  bug report said:
"/run/user/1000/doc is a fuse.portal mount point, but statfs() return
EPERM, hence df produces an error message. Maybe statfs() is not
implemented, but it would be good to quieten this down (df even does
not allow me to ignore it, probably because it looks at statfs to find
out fs type, so my fs type ignoring doesn't work)."
This problem has also been reported on Fedora 32 here:
flatpak/xdg-desktop-portal#512
Kind regards,
Daniel


I'll look into this in a bit more detail to see if it's general enough.
I.e. that there are no cases where these file system types may
have usable space.  squashfs is read-only so that is probably ok.

thanks!
Pádraig



reply via email to

[Prev in Thread] Current Thread [Next in Thread]