PERFORCE change 22166 for review

Brian Feldman green at freebsd.org
Wed Dec 11 20:09:43 GMT 2002


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

Change 22166 by green at green_laptop_2 on 2002/12/11 12:09:34

	Correct both invocations of devfs_fqpn() to use the directory's
	dirent and not the file's.

Affected files ...

.. //depot/projects/trustedbsd/mac/sys/fs/devfs/devfs_vnops.c#39 edit

Differences ...

==== //depot/projects/trustedbsd/mac/sys/fs/devfs/devfs_vnops.c#39 (text+ko) ====

@@ -95,6 +95,7 @@
 {
 	int i;
 
+	KASSERT(de->de_dirent->d_type == DT_DIR, ("devfs_fqpn: de not DT_DIR"));
 	i = buflen - 1;
 	buf[i] = '\0';
 	i -= namelen;
@@ -362,7 +363,7 @@
 	 * OK, we didn't have an entry for the name we were asked for
 	 * so we try to see if anybody can create it on demand.
 	 */
-	pname = devfs_fqpn(specname, sizeof(specname), dmp, de,
+	pname = devfs_fqpn(specname, sizeof(specname), dmp, dd,
 	    cnp->cn_nameptr, cnp->cn_namelen);
 	if (pname == NULL)
 		goto notfound;
@@ -875,7 +876,7 @@
 #ifdef MAC
 	mac_create_devfs_symlink(ap->a_cnp->cn_cred, dmp->dm_mount, dd, de,
 	    devfs_fqpn(specname, SPECNAMELEN + ap->a_cnp->cn_namelen + 1,
-	    dmp, de, ap->a_cnp->cn_nameptr, ap->a_cnp->cn_namelen));
+	    dmp, dd, ap->a_cnp->cn_nameptr, ap->a_cnp->cn_namelen));
 	free(specname, M_DEVFS);
 #endif
 	TAILQ_INSERT_TAIL(&dd->de_dlist, de, de_list);
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message



More information about the trustedbsd-cvs mailing list