NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/58146: msdosfs crash on rename
The following reply was made to PR kern/58146; it has been noted by GNATS.
From: Rhialto <rhialto%falu.nl@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: kern-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
netbsd-bugs%netbsd.org@localhost, Rhialto <rhialto%falu.nl@localhost>
Subject: Re: kern/58146: msdosfs crash on rename
Date: Mon, 20 May 2024 13:31:51 +0200
I propose to commit this and request pullup to 10.
I copied the comment to be in line with genfs_rename.c.
Index: fs/msdosfs/msdosfs_rename.c
===================================================================
RCS file: /cvsroot/src/sys/fs/msdosfs/msdosfs_rename.c,v
retrieving revision 1.3
diff -u -r1.3 msdosfs_rename.c
--- fs/msdosfs/msdosfs_rename.c 23 Oct 2021 16:58:17 -0000 1.3
+++ fs/msdosfs/msdosfs_rename.c 20 May 2024 11:30:26 -0000
@@ -127,7 +127,13 @@
KASSERT(tdvp->v_type == VDIR);
cred = fcnp->cn_cred;
- KASSERT(tcnp->cn_cred == cred);
+
+ /*
+ * 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.
+ */
+ KASSERT(kauth_cred_uidmatch(cred, tcnp->cn_cred));
/*
* Sanitize our world from the VFS insanity. Unlock the target
Home |
Main Index |
Thread Index |
Old Index