util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Libmount bug ?
@ 2024-10-12  8:57 Alan Huang
  2024-10-14 15:57 ` Karel Zak
  0 siblings, 1 reply; 3+ messages in thread
From: Alan Huang @ 2024-10-12  8:57 UTC (permalink / raw)
  To: kzak
  Cc: util-linux, linux-bcachefs, Kent Overstreet, Hongbo Li,
	Darrick J. Wong, xfs

Hello Karel,

The bcachefs has the helper called mount.bcachefs.

Currently, there are users using fstab with nofail/user fail to mount,
we would like to know whether other filesystems using similar helper
properly handle this.

This is like commit 06e05eb0f78566b68c44328c37d7c28d8655e9df 
(“libmount: don't pass option "defaults" to helper")

Or would you like something like this? This might be incomplete though (e.g. owner, noowner etc.)

diff --git a/libmount/src/optmap.c b/libmount/src/optmap.c
index d7569a0f0..c13b9ba19 100644
--- a/libmount/src/optmap.c
+++ b/libmount/src/optmap.c
@@ -152,11 +152,11 @@ static const struct libmnt_optmap userspace_opts_map[] =
    { "auto",    MNT_MS_NOAUTO, MNT_NOHLPS | MNT_INVERT | MNT_NOMTAB },  /* Can be mounted using -a */
    { "noauto",  MNT_MS_NOAUTO, MNT_NOHLPS | MNT_NOMTAB },  /* Can only be mounted explicitly */

-   { "user[=]", MNT_MS_USER },                             /* Allow ordinary user to mount (mtab) */
-   { "nouser",  MNT_MS_USER, MNT_INVERT | MNT_NOMTAB },    /* Forbid ordinary user to mount */
+   { "user[=]", MNT_MS_USER, MNT_NOHLPS},                             /* Allow ordinary user to mount (mtab) */
+   { "nouser",  MNT_MS_USER, MNT_INVERT | MNT_NOMTAB | MNT_NOHLPS},    /* Forbid ordinary user to mount */

-   { "users",   MNT_MS_USERS, MNT_NOMTAB },                /* Allow ordinary users to mount */
-   { "nousers", MNT_MS_USERS, MNT_INVERT | MNT_NOMTAB },   /* Forbid ordinary users to mount */
+   { "users",   MNT_MS_USERS, MNT_NOMTAB | MNT_NOHLPS},                /* Allow ordinary users to mount */
+   { "nousers", MNT_MS_USERS, MNT_INVERT | MNT_NOMTAB | MNT_NOHLPS},   /* Forbid ordinary users to mount */

    { "owner",   MNT_MS_OWNER, MNT_NOMTAB },                /* Let the owner of the device mount */
    { "noowner", MNT_MS_OWNER, MNT_INVERT | MNT_NOMTAB },   /* Device owner has no special privs */
@@ -180,7 +180,7 @@ static const struct libmnt_optmap userspace_opts_map[] =
    { "sizelimit=", MNT_MS_SIZELIMIT, MNT_NOHLPS | MNT_NOMTAB },	   /* loop device size limit */
    { "encryption=", MNT_MS_ENCRYPTION, MNT_NOHLPS | MNT_NOMTAB },	   /* loop device encryption */

-   { "nofail",  MNT_MS_NOFAIL, MNT_NOMTAB },               /* Do not fail if ENOENT on dev */
+   { "nofail",  MNT_MS_NOFAIL, MNT_NOMTAB | MNT_NOHLPS},               /* Do not fail if ENOENT on dev */

    { "uhelper=", MNT_MS_UHELPER },			   /* /sbin/umount.<helper> */


Thanks,
Alan




^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-10-15 11:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-12  8:57 Libmount bug ? Alan Huang
2024-10-14 15:57 ` Karel Zak
2024-10-15 11:44   ` Alan Huang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).