Module Name: src
Committed By: mlelstv
Date: Sat May 4 05:49:39 UTC 2024
Modified Files:
src/sys/fs/msdosfs: msdosfs_rename.c
Log Message:
>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.4 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.4
--- src/sys/fs/msdosfs/msdosfs_rename.c:1.3 Sat Oct 23 16:58:17 2021
+++ src/sys/fs/msdosfs/msdosfs_rename.c Sat May 4 05:49:39 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.4 2024/05/04 05:49:39 mlelstv 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.4 2024/05/04 05:49:39 mlelstv 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