security: clean up empty lines in .c and .h files

This commit is contained in:
Mateusz Guzik 2020-09-01 21:26:00 +00:00
parent 7c8e2a57dd
commit e5ecee7440
13 changed files with 4 additions and 22 deletions

View File

@ -318,7 +318,6 @@ kau_free(struct au_record *rec)
} \
} while (0)
/*
* Implement auditing for the auditon() system call. The audit tokens that
* are generated depend on the command that was sent into the auditon()

View File

@ -383,7 +383,6 @@ dtaudit_au_evnamemap_callback(struct evname_elem *ene)
if ((ene->ene_commit_probe_id == 0) &&
(dtrace_probe_lookup(dtaudit_id, dtaudit_module_str,
ene_name_lower, dtaudit_name_commit_str) == 0)) {
/*
* Create the commit probe.
*
@ -413,7 +412,6 @@ dtaudit_au_evnamemap_callback(struct evname_elem *ene)
if ((ene->ene_bsm_probe_id == 0) &&
(dtrace_probe_lookup(dtaudit_id, dtaudit_module_str,
ene_name_lower, dtaudit_name_bsm_str) == 0)) {
/*
* Create the bsm probe.
*

View File

@ -90,7 +90,6 @@ sys_audit(struct thread *td, struct audit_args *uap)
* commit the user audit record.
*/
if (ar == NULL) {
/*
* This is not very efficient; we're required to allocate a
* complete kernel audit record just so the user record can

View File

@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$");
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <bsm/audit.h>
#include <bsm/audit_internal.h>
#include <bsm/audit_record.h>
@ -342,7 +341,6 @@ au_to_data(char unit_print, char unit_type, char unit_count, const char *p)
return (t);
}
/*
* token ID 1 byte
* status 4 bytes

View File

@ -160,7 +160,6 @@ struct label {
intptr_t l_perpolicy[MAC_MAX_SLOTS];
};
/*
* Flags for mac_labeled, a bitmask of object types need across the union of
* all policies currently registered with the MAC Framework, used to key

View File

@ -93,7 +93,6 @@ mac_destroy_label(struct label *label)
#endif
}
static int
mac_labelzone_ctor(void *mem, int size, void *arg, int flags)
{

View File

@ -275,7 +275,7 @@ mac_socketpeer_set_from_mbuf(struct mbuf *m, struct socket *so)
void
mac_socketpeer_set_from_socket(struct socket *oldso, struct socket *newso)
{
if (mac_policy_count == 0)
return;

View File

@ -2745,7 +2745,7 @@ biba_sysvshm_check_shmat(struct ucred *cred, struct shmid_kernel *shmsegptr,
if (!biba_dominate_effective(subj, obj))
return (EACCES);
}
return (0);
}

View File

@ -731,7 +731,7 @@ lomac_parse_element(struct mac_lomac_element *element, char *string)
p0 = string;
d = strtol(p0, &p1, 10);
if (d < 0 || d > 65535)
return (EINVAL);
element->mle_type = MAC_LOMAC_TYPE_GRADE;

View File

@ -2378,7 +2378,7 @@ mls_sysvshm_check_shmat(struct ucred *cred, struct shmid_kernel *shmsegptr,
if (!mls_dominate_effective(obj, subj))
return (EACCES);
}
return (0);
}
@ -3372,7 +3372,6 @@ static struct mac_policy_ops mls_ops =
.mpo_sysvshm_destroy_label = mls_destroy_label,
.mpo_sysvshm_init_label = mls_init_label,
.mpo_system_check_acct = mls_system_check_acct,
.mpo_system_check_auditctl = mls_system_check_auditctl,
.mpo_system_check_swapon = mls_system_check_swapon,

View File

@ -1181,7 +1181,6 @@ stub_sysvmsq_check_msgrcv(struct ucred *cred, struct msg *msgptr,
return (0);
}
static int
stub_sysvmsq_check_msgrmid(struct ucred *cred, struct msg *msgptr,
struct label *msglabel)
@ -1190,7 +1189,6 @@ stub_sysvmsq_check_msgrmid(struct ucred *cred, struct msg *msgptr,
return (0);
}
static int
stub_sysvmsq_check_msqget(struct ucred *cred, struct msqid_kernel *msqkptr,
struct label *msqklabel)
@ -1199,7 +1197,6 @@ stub_sysvmsq_check_msqget(struct ucred *cred, struct msqid_kernel *msqkptr,
return (0);
}
static int
stub_sysvmsq_check_msqsnd(struct ucred *cred, struct msqid_kernel *msqkptr,
struct label *msqklabel)
@ -1216,7 +1213,6 @@ stub_sysvmsq_check_msqrcv(struct ucred *cred, struct msqid_kernel *msqkptr,
return (0);
}
static int
stub_sysvmsq_check_msqctl(struct ucred *cred, struct msqid_kernel *msqkptr,
struct label *msqklabel, int cmd)
@ -1225,7 +1221,6 @@ stub_sysvmsq_check_msqctl(struct ucred *cred, struct msqid_kernel *msqkptr,
return (0);
}
static void
stub_sysvmsq_cleanup(struct label *msqlabel)
{
@ -1255,7 +1250,6 @@ stub_sysvsem_check_semget(struct ucred *cred, struct semid_kernel *semakptr,
return (0);
}
static int
stub_sysvsem_check_semop(struct ucred *cred, struct semid_kernel *semakptr,
struct label *semaklabel, size_t accesstype)
@ -1301,7 +1295,6 @@ stub_sysvshm_check_shmdt(struct ucred *cred, struct shmid_kernel *shmsegptr,
return (0);
}
static int
stub_sysvshm_check_shmget(struct ucred *cred, struct shmid_kernel *shmsegptr,
struct label *shmseglabel, int shmflg)

View File

@ -773,7 +773,6 @@ mac_veriexec_metadata_get_file_info(dev_t fsid, long fileid, unsigned long gen,
return (ip);
}
/**
* @brief Intialize the meta-data store
*/

View File

@ -233,7 +233,6 @@ verify_digest(const char *data, size_t len, const unsigned char *expected_hash)
return (memcmp(expected_hash, hash, SHA256_DIGEST_LENGTH));
}
static int
open_file(const char *path, struct nameidata *nid)
{