Source-Changes-HG archive

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

[src/trunk]: src/sys/fs/ptyfs PR/55821: tar can not extract base.tgz anymore ...



details:   https://anonhg.NetBSD.org/src/rev/9b4b75e8008a
branches:  trunk
changeset: 946347:9b4b75e8008a
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Nov 24 16:38:31 2020 +0000

description:
PR/55821: tar can not extract base.tgz anymore (./dev/pts and mounted ptyfs)
Allow chown/chmod at the root of ptyfs.

diffstat:

 sys/fs/ptyfs/ptyfs_vnops.c |  8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diffs (36 lines):

diff -r cf69d9da218f -r 9b4b75e8008a sys/fs/ptyfs/ptyfs_vnops.c
--- a/sys/fs/ptyfs/ptyfs_vnops.c        Tue Nov 24 16:28:44 2020 +0000
+++ b/sys/fs/ptyfs/ptyfs_vnops.c        Tue Nov 24 16:38:31 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ptyfs_vnops.c,v 1.60 2020/06/27 17:29:18 christos Exp $        */
+/*     $NetBSD: ptyfs_vnops.c,v 1.61 2020/11/24 16:38:31 christos Exp $        */
 
 /*
  * Copyright (c) 1993, 1995
@@ -76,7 +76,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ptyfs_vnops.c,v 1.60 2020/06/27 17:29:18 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ptyfs_vnops.c,v 1.61 2020/11/24 16:38:31 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -456,8 +456,6 @@
        if (vap->va_uid != (uid_t)VNOVAL || vap->va_gid != (gid_t)VNOVAL) {
                if (vp->v_mount->mnt_flag & MNT_RDONLY)
                        return EROFS;
-               if (ptyfs->ptyfs_type == PTYFSroot)
-                       return EPERM;
                error = ptyfs_chown(vp, vap->va_uid, vap->va_gid, cred, l);
                if (error)
                        return error;
@@ -492,8 +490,6 @@
        if (vap->va_mode != (mode_t)VNOVAL) {
                if (vp->v_mount->mnt_flag & MNT_RDONLY)
                        return EROFS;
-               if (ptyfs->ptyfs_type == PTYFSroot)
-                       return EPERM;
                if ((ptyfs->ptyfs_flags & SF_SNAPSHOT) != 0 &&
                    (vap->va_mode &
                    (S_IXUSR|S_IWUSR|S_IXGRP|S_IWGRP|S_IXOTH|S_IWOTH)))



Home | Main Index | Thread Index | Old Index