I noticed that the following amd(8) map did not actually mount the
remote NFS filesystem with the wxallowed mount option:

/defaults       sublink:=${key}
*               host==eeyore;type:=link;fs:=/vol/local/${host}; \
                host!=eeyore;type:=nfs;rhost:=eeyore;rfs:=/vol/local/${host};\
                opts:=rw,tcp,intr,soft,nosuid,nodevs,wxallowed;

On a machine "box", this mounts "eeyore:/vol/local/box" as

eeyore:/vol/local/box on /tmp_mnt/eeyore/vol/local/box type nfs (nodev, nosuid, 
v2, tcp, soft, intr, timeo=100)

Looking at src/usr.sbin/amd/amd/mount_fs.c, this appears to be because
only a select set of mount options are being allowed.  These are "ro",
"nodev", "noexec", "nosuid", and "sync".

I tested the attached very naive patch on my amd64-current system, and
it *seems* to work:

eeyore:/vol/local/box on /tmp_mnt/eeyore/vol/local/box type nfs (nodev, nosuid, 
wxallowed, v2, tcp, soft, intr, timeo=100) 

Regards,

-- 
Andreae (Kusalananda) Kähäri
SciLifeLab, NBIS, ICM
Uppsala University, Sweden

.
Index: mount_fs.c
===================================================================
RCS file: /extra/cvs/src/usr.sbin/amd/amd/mount_fs.c,v
retrieving revision 1.14
diff -u -p -r1.14 mount_fs.c
--- mount_fs.c  20 Oct 2014 06:55:59 -0000      1.14
+++ mount_fs.c  20 Jan 2020 22:34:32 -0000
@@ -50,6 +50,7 @@ struct opt_tab mnt_flags[] = {
        { "noexec",     MNT_NOEXEC },
        { "nosuid",     MNT_NOSUID },
        { "sync",       MNT_SYNCHRONOUS },
+       { "wxallowed",  MNT_WXALLOWED },
        { 0, 0 }
 };
 

Reply via email to