PERFORCE change 37448 for review
Andrew Reisse
areisse at FreeBSD.org
Wed Sep 3 15:49:08 GMT 2003
http://perforce.freebsd.org/chv.cgi?CH=37448
Change 37448 by areisse at areisse_tislabs on 2003/09/03 08:48:55
Fix for wrong security class being used in transition at
vnode creation.
Affected files ...
.. //depot/projects/trustedbsd/sebsd/sys/security/sebsd/sebsd.c#18 edit
Differences ...
==== //depot/projects/trustedbsd/sebsd/sys/security/sebsd/sebsd.c#18 (text+ko) ====
@@ -791,19 +791,21 @@
u_int32_t context_len;
security_id_t newsid;
int error;
+ int tclass;
task = SLOT(&cred->cr_label);
dir = SLOT(parentlabel);
vsec = SLOT(childlabel);
+ tclass = vnode_type_to_security_class (child->v_type);
- error = security_transition_sid(task->sid, dir->sid, SECCLASS_FILE,
+ error = security_transition_sid(task->sid, dir->sid, tclass,
&newsid);
if (error)
return (error);
vsec->sid = newsid;
vsec->task_sid = task->sid;
- vsec->sclass = vnode_type_to_security_class(child->v_type);
+ vsec->sclass = tclass;
/* store label in vnode */
error = security_sid_to_context(vsec->sid, &context,
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