Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bd5e50f9 authored by Eric Paris's avatar Eric Paris
Browse files

LSM: remove the COMMON_AUDIT_DATA_INIT type expansion



Just open code it so grep on the source code works better.

Signed-off-by: default avatarEric Paris <eparis@redhat.com>
parent d4cf970d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -96,7 +96,7 @@ int ipv6_skb_to_auditdata(struct sk_buff *skb,
/* Initialize an LSM audit data structure. */
#define COMMON_AUDIT_DATA_INIT(_d, _t) \
	{ memset((_d), 0, sizeof(struct common_audit_data)); \
	 (_d)->type = LSM_AUDIT_DATA_##_t; }
	 (_d)->type = _t; }

void common_lsm_audit(struct common_audit_data *a,
	void (*pre_audit)(struct audit_buffer *, void *),
+1 −1
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@ static int audit_caps(struct aa_profile *profile, struct task_struct *task,
	int type = AUDIT_APPARMOR_AUTO;
	struct common_audit_data sa;
	struct apparmor_audit_data aad = {0,};
	COMMON_AUDIT_DATA_INIT(&sa, CAP);
	COMMON_AUDIT_DATA_INIT(&sa, LSM_AUDIT_DATA_CAP);
	sa.aad = &aad;
	sa.tsk = task;
	sa.u.cap = cap;
+1 −1
Original line number Diff line number Diff line
@@ -108,7 +108,7 @@ int aa_audit_file(struct aa_profile *profile, struct file_perms *perms,
	int type = AUDIT_APPARMOR_AUTO;
	struct common_audit_data sa;
	struct apparmor_audit_data aad = {0,};
	COMMON_AUDIT_DATA_INIT(&sa, NONE);
	COMMON_AUDIT_DATA_INIT(&sa, LSM_AUDIT_DATA_NONE);
	sa.aad = &aad;
	aad.op = op,
	aad.fs.request = request;
+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ static int aa_audit_ptrace(struct aa_profile *profile,
{
	struct common_audit_data sa;
	struct apparmor_audit_data aad = {0,};
	COMMON_AUDIT_DATA_INIT(&sa, NONE);
	COMMON_AUDIT_DATA_INIT(&sa, LSM_AUDIT_DATA_NONE);
	sa.aad = &aad;
	aad.op = OP_PTRACE;
	aad.target = target;
+1 −1
Original line number Diff line number Diff line
@@ -66,7 +66,7 @@ void aa_info_message(const char *str)
	if (audit_enabled) {
		struct common_audit_data sa;
		struct apparmor_audit_data aad = {0,};
		COMMON_AUDIT_DATA_INIT(&sa, NONE);
		COMMON_AUDIT_DATA_INIT(&sa, LSM_AUDIT_DATA_NONE);
		sa.aad = &aad;
		aad.info = str;
		aa_audit_msg(AUDIT_APPARMOR_STATUS, &sa, NULL);
Loading