PERFORCE change 19811 for review
Robert Watson
rwatson at freebsd.org
Mon Oct 21 17:59:17 GMT 2002
http://perforce.freebsd.org/chv.cgi?CH=19811
Change 19811 by rwatson at rwatson_paprika on 2002/10/21 10:58:37
No need to explicitly copy compartment arrays: structure
assignment will copy all members.
Affected files ...
.. //depot/projects/trustedbsd/mac/sys/security/mac_biba/mac_biba.c#144 edit
.. //depot/projects/trustedbsd/mac/sys/security/mac_mls/mac_mls.c#125 edit
Differences ...
==== //depot/projects/trustedbsd/mac/sys/security/mac_biba/mac_biba.c#144 (text+ko) ====
@@ -432,16 +432,8 @@
KASSERT((labelfrom->mb_flags & MAC_BIBA_FLAG_RANGE) != 0,
("mac_biba_copy_range: labelfrom not range"));
- memcpy(labelto->mb_rangelow.mbe_compartments,
- labelfrom->mb_rangelow.mbe_compartments,
- sizeof(labelfrom->mb_rangelow.mbe_compartments));
labelto->mb_rangelow = labelfrom->mb_rangelow;
-
- memcpy(labelto->mb_rangehigh.mbe_compartments,
- labelfrom->mb_rangehigh.mbe_compartments,
- sizeof(labelfrom->mb_rangehigh.mbe_compartments));
labelto->mb_rangehigh = labelfrom->mb_rangehigh;
-
labelto->mb_flags |= MAC_BIBA_FLAG_RANGE;
}
@@ -452,9 +444,6 @@
KASSERT((labelfrom->mb_flags & MAC_BIBA_FLAG_SINGLE) != 0,
("mac_biba_copy_single: labelfrom not single"));
- memcpy(labelto->mb_single.mbe_compartments,
- labelfrom->mb_single.mbe_compartments,
- sizeof(labelfrom->mb_single.mbe_compartments));
labelto->mb_single = labelfrom->mb_single;
labelto->mb_flags |= MAC_BIBA_FLAG_SINGLE;
}
==== //depot/projects/trustedbsd/mac/sys/security/mac_mls/mac_mls.c#125 (text+ko) ====
@@ -421,16 +421,8 @@
KASSERT((labelfrom->mm_flags & MAC_MLS_FLAG_RANGE) != 0,
("mac_mls_copy_range: labelfrom not range"));
- memcpy(labelto->mm_rangelow.mme_compartments,
- labelfrom->mm_rangelow.mme_compartments,
- sizeof(labelfrom->mm_rangelow.mme_compartments));
labelto->mm_rangelow = labelfrom->mm_rangelow;
-
- memcpy(labelto->mm_rangehigh.mme_compartments,
- labelfrom->mm_rangehigh.mme_compartments,
- sizeof(labelfrom->mm_rangehigh.mme_compartments));
labelto->mm_rangehigh = labelfrom->mm_rangehigh;
-
labelto->mm_flags |= MAC_MLS_FLAG_RANGE;
}
@@ -441,11 +433,7 @@
KASSERT((labelfrom->mm_flags & MAC_MLS_FLAG_SINGLE) != 0,
("mac_mls_copy_single: labelfrom not single"));
- memcpy(labelto->mm_single.mme_compartments,
- labelfrom->mm_single.mme_compartments,
- sizeof(labelfrom->mm_single.mme_compartments));
labelto->mm_single = labelfrom->mm_single;
-
labelto->mm_flags |= MAC_MLS_FLAG_SINGLE;
}
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