aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/ss
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2008-05-14 11:27:45 -0400
committerJames Morris <jmorris@namei.org>2008-07-14 01:01:36 -0400
commitf5269710789f666a65cf1132c4f1d14fbc8d3c29 (patch)
tree8c61f74cb04505e3f16483baf1d7113e750968d7 /security/selinux/ss
parent9a59daa03df72526d234b91dd3e32ded5aebd3ef (diff)
SELinux: keep the code clean formating and syntax
Formatting and syntax changes whitespace, tabs to spaces, trailing space put open { on same line as struct def remove unneeded {} after if statements change printk("Lu") to printk("llu") convert asm/uaccess.h to linux/uaacess.h includes remove unnecessary asm/bug.h includes convert all users of simple_strtol to strict_strtol Signed-off-by: Eric Paris <eparis@redhat.com> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/selinux/ss')
-rw-r--r--security/selinux/ss/avtab.c2
-rw-r--r--security/selinux/ss/mls.c8
-rw-r--r--security/selinux/ss/services.c4
3 files changed, 7 insertions, 7 deletions
diff --git a/security/selinux/ss/avtab.c b/security/selinux/ss/avtab.c
index 9e6626362bfd..a1be97f8beea 100644
--- a/security/selinux/ss/avtab.c
+++ b/security/selinux/ss/avtab.c
@@ -311,7 +311,7 @@ void avtab_hash_eval(struct avtab *h, char *tag)
311 } 311 }
312 312
313 printk(KERN_DEBUG "SELinux: %s: %d entries and %d/%d buckets used, " 313 printk(KERN_DEBUG "SELinux: %s: %d entries and %d/%d buckets used, "
314 "longest chain length %d sum of chain length^2 %Lu\n", 314 "longest chain length %d sum of chain length^2 %llu\n",
315 tag, h->nel, slots_used, h->nslot, max_chain_len, 315 tag, h->nel, slots_used, h->nslot, max_chain_len,
316 chain2_len_sum); 316 chain2_len_sum);
317} 317}
diff --git a/security/selinux/ss/mls.c b/security/selinux/ss/mls.c
index a6ca0587e634..77d745da48bb 100644
--- a/security/selinux/ss/mls.c
+++ b/security/selinux/ss/mls.c
@@ -437,13 +437,13 @@ int mls_setup_user_range(struct context *fromcon, struct user_datum *user,
437 struct mls_level *usercon_clr = &(usercon->range.level[1]); 437 struct mls_level *usercon_clr = &(usercon->range.level[1]);
438 438
439 /* Honor the user's default level if we can */ 439 /* Honor the user's default level if we can */
440 if (mls_level_between(user_def, fromcon_sen, fromcon_clr)) { 440 if (mls_level_between(user_def, fromcon_sen, fromcon_clr))
441 *usercon_sen = *user_def; 441 *usercon_sen = *user_def;
442 } else if (mls_level_between(fromcon_sen, user_def, user_clr)) { 442 else if (mls_level_between(fromcon_sen, user_def, user_clr))
443 *usercon_sen = *fromcon_sen; 443 *usercon_sen = *fromcon_sen;
444 } else if (mls_level_between(fromcon_clr, user_low, user_def)) { 444 else if (mls_level_between(fromcon_clr, user_low, user_def))
445 *usercon_sen = *user_low; 445 *usercon_sen = *user_low;
446 } else 446 else
447 return -EINVAL; 447 return -EINVAL;
448 448
449 /* Lower the clearance of available contexts 449 /* Lower the clearance of available contexts
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c
index 2d5e5a3a8aa9..0696aadcab6f 100644
--- a/security/selinux/ss/services.c
+++ b/security/selinux/ss/services.c
@@ -2531,7 +2531,7 @@ int selinux_audit_rule_known(struct audit_krule *rule)
2531} 2531}
2532 2532
2533int selinux_audit_rule_match(u32 sid, u32 field, u32 op, void *vrule, 2533int selinux_audit_rule_match(u32 sid, u32 field, u32 op, void *vrule,
2534 struct audit_context *actx) 2534 struct audit_context *actx)
2535{ 2535{
2536 struct context *ctxt; 2536 struct context *ctxt;
2537 struct mls_level *level; 2537 struct mls_level *level;
@@ -2645,7 +2645,7 @@ out:
2645static int (*aurule_callback)(void) = audit_update_lsm_rules; 2645static int (*aurule_callback)(void) = audit_update_lsm_rules;
2646 2646
2647static int aurule_avc_callback(u32 event, u32 ssid, u32 tsid, 2647static int aurule_avc_callback(u32 event, u32 ssid, u32 tsid,
2648 u16 class, u32 perms, u32 *retained) 2648 u16 class, u32 perms, u32 *retained)
2649{ 2649{
2650 int err = 0; 2650 int err = 0;
2651 2651