Rename the variable 'grade' to 'type' in interface parsing and
labeling for Biba. Rename the variable 'level' to 'type' in interface parsing and labeling for MLS. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
This commit is contained in:
parent
b63094f6ec
commit
4d2ec8debb
@ -1127,21 +1127,21 @@ mac_biba_create_ifnet(struct ifnet *ifnet, struct label *ifnetlabel)
|
|||||||
char tifname[IFNAMSIZ], ifname[IFNAMSIZ], *p, *q;
|
char tifname[IFNAMSIZ], ifname[IFNAMSIZ], *p, *q;
|
||||||
char tiflist[sizeof(trusted_interfaces)];
|
char tiflist[sizeof(trusted_interfaces)];
|
||||||
struct mac_biba *dest;
|
struct mac_biba *dest;
|
||||||
int len, grade;
|
int len, type;
|
||||||
|
|
||||||
dest = SLOT(ifnetlabel);
|
dest = SLOT(ifnetlabel);
|
||||||
|
|
||||||
if (ifnet->if_type == IFT_LOOP) {
|
if (ifnet->if_type == IFT_LOOP) {
|
||||||
grade = MAC_BIBA_TYPE_EQUAL;
|
type = MAC_BIBA_TYPE_EQUAL;
|
||||||
goto set;
|
goto set;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (trust_all_interfaces) {
|
if (trust_all_interfaces) {
|
||||||
grade = MAC_BIBA_TYPE_HIGH;
|
type = MAC_BIBA_TYPE_HIGH;
|
||||||
goto set;
|
goto set;
|
||||||
}
|
}
|
||||||
|
|
||||||
grade = MAC_BIBA_TYPE_LOW;
|
type = MAC_BIBA_TYPE_LOW;
|
||||||
|
|
||||||
if (trusted_interfaces[0] == '\0' ||
|
if (trusted_interfaces[0] == '\0' ||
|
||||||
!strvalid(trusted_interfaces, sizeof(trusted_interfaces)))
|
!strvalid(trusted_interfaces, sizeof(trusted_interfaces)))
|
||||||
@ -1161,7 +1161,7 @@ mac_biba_create_ifnet(struct ifnet *ifnet, struct label *ifnetlabel)
|
|||||||
bzero(tifname, sizeof(tifname));
|
bzero(tifname, sizeof(tifname));
|
||||||
bcopy(q, tifname, len);
|
bcopy(q, tifname, len);
|
||||||
if (strcmp(tifname, ifname) == 0) {
|
if (strcmp(tifname, ifname) == 0) {
|
||||||
grade = MAC_BIBA_TYPE_HIGH;
|
type = MAC_BIBA_TYPE_HIGH;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -1176,8 +1176,8 @@ mac_biba_create_ifnet(struct ifnet *ifnet, struct label *ifnetlabel)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
set:
|
set:
|
||||||
mac_biba_set_single(dest, grade, 0, NULL);
|
mac_biba_set_single(dest, type, 0, NULL);
|
||||||
mac_biba_set_range(dest, grade, 0, NULL, grade, 0, NULL);
|
mac_biba_set_range(dest, type, 0, NULL, type, 0, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1094,17 +1094,17 @@ static void
|
|||||||
mac_mls_create_ifnet(struct ifnet *ifnet, struct label *ifnetlabel)
|
mac_mls_create_ifnet(struct ifnet *ifnet, struct label *ifnetlabel)
|
||||||
{
|
{
|
||||||
struct mac_mls *dest;
|
struct mac_mls *dest;
|
||||||
int level;
|
int type;
|
||||||
|
|
||||||
dest = SLOT(ifnetlabel);
|
dest = SLOT(ifnetlabel);
|
||||||
|
|
||||||
if (ifnet->if_type == IFT_LOOP)
|
if (ifnet->if_type == IFT_LOOP)
|
||||||
level = MAC_MLS_TYPE_EQUAL;
|
type = MAC_MLS_TYPE_EQUAL;
|
||||||
else
|
else
|
||||||
level = MAC_MLS_TYPE_LOW;
|
type = MAC_MLS_TYPE_LOW;
|
||||||
|
|
||||||
mac_mls_set_single(dest, level, 0, NULL);
|
mac_mls_set_single(dest, type, 0, NULL);
|
||||||
mac_mls_set_range(dest, level, 0, NULL, level, 0, NULL);
|
mac_mls_set_range(dest, type, 0, NULL, type, 0, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user