Bug 228470 - struct auditpipe_ioctl_preselect's fields not defined in the same header file
Summary: struct auditpipe_ioctl_preselect's fields not defined in the same header file
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2018-05-24 19:07 UTC by Aniket Pandey
Modified: 2018-07-11 19:47 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aniket Pandey 2018-05-24 19:07:27 UTC
The argument for auditpipe(4)'s "AUDITPIPE_GET_PRESELECT_AUID" request is a data structure of type "struct auditpipe_ioctl_preselect" whose fields are not defined within the same header file. i.e "security/audit/audit_ioctl.h"

Here:

struct auditpipe_ioctl_preselect {
	au_id_t		aip_auid;
	au_mask_t	aip_mask;
};

has the data types "au_id_t" and "au_mask_t" whose definitions are present in "bsm/audit.h". So it would be appropriate to move the definitions there and include "bsm/audit.h" within "security/audit/audit_ioctl.h"

Differential Revision: review D15561
Comment 1 commit-hook freebsd_committer freebsd_triage 2018-05-30 21:50:30 UTC
A commit references this bug:

Author: asomers
Date: Wed May 30 21:50:23 UTC 2018
New revision: 334403
URL: https://svnweb.freebsd.org/changeset/base/334403

Log:
  #include <bsm/audit.h> in security/audit/audit_ioctl.h

  security/audit/audit_ioctl.h uses a type from bsm/audit.h, so needs to
  include it.  And it needs to know the type's size, so it can't just
  forward-declare.

  PR:		228470
  Submitted by:	aniketp
  MFC after:	2 weeks
  Sponsored by:	Google, Inc. (GSoC 2018)
  Differential Revision:	https://reviews.freebsd.org/D15561

Changes:
  head/sys/security/audit/audit_ioctl.h
Comment 2 commit-hook freebsd_committer freebsd_triage 2018-07-11 19:47:30 UTC
A commit references this bug:

Author: asomers
Date: Wed Jul 11 19:46:57 UTC 2018
New revision: 336210
URL: https://svnweb.freebsd.org/changeset/base/336210

Log:
  MFC r334403:

  #include <bsm/audit.h> in security/audit/audit_ioctl.h

  security/audit/audit_ioctl.h uses a type from bsm/audit.h, so needs to
  include it.  And it needs to know the type's size, so it can't just
  forward-declare.

  PR:		228470
  Submitted by:	aniketp
  Sponsored by:	Google, Inc. (GSoC 2018)
  Differential Revision:	https://reviews.freebsd.org/D15561

Changes:
_U  stable/11/
  stable/11/sys/security/audit/audit_ioctl.h