All of lore.kernel.org
 help / color / mirror / Atom feed
* av_decision on audit callback
@ 2015-10-02 18:48 Roberts, William C
  2015-10-02 18:54 ` Stephen Smalley
  0 siblings, 1 reply; 8+ messages in thread
From: Roberts, William C @ 2015-10-02 18:48 UTC (permalink / raw)
  To: seandroid-list@tycho.nsa.gov, selinux@tycho.nsa.gov
  Cc: Stephen Smalley, Daniel Cashman

[-- Attachment #1: Type: text/plain, Size: 1058 bytes --]

I would like to be able to gather the result of permissive mode per domain from a check_access() call for the userspace object managers on Android.

>From what I can tell check_access() calls avc_has_perm with a NULL 5th argument. That argument is for the struct avc_entry_ref.

That structure has a pointer to an opaque type, avc_entry. Which contains struct av_decision.

Which contains flags that have a permissive flag:

struct av_decision {
        access_vector_t allowed;
        access_vector_t decided;
        access_vector_t auditallow;
        access_vector_t auditdeny;
        unsigned int seqno;
        unsigned int flags;
};

/* Definitions of av_decision.flags */
#define SELINUX_AVD_FLAGS_PERMISSIVE    0x0001

It looks like if check_access just passes this structure and then avc_has_perm() when it calls avc_audit, it could supply the av_decision structure to the avc_suppl_audit() call. We could then have an audit2 callback that takes this parameter.

Is this mostly right, seem sane? Better way to do this?



[-- Attachment #2: Type: text/html, Size: 5858 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-10-02 20:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-02 18:48 av_decision on audit callback Roberts, William C
2015-10-02 18:54 ` Stephen Smalley
2015-10-02 19:12   ` Stephen Smalley
2015-10-02 20:07     ` Roberts, William C
2015-10-02 20:13       ` Stephen Smalley
2015-10-02 20:22         ` Roberts, William C
2015-10-02 20:26           ` Stephen Smalley
2015-10-02 20:29             ` Roberts, William C

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.