mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-14 18:14:48 +00:00
libsepol: resolve missing prototypes
Declare the functions as static or include the corresponding header file. assertion.c:294:5: error: no previous prototype for function 'report_assertion_failures' [-Werror,-Wmissing-prototypes] int report_assertion_failures(sepol_handle_t *handle, policydb_t *p, avrule_t *avrule) ^ context.c:23:5: error: no previous prototype for function 'sepol_check_context' [-Werror,-Wmissing-prototypes] int sepol_check_context(const char *context) ^ expand.c:3377:5: error: no previous prototype for function 'expand_cond_av_node' [-Werror,-Wmissing-prototypes] int expand_cond_av_node(policydb_t * p, ^ policydb.c:638:6: error: no previous prototype for function 'role_trans_rule_destroy' [-Werror,-Wmissing-prototypes] void role_trans_rule_destroy(role_trans_rule_t * x) ^ policydb.c:1169:5: error: no previous prototype for function 'policydb_index_decls' [-Werror,-Wmissing-prototypes] int policydb_index_decls(sepol_handle_t * handle, policydb_t * p) ^ policydb.c:1429:6: error: no previous prototype for function 'ocontext_selinux_free' [-Werror,-Wmissing-prototypes] void ocontext_selinux_free(ocontext_t **ocontexts) ^ policydb.c:1451:6: error: no previous prototype for function 'ocontext_xen_free' [-Werror,-Wmissing-prototypes] void ocontext_xen_free(ocontext_t **ocontexts) ^ policydb.c:1750:5: error: no previous prototype for function 'type_set_or' [-Werror,-Wmissing-prototypes] int type_set_or(type_set_t * dst, type_set_t * a, type_set_t * b) ^ policydb.c:2524:5: error: no previous prototype for function 'role_trans_read' [-Werror,-Wmissing-prototypes] int role_trans_read(policydb_t *p, struct policy_file *fp) ^ policydb.c:2567:5: error: no previous prototype for function 'role_allow_read' [-Werror,-Wmissing-prototypes] int role_allow_read(role_allow_t ** r, struct policy_file *fp) ^ policydb.c:2842:5: error: no previous prototype for function 'filename_trans_read' [-Werror,-Wmissing-prototypes] int filename_trans_read(policydb_t *p, struct policy_file *fp) ^ services.c:1027:5: error: no previous prototype for function 'sepol_validate_transition' [-Werror,-Wmissing-prototypes] int sepol_validate_transition(sepol_security_id_t oldsid, ^ Signed-off-by: Christian Göttsche <cgzones@googlemail.com> Acked-by: James Carter <jwcart2@gmail.com>
This commit is contained in:
parent
2cb6bacddc
commit
9ec061b61c
@ -291,7 +291,7 @@ exit:
|
||||
return rc;
|
||||
}
|
||||
|
||||
int report_assertion_failures(sepol_handle_t *handle, policydb_t *p, avrule_t *avrule)
|
||||
static int report_assertion_failures(sepol_handle_t *handle, policydb_t *p, avrule_t *avrule)
|
||||
{
|
||||
int rc;
|
||||
struct avtab_match_args args;
|
||||
|
@ -1,6 +1,7 @@
|
||||
#ifndef _SEPOL_CONTEXT_INTERNAL_H_
|
||||
#define _SEPOL_CONTEXT_INTERNAL_H_
|
||||
|
||||
#include <sepol/context.h>
|
||||
#include <sepol/context_record.h>
|
||||
|
||||
#endif
|
||||
|
@ -3374,9 +3374,9 @@ static int expand_cond_insert(cond_av_list_t ** l,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int expand_cond_av_node(policydb_t * p,
|
||||
avtab_ptr_t node,
|
||||
cond_av_list_t ** newl, avtab_t * expa)
|
||||
static int expand_cond_av_node(policydb_t * p,
|
||||
avtab_ptr_t node,
|
||||
cond_av_list_t ** newl, avtab_t * expa)
|
||||
{
|
||||
avtab_key_t *k = &node->key;
|
||||
avtab_datum_t *d = &node->datum;
|
||||
|
@ -635,7 +635,7 @@ void role_trans_rule_init(role_trans_rule_t * x)
|
||||
ebitmap_init(&x->classes);
|
||||
}
|
||||
|
||||
void role_trans_rule_destroy(role_trans_rule_t * x)
|
||||
static void role_trans_rule_destroy(role_trans_rule_t * x)
|
||||
{
|
||||
if (x != NULL) {
|
||||
role_set_destroy(&x->roles);
|
||||
@ -1166,7 +1166,7 @@ int policydb_index_bools(policydb_t * p)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int policydb_index_decls(sepol_handle_t * handle, policydb_t * p)
|
||||
static int policydb_index_decls(sepol_handle_t * handle, policydb_t * p)
|
||||
{
|
||||
avrule_block_t *curblock;
|
||||
avrule_decl_t *decl;
|
||||
@ -1426,7 +1426,7 @@ static int range_tr_destroy(hashtab_key_t key, hashtab_datum_t datum,
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ocontext_selinux_free(ocontext_t **ocontexts)
|
||||
static void ocontext_selinux_free(ocontext_t **ocontexts)
|
||||
{
|
||||
ocontext_t *c, *ctmp;
|
||||
int i;
|
||||
@ -1448,7 +1448,7 @@ void ocontext_selinux_free(ocontext_t **ocontexts)
|
||||
}
|
||||
}
|
||||
|
||||
void ocontext_xen_free(ocontext_t **ocontexts)
|
||||
static void ocontext_xen_free(ocontext_t **ocontexts)
|
||||
{
|
||||
ocontext_t *c, *ctmp;
|
||||
int i;
|
||||
@ -1747,7 +1747,7 @@ int symtab_insert(policydb_t * pol, uint32_t sym,
|
||||
return retval;
|
||||
}
|
||||
|
||||
int type_set_or(type_set_t * dst, type_set_t * a, type_set_t * b)
|
||||
static int type_set_or(type_set_t * dst, type_set_t * a, type_set_t * b)
|
||||
{
|
||||
type_set_init(dst);
|
||||
|
||||
@ -2521,7 +2521,7 @@ static int type_read(policydb_t * p, hashtab_t h, struct policy_file *fp)
|
||||
return -1;
|
||||
}
|
||||
|
||||
int role_trans_read(policydb_t *p, struct policy_file *fp)
|
||||
static int role_trans_read(policydb_t *p, struct policy_file *fp)
|
||||
{
|
||||
role_trans_t **t = &p->role_tr;
|
||||
unsigned int i;
|
||||
@ -2564,7 +2564,7 @@ int role_trans_read(policydb_t *p, struct policy_file *fp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int role_allow_read(role_allow_t ** r, struct policy_file *fp)
|
||||
static int role_allow_read(role_allow_t ** r, struct policy_file *fp)
|
||||
{
|
||||
unsigned int i;
|
||||
uint32_t buf[2], nel;
|
||||
@ -2839,7 +2839,7 @@ err:
|
||||
return -1;
|
||||
}
|
||||
|
||||
int filename_trans_read(policydb_t *p, struct policy_file *fp)
|
||||
static int filename_trans_read(policydb_t *p, struct policy_file *fp)
|
||||
{
|
||||
unsigned int i;
|
||||
uint32_t buf[1], nel;
|
||||
|
@ -1024,7 +1024,7 @@ static int context_struct_compute_av(context_struct_t * scontext,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sepol_validate_transition(sepol_security_id_t oldsid,
|
||||
static int sepol_validate_transition(sepol_security_id_t oldsid,
|
||||
sepol_security_id_t newsid,
|
||||
sepol_security_id_t tasksid,
|
||||
sepol_security_class_t tclass)
|
||||
|
Loading…
Reference in New Issue
Block a user