Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Nov 2020 05:05:27 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 251363] use unionfs as a disk-cache for NFS [feature]
Message-ID:  <bug-251363-227-4YuAKFYTMm@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-251363-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-251363-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D251363

--- Comment #13 from Gunther Schadow <raj@gusw.net> ---
Further confirmation of the problem, which is now a bug of unionfs not
following its own specification for copymode =3D transparent.

The files do not get copied with the original owner credentials. Proof:

# chmod g+w test-upper
# mount -t unionfs test-upper test-lower
# rm test-upper/data

$ cat test-lower/data
I'm root
$ echo "But I'm not root, and I mean it!" > test-lower/data
$ ls -l test-upper/
total 4
-rw-rw-r--  1 user wheel  33 Nov 28 04:20 data

so now the file is owned by user

$ rm test-upper/data
$ ls -l test-lower/
total 4
-rw-rw-r--  1 root  wheel  17 Nov 28 03:39 data

so clearly the user is not the right one. Why?

in unionfs_subr.c:
----------------------------------------------------------
void
unionfs_create_uppervattr_core(struct unionfs_mount *ump,
                               struct vattr *lva,
                               struct vattr *uva,
                               struct thread *td)
{
        VATTR_NULL(uva);
        uva->va_type =3D lva->va_type;
        uva->va_atime =3D lva->va_atime;
        uva->va_mtime =3D lva->va_mtime;
        uva->va_ctime =3D lva->va_ctime;

        switch (ump->um_copymode) {
        case UNIONFS_TRANSPARENT:
                uva->va_mode =3D lva->va_mode;
                uva->va_uid =3D lva->va_uid;
                uva->va_gid =3D lva->va_gid;
                break;
----------------------------------------------------------

it should have been done! What if this is an issue with my code changes? No=
, I
verified it, it is happening on the original unionfs.ko just the same.

I will make another ticket from that, because it's not my fault. But it's a
major road block to getting this to work.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-251363-227-4YuAKFYTMm>