summaryrefslogtreecommitdiffstats
path: root/sys/security
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2008-08-02 22:30:51 +0000
committerrwatson <rwatson@FreeBSD.org>2008-08-02 22:30:51 +0000
commite6f6fc88e2ea295e3492fc7aa6a211c9570a6130 (patch)
tree7fc947d236a22b5b21df83a171d26ab2454a31b5 /sys/security
parent7b3a18a595bd656b1405e6a8e24c95a9974544c3 (diff)
downloadFreeBSD-src-e6f6fc88e2ea295e3492fc7aa6a211c9570a6130.zip
FreeBSD-src-e6f6fc88e2ea295e3492fc7aa6a211c9570a6130.tar.gz
Minor style tweaks.
Diffstat (limited to 'sys/security')
-rw-r--r--sys/security/mac_biba/mac_biba.c19
-rw-r--r--sys/security/mac_lomac/mac_lomac.c7
-rw-r--r--sys/security/mac_mls/mac_mls.c13
3 files changed, 15 insertions, 24 deletions
diff --git a/sys/security/mac_biba/mac_biba.c b/sys/security/mac_biba/mac_biba.c
index 960591c..6b280cf 100644
--- a/sys/security/mac_biba/mac_biba.c
+++ b/sys/security/mac_biba/mac_biba.c
@@ -121,8 +121,8 @@ SYSCTL_INT(_security_mac_biba, OID_AUTO, max_compartments, CTLFLAG_RD,
&max_compartments, 0, "Maximum supported compartments");
static int ptys_equal = 0;
-SYSCTL_INT(_security_mac_biba, OID_AUTO, ptys_equal, CTLFLAG_RW,
- &ptys_equal, 0, "Label pty devices as biba/equal on create");
+SYSCTL_INT(_security_mac_biba, OID_AUTO, ptys_equal, CTLFLAG_RW, &ptys_equal,
+ 0, "Label pty devices as biba/equal on create");
TUNABLE_INT("security.mac.biba.ptys_equal", &ptys_equal);
static int interfaces_equal;
@@ -638,12 +638,10 @@ biba_parse_element(struct mac_biba_element *element, char *string)
char *compartment, *end, *grade;
int value;
- if (strcmp(string, "high") == 0 ||
- strcmp(string, "hi") == 0) {
+ if (strcmp(string, "high") == 0 || strcmp(string, "hi") == 0) {
element->mbe_type = MAC_BIBA_TYPE_HIGH;
element->mbe_grade = MAC_BIBA_TYPE_UNDEF;
- } else if (strcmp(string, "low") == 0 ||
- strcmp(string, "lo") == 0) {
+ } else if (strcmp(string, "low") == 0 || strcmp(string, "lo") == 0) {
element->mbe_type = MAC_BIBA_TYPE_LOW;
element->mbe_grade = MAC_BIBA_TYPE_UNDEF;
} else if (strcmp(string, "equal") == 0 ||
@@ -665,9 +663,8 @@ biba_parse_element(struct mac_biba_element *element, char *string)
element->mbe_grade = value;
/*
- * Optional compartment piece of the element. If none
- * are included, we assume that the label has no
- * compartments.
+ * Optional compartment piece of the element. If none are
+ * included, we assume that the label has no compartments.
*/
if (string == NULL)
return (0);
@@ -688,8 +685,8 @@ biba_parse_element(struct mac_biba_element *element, char *string)
}
/*
- * Note: destructively consumes the string, make a local copy before
- * calling if that's a problem.
+ * Note: destructively consumes the string, make a local copy before calling
+ * if that's a problem.
*/
static int
biba_parse(struct mac_biba *mb, char *string)
diff --git a/sys/security/mac_lomac/mac_lomac.c b/sys/security/mac_lomac/mac_lomac.c
index 364a22f..25d6273 100644
--- a/sys/security/mac_lomac/mac_lomac.c
+++ b/sys/security/mac_lomac/mac_lomac.c
@@ -727,8 +727,8 @@ lomac_parse_element(struct mac_lomac_element *element, char *string)
} else if (strcmp(string, "low") == 0 || strcmp(string, "lo") == 0) {
element->mle_type = MAC_LOMAC_TYPE_LOW;
element->mle_grade = MAC_LOMAC_TYPE_UNDEF;
- } else if (strcmp(string, "equal") == 0 || strcmp(string, "eq") == 0)
- {
+ } else if (strcmp(string, "equal") == 0 ||
+ strcmp(string, "eq") == 0) {
element->mle_type = MAC_LOMAC_TYPE_EQUAL;
element->mle_grade = MAC_LOMAC_TYPE_UNDEF;
} else {
@@ -817,8 +817,7 @@ lomac_parse(struct mac_lomac *ml, char *string)
}
if (auxsingle != NULL) {
- error = lomac_parse_element(&ml->ml_auxsingle,
- auxsingle);
+ error = lomac_parse_element(&ml->ml_auxsingle, auxsingle);
if (error)
return (error);
ml->ml_flags |= MAC_LOMAC_FLAG_AUX;
diff --git a/sys/security/mac_mls/mac_mls.c b/sys/security/mac_mls/mac_mls.c
index 34c618c..c3b2cda 100644
--- a/sys/security/mac_mls/mac_mls.c
+++ b/sys/security/mac_mls/mac_mls.c
@@ -399,14 +399,12 @@ mls_set_range(struct mac_mls *mm, u_short typelow, u_short levellow,
mm->mm_rangelow.mme_type = typelow;
mm->mm_rangelow.mme_level = levellow;
if (compartmentslow != NULL)
- memcpy(mm->mm_rangelow.mme_compartments,
- compartmentslow,
+ memcpy(mm->mm_rangelow.mme_compartments, compartmentslow,
sizeof(mm->mm_rangelow.mme_compartments));
mm->mm_rangehigh.mme_type = typehigh;
mm->mm_rangehigh.mme_level = levelhigh;
if (compartmentshigh != NULL)
- memcpy(mm->mm_rangehigh.mme_compartments,
- compartmentshigh,
+ memcpy(mm->mm_rangehigh.mme_compartments, compartmentshigh,
sizeof(mm->mm_rangehigh.mme_compartments));
mm->mm_flags |= MAC_MLS_FLAG_RANGE;
}
@@ -689,12 +687,10 @@ mls_parse(struct mac_mls *mm, char *string)
}
if (rangelow != NULL) {
- error = mls_parse_element(&mm->mm_rangelow,
- rangelow);
+ error = mls_parse_element(&mm->mm_rangelow, rangelow);
if (error)
return (error);
- error = mls_parse_element(&mm->mm_rangehigh,
- rangehigh);
+ error = mls_parse_element(&mm->mm_rangehigh, rangehigh);
if (error)
return (error);
mm->mm_flags |= MAC_MLS_FLAG_RANGE;
@@ -736,7 +732,6 @@ mls_copy_label(struct label *src, struct label *dest)
*SLOT(dest) = *SLOT(src);
}
-
/*
* Object-specific entry point implementations are sorted alphabetically by
* object type name and then by operation.
OpenPOWER on IntegriCloud