Commit a32582db authored by Paul Moore's avatar Paul Moore

selinux: fix style issues in security/selinux/ss/policydb.h

As part of on ongoing effort to perform more automated testing and
provide more tools for individual developers to validate their
patches before submitting, we are trying to make our code
"clang-format clean".  My hope is that once we have fixed all of our
style "quirks", developers will be able to run clang-format on their
patches to help avoid silly formatting problems and ensure their
changes fit in well with the rest of the SELinux kernel code.
Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
parent 793f9add
...@@ -8,15 +8,13 @@ ...@@ -8,15 +8,13 @@
/* /*
* Updated: Trusted Computer Solutions, Inc. <dgoeddel@trustedcs.com> * Updated: Trusted Computer Solutions, Inc. <dgoeddel@trustedcs.com>
*
* Support for enhanced MLS infrastructure. * Support for enhanced MLS infrastructure.
* Copyright (C) 2004-2005 Trusted Computer Solutions, Inc.
* *
* Updated: Frank Mayer <mayerf@tresys.com> and Karl MacMillan <kmacmillan@tresys.com> * Updated: Frank Mayer <mayerf@tresys.com> and
* * Karl MacMillan <kmacmillan@tresys.com>
* Added conditional policy language extensions * Added conditional policy language extensions
* * Copyright (C) 2003-2004 Tresys Technology, LLC
* Copyright (C) 2004-2005 Trusted Computer Solutions, Inc.
* Copyright (C) 2003 - 2004 Tresys Technology, LLC
*/ */
#ifndef _SS_POLICYDB_H_ #ifndef _SS_POLICYDB_H_
...@@ -54,7 +52,7 @@ struct class_datum { ...@@ -54,7 +52,7 @@ struct class_datum {
char *comkey; /* common name */ char *comkey; /* common name */
struct common_datum *comdatum; /* common datum */ struct common_datum *comdatum; /* common datum */
struct symtab permissions; /* class-specific permission symbol table */ struct symtab permissions; /* class-specific permission symbol table */
struct constraint_node *constraints; /* constraints on class permissions */ struct constraint_node *constraints; /* constraints on class perms */
struct constraint_node *validatetrans; /* special transition rules */ struct constraint_node *validatetrans; /* special transition rules */
/* Options how a new object user, role, and type should be decided */ /* Options how a new object user, role, and type should be decided */
#define DEFAULT_SOURCE 1 #define DEFAULT_SOURCE 1
...@@ -114,7 +112,7 @@ struct type_datum { ...@@ -114,7 +112,7 @@ struct type_datum {
u32 value; /* internal type value */ u32 value; /* internal type value */
u32 bounds; /* boundary of type */ u32 bounds; /* boundary of type */
unsigned char primary; /* primary name? */ unsigned char primary; /* primary name? */
unsigned char attribute;/* attribute ?*/ unsigned char attribute; /* attribute ?*/
}; };
/* User attributes */ /* User attributes */
...@@ -126,7 +124,6 @@ struct user_datum { ...@@ -126,7 +124,6 @@ struct user_datum {
struct mls_level dfltlevel; /* default login MLS level for user */ struct mls_level dfltlevel; /* default login MLS level for user */
}; };
/* Sensitivity attributes */ /* Sensitivity attributes */
struct level_datum { struct level_datum {
struct mls_level *level; /* sensitivity and associated categories */ struct mls_level *level; /* sensitivity and associated categories */
...@@ -324,14 +321,14 @@ extern int policydb_role_isvalid(struct policydb *p, unsigned int role); ...@@ -324,14 +321,14 @@ extern int policydb_role_isvalid(struct policydb *p, unsigned int role);
extern int policydb_read(struct policydb *p, void *fp); extern int policydb_read(struct policydb *p, void *fp);
extern int policydb_write(struct policydb *p, void *fp); extern int policydb_write(struct policydb *p, void *fp);
extern struct filename_trans_datum *policydb_filenametr_search( extern struct filename_trans_datum *
struct policydb *p, struct filename_trans_key *key); policydb_filenametr_search(struct policydb *p, struct filename_trans_key *key);
extern struct mls_range *policydb_rangetr_search( extern struct mls_range *policydb_rangetr_search(struct policydb *p,
struct policydb *p, struct range_trans *key); struct range_trans *key);
extern struct role_trans_datum *policydb_roletr_search( extern struct role_trans_datum *
struct policydb *p, struct role_trans_key *key); policydb_roletr_search(struct policydb *p, struct role_trans_key *key);
#define POLICYDB_CONFIG_MLS 1 #define POLICYDB_CONFIG_MLS 1
...@@ -366,7 +363,8 @@ static inline int next_entry(void *buf, struct policy_file *fp, size_t bytes) ...@@ -366,7 +363,8 @@ static inline int next_entry(void *buf, struct policy_file *fp, size_t bytes)
return 0; return 0;
} }
static inline int put_entry(const void *buf, size_t bytes, size_t num, struct policy_file *fp) static inline int put_entry(const void *buf, size_t bytes, size_t num,
struct policy_file *fp)
{ {
size_t len; size_t len;
...@@ -382,7 +380,8 @@ static inline int put_entry(const void *buf, size_t bytes, size_t num, struct po ...@@ -382,7 +380,8 @@ static inline int put_entry(const void *buf, size_t bytes, size_t num, struct po
return 0; return 0;
} }
static inline char *sym_name(struct policydb *p, unsigned int sym_num, unsigned int element_nr) static inline char *sym_name(struct policydb *p, unsigned int sym_num,
unsigned int element_nr)
{ {
return p->sym_val_to_name[sym_num][element_nr]; return p->sym_val_to_name[sym_num][element_nr];
} }
...@@ -391,4 +390,3 @@ extern u16 string_to_security_class(struct policydb *p, const char *name); ...@@ -391,4 +390,3 @@ extern u16 string_to_security_class(struct policydb *p, const char *name);
extern u32 string_to_av_perm(struct policydb *p, u16 tclass, const char *name); extern u32 string_to_av_perm(struct policydb *p, u16 tclass, const char *name);
#endif /* _SS_POLICYDB_H_ */ #endif /* _SS_POLICYDB_H_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment