PERFORCE change 20146 for review

Chris Vance cvance at freebsd.org
Fri Oct 25 19:17:29 GMT 2002


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

Change 20146 by cvance at cvance_laptop on 2002/10/25 12:16:47

	Before EAs are available, vn_extattr_get will return EOPNOTSUPP
	so handle EOPNOTSUPP case in sebsd_associate_vnode_extattr; 
	vnodes will be reloaded after the policy is available, to the 
	temporary (incorrect) label will be fine.

Affected files ...

.. //depot/projects/trustedbsd/mac/sys/security/sebsd/sebsd.c#51 edit

Differences ...

==== //depot/projects/trustedbsd/mac/sys/security/sebsd/sebsd.c#51 (text+ko) ====

@@ -487,7 +487,7 @@
 			       SEBSD_MAC_EXTATTR_NAMESPACE, 
 			       SEBSD_MAC_EXTATTR_NAME,
 			       &context_len, context, curthread);
-	if (error == ENOATTR) {
+	if (error == ENOATTR || error == EOPNOTSUPP) {
 		vsec->sid = SECINITSID_UNLABELED; /* Use the default label */
 		struct vattr va;
 
@@ -497,6 +497,8 @@
 		goto dosclass;
 	}
 	if (error) {
+		printf("sebsd_update_vnode_from_extattr: ERROR %d returned "
+		    " by vn_extattr_get()\n", error);
 		return (error); /* Fail closed */
 	}
 	if (sebsd_verbose > 1) {
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