Module Name:    src
Committed By:   martin
Date:           Thu Jun 20 18:09:54 UTC 2024

Modified Files:
        src/sys/fs/msdosfs [netbsd-10]: msdosfs_rename.c

Log Message:
Pull up following revision(s) (requested by rhialto in ticket #706):

        sys/fs/msdosfs/msdosfs_rename.c: revision 1.4

>From genfs_rename.c:
         * XXX Want a better equality test.  `tcnp->cn_cred == cred'
         * hoses p2k because puffs transmits the creds separately and
         * allocates distinct but equivalent structures for them.

Fixes rename crash in rump_msdos.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.3.4.1 src/sys/fs/msdosfs/msdosfs_rename.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/msdosfs/msdosfs_rename.c
diff -u src/sys/fs/msdosfs/msdosfs_rename.c:1.3 src/sys/fs/msdosfs/msdosfs_rename.c:1.3.4.1
--- src/sys/fs/msdosfs/msdosfs_rename.c:1.3	Sat Oct 23 16:58:17 2021
+++ src/sys/fs/msdosfs/msdosfs_rename.c	Thu Jun 20 18:09:54 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: msdosfs_rename.c,v 1.3 2021/10/23 16:58:17 thorpej Exp $	*/
+/*	$NetBSD: msdosfs_rename.c,v 1.3.4.1 2024/06/20 18:09:54 martin Exp $	*/
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: msdosfs_rename.c,v 1.3 2021/10/23 16:58:17 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msdosfs_rename.c,v 1.3.4.1 2024/06/20 18:09:54 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/buf.h>
@@ -127,7 +127,7 @@ msdosfs_rename(void *v)
 	KASSERT(tdvp->v_type == VDIR);
 
 	cred = fcnp->cn_cred;
-	KASSERT(tcnp->cn_cred == cred);
+	KASSERT(kauth_cred_uidmatch(cred, tcnp->cn_cred));
 
 	/*
 	 * Sanitize our world from the VFS insanity.  Unlock the target

Reply via email to