[PATCH rtems-libbsd/6-freebsd-12 v2 3/4] freebsd/vfs: Pass in the td's cred to the VFS calls

chrisj at rtems.org chrisj at rtems.org
Fri Jul 21 05:02:36 UTC 2023


From: Chris Johns <chrisj at rtems.org>

Closes #4723
---
 rtemsbsd/rtems/rtems-kernel-vfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rtemsbsd/rtems/rtems-kernel-vfs.c b/rtemsbsd/rtems/rtems-kernel-vfs.c
index 2f4d009b..0817df81 100644
--- a/rtemsbsd/rtems/rtems-kernel-vfs.c
+++ b/rtemsbsd/rtems/rtems-kernel-vfs.c
@@ -490,7 +490,7 @@ rtems_bsd_vfs_fchmod(const rtems_filesystem_location_info_t *loc, mode_t mode)
 		}
 		return rtems_bsd_error_to_status_and_errno(ENOMEM);
 	}
-	error = setfmode(td, NULL, vp, mode);
+	error = setfmode(td, td->td_ucred, vp, mode);
 	return rtems_bsd_error_to_status_and_errno(error);
 }
 
@@ -511,7 +511,7 @@ rtems_bsd_vfs_chown(
 		}
 		return rtems_bsd_error_to_status_and_errno(ENOMEM);
 	}
-	error = setfown(td, NULL, vp, owner, group);
+	error = setfown(td, td->td_ucred, vp, owner, group);
 	return rtems_bsd_error_to_status_and_errno(error);
 }
 
-- 
2.37.1



More information about the devel mailing list