Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Want audit events for auditon(A_SETPMASK) and friends #195

Open
arekinath opened this issue Sep 30, 2019 · 2 comments
Open

Want audit events for auditon(A_SETPMASK) and friends #195

arekinath opened this issue Sep 30, 2019 · 2 comments

Comments

@arekinath
Copy link

There are a number of auditon() calls which let you opt out of auditing at present (e.g. auditon(A_SETPMASK) which lets you opt a different process out of auditing!) which do not produce audit events.

We should produce audit events when these are called.

@arekinath
Copy link
Author

Gerrit CR: https://cr.joyent.us/#/c/6904/

@arekinath
Copy link
Author

arekinath commented Sep 30, 2019

Testing done so far:

  • Built new PI from clobber with the patch
  • Booted new PI on a test machine
  • Verified that "auditconfig -setpmask $$ as,lo" now produces an audit event
  • Verified that "praudit" prints the new audit event properly
  • Verified that removing the "as" class causes the new event for setpmask to be suppressed
  • Verified that "auditconfig -setkmask" now produces an event
  • Verified that adding the "aa" class causes events from "auditconfig -getkmask" and "auditconfig -getpinfo" to be produced, and that removing it suppresses them

Example praudit XML output:

<record version="2" event="auditon(2) - set kernel mask" modifier="sp" host="90-e2-ba-d3-ec-a0" iso8601="2019-09-30 07:27:31.780 +00:00">
  <argument arg-num="2" value="0x21000" desc="setkmask:as_success"/>
  <argument arg-num="2" value="0x21000" desc="setkmask:as_failure"/>
  <subject audit-uid="root" uid="root" gid="root" ruid="root" rgid="root" pid="12583" sid="3441870303" tid="3245 71168 10.33.1.141"/>
  <use_of_privilege result="successful use of priv">sys_audit</use_of_privilege>
  <return errval="success" retval="0"/>
  <zone name="global"/>
</record>
<record version="2" event="auditon(2) - set process preselection mask" modifier="sp" host="90-e2-ba-d3-ec-a0" iso8601="2019-09-30 07:44:56.165 +00:00">
  <argument arg-num="3" value="0x2e67" desc="setpmask:pid"/>
  <argument arg-num="3" value="0x40221022" desc="setpmask:as_success"/>
  <argument arg-num="3" value="0x40221022" desc="setpmask:as_failure"/>
  <subject audit-uid="root" uid="root" gid="root" ruid="root" rgid="root" pid="13104" sid="3441870303" tid="3245 71168 10.33.1.141"/>
  <use_of_privilege result="successful use of priv">sys_audit</use_of_privilege>
  <return errval="success" retval="0"/>
  <zone name="global"/>
</record>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant