https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=251363

--- Comment #13 from Gunther Schadow <r...@gusw.net> ---
Further confirmation of the problem, which is now a bug of unionfs not
following its own specification for copymode = 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 = lva->va_type;
        uva->va_atime = lva->va_atime;
        uva->va_mtime = lva->va_mtime;
        uva->va_ctime = lva->va_ctime;

        switch (ump->um_copymode) {
        case UNIONFS_TRANSPARENT:
                uva->va_mode = lva->va_mode;
                uva->va_uid = lva->va_uid;
                uva->va_gid = 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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to