Module Name:    src
Committed By:   martin
Date:           Fri Aug  4 13:34:58 UTC 2023

Modified Files:
        src/sys/fs/ptyfs [netbsd-9]: ptyfs_vnops.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1703):

        sys/fs/ptyfs/ptyfs_vnops.c: revision 1.61

PR/55821: tar can not extract base.tgz anymore (./dev/pts and mounted ptyfs)

Allow chown/chmod at the root of ptyfs.


To generate a diff of this commit:
cvs rdiff -u -r1.55.4.1 -r1.55.4.2 src/sys/fs/ptyfs/ptyfs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/fs/ptyfs/ptyfs_vnops.c
diff -u src/sys/fs/ptyfs/ptyfs_vnops.c:1.55.4.1 src/sys/fs/ptyfs/ptyfs_vnops.c:1.55.4.2
--- src/sys/fs/ptyfs/ptyfs_vnops.c:1.55.4.1	Mon Aug 29 15:45:10 2022
+++ src/sys/fs/ptyfs/ptyfs_vnops.c	Fri Aug  4 13:34:58 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: ptyfs_vnops.c,v 1.55.4.1 2022/08/29 15:45:10 martin Exp $	*/
+/*	$NetBSD: ptyfs_vnops.c,v 1.55.4.2 2023/08/04 13:34:58 martin Exp $	*/
 
 /*
  * Copyright (c) 1993, 1995
@@ -76,7 +76,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ptyfs_vnops.c,v 1.55.4.1 2022/08/29 15:45:10 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ptyfs_vnops.c,v 1.55.4.2 2023/08/04 13:34:58 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -455,8 +455,6 @@ ptyfs_setattr(void *v)
 	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;
@@ -491,8 +489,6 @@ ptyfs_setattr(void *v)
 	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)))

Reply via email to