PERFORCE change 52290 for review

Andrew Reisse areisse at FreeBSD.org
Wed May 5 12:51:51 GMT 2004


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

Change 52290 by areisse at areisse_ibook on 2004/05/05 05:50:52

	Fix panic when attempting to write to a readonly directory.

Affected files ...

.. //depot/projects/trustedbsd/sedarwin73/apsl/xnu/bsd/vfs/vfs_vnops.c#3 edit

Differences ...

==== //depot/projects/trustedbsd/sedarwin73/apsl/xnu/bsd/vfs/vfs_vnops.c#3 (text+ko) ====

@@ -149,7 +149,11 @@
 #ifdef MAC
                         error = mac_check_vnode_create(cred, ndp->ni_dvp,
 			    &ndp->ni_cnd, vap);
-			if (error == 0)
+			if (error) {
+				vput(ndp->ni_dvp);
+			        remove_name (nameptr);
+				return error;
+			}
 #endif
 			if (error = VOP_CREATE(ndp->ni_dvp, &ndp->ni_vp,
 					       &ndp->ni_cnd, vap)) {
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