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: Paul Moore <paul@paul-moore.com>
This commit is contained in:
parent
793f9add02
commit
a32582db36
@ -8,15 +8,13 @@
|
||||
|
||||
/*
|
||||
* Updated: Trusted Computer Solutions, Inc. <dgoeddel@trustedcs.com>
|
||||
*
|
||||
* Support for enhanced MLS infrastructure.
|
||||
*
|
||||
* Updated: Frank Mayer <mayerf@tresys.com> and Karl MacMillan <kmacmillan@tresys.com>
|
||||
*
|
||||
* Added conditional policy language extensions
|
||||
*
|
||||
* Copyright (C) 2004-2005 Trusted Computer Solutions, Inc.
|
||||
* Copyright (C) 2003 - 2004 Tresys Technology, LLC
|
||||
*
|
||||
* Updated: Frank Mayer <mayerf@tresys.com> and
|
||||
* Karl MacMillan <kmacmillan@tresys.com>
|
||||
* Added conditional policy language extensions
|
||||
* Copyright (C) 2003-2004 Tresys Technology, LLC
|
||||
*/
|
||||
|
||||
#ifndef _SS_POLICYDB_H_
|
||||
@ -54,7 +52,7 @@ struct class_datum {
|
||||
char *comkey; /* common name */
|
||||
struct common_datum *comdatum; /* common datum */
|
||||
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 */
|
||||
/* Options how a new object user, role, and type should be decided */
|
||||
#define DEFAULT_SOURCE 1
|
||||
@ -114,7 +112,7 @@ struct type_datum {
|
||||
u32 value; /* internal type value */
|
||||
u32 bounds; /* boundary of type */
|
||||
unsigned char primary; /* primary name? */
|
||||
unsigned char attribute;/* attribute ?*/
|
||||
unsigned char attribute; /* attribute ?*/
|
||||
};
|
||||
|
||||
/* User attributes */
|
||||
@ -126,7 +124,6 @@ struct user_datum {
|
||||
struct mls_level dfltlevel; /* default login MLS level for user */
|
||||
};
|
||||
|
||||
|
||||
/* Sensitivity attributes */
|
||||
struct level_datum {
|
||||
struct mls_level *level; /* sensitivity and associated categories */
|
||||
@ -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_write(struct policydb *p, void *fp);
|
||||
|
||||
extern struct filename_trans_datum *policydb_filenametr_search(
|
||||
struct policydb *p, struct filename_trans_key *key);
|
||||
extern struct filename_trans_datum *
|
||||
policydb_filenametr_search(struct policydb *p, struct filename_trans_key *key);
|
||||
|
||||
extern struct mls_range *policydb_rangetr_search(
|
||||
struct policydb *p, struct range_trans *key);
|
||||
extern struct mls_range *policydb_rangetr_search(struct policydb *p,
|
||||
struct range_trans *key);
|
||||
|
||||
extern struct role_trans_datum *policydb_roletr_search(
|
||||
struct policydb *p, struct role_trans_key *key);
|
||||
extern struct role_trans_datum *
|
||||
policydb_roletr_search(struct policydb *p, struct role_trans_key *key);
|
||||
|
||||
#define POLICYDB_CONFIG_MLS 1
|
||||
|
||||
@ -366,7 +363,8 @@ static inline int next_entry(void *buf, struct policy_file *fp, size_t bytes)
|
||||
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;
|
||||
|
||||
@ -382,7 +380,8 @@ static inline int put_entry(const void *buf, size_t bytes, size_t num, struct po
|
||||
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];
|
||||
}
|
||||
@ -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);
|
||||
|
||||
#endif /* _SS_POLICYDB_H_ */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user