PERFORCE change 91219 for review

Wayne Salamon wsalamon at FreeBSD.org
Sun Feb 5 18:54:11 PST 2006


http://perforce.freebsd.org/chv.cgi?CH=91219

Change 91219 by wsalamon at gretsch on 2006/02/06 02:54:00

	Remove comments that are no longer true, leftover from interim
	development.

Affected files ...

.. //depot/projects/trustedbsd/audit3/sys/kern/vfs_mount.c#10 edit

Differences ...

==== //depot/projects/trustedbsd/audit3/sys/kern/vfs_mount.c#10 (text+ko) ====

@@ -675,10 +675,6 @@
 	fstype = malloc(MFSNAMELEN, M_TEMP, M_WAITOK);
 	error = copyinstr(uap->type, fstype, MFSNAMELEN, NULL);
 	if (!error) {
-		/* Audit the fstype here, even though it will be copied
-		 * again later. But if an error is detected, it won't get
-		 * copied later, so grab as much info as possible.
-		 */
 		AUDIT_ARG(text, fstype);
 		mtx_lock(&Giant);	/* XXX ? */
 		vfsp = vfs_byname_kld(fstype, td, &error);
@@ -690,7 +686,7 @@
 	{
 		/* Even though it will get captured again during vnode lookup,
 		 * capture the user-supplied path here because there are several
-		 * error-out cases before the lookup, or the lookup may fail.
+		 * error-out cases before the lookup.
 		 */
 		char *pathbuf = malloc(MNAMELEN, M_TEMP, M_WAITOK);
 		error = copyinstr(uap->path, pathbuf, MNAMELEN, NULL);
@@ -712,12 +708,6 @@
 	ma = mount_argb(ma, !(uap->flags & MNT_NOSUID), "nosuid");
 	ma = mount_argb(ma, !(uap->flags & MNT_NOEXEC), "noexec");
 
-	/* Note that for auditing purposes, the we depend on the 
-	 * file system cmount function to call kernel_mount(), which
-	 * calls vfs_donmount(), and that is where the user path and
-	 * type information is copied into the kernel; only then can
-	 * we capture the path information for auditing.
-	 */
 	error = vfsp->vfc_vfsops->vfs_cmount(ma, uap->data, uap->flags, td);
 	return (error);
 }


More information about the p4-projects mailing list