~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/security/selinux/include/audit.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /security/selinux/include/audit.h (Version linux-6.11.5) and /security/selinux/include/audit.h (Version linux-4.15.18)


  1 /* SPDX-License-Identifier: GPL-2.0-only */    << 
  2 /*                                                  1 /*
  3  * SELinux support for the Audit LSM hooks          2  * SELinux support for the Audit LSM hooks
  4  *                                                  3  *
                                                   >>   4  * Most of below header was moved from include/linux/selinux.h which
                                                   >>   5  * is released under below copyrights:
                                                   >>   6  *
  5  * Author: James Morris <jmorris@redhat.com>        7  * Author: James Morris <jmorris@redhat.com>
  6  *                                                  8  *
  7  * Copyright (C) 2005 Red Hat, Inc., James Mor      9  * Copyright (C) 2005 Red Hat, Inc., James Morris <jmorris@redhat.com>
  8  * Copyright (C) 2006 Trusted Computer Solutio     10  * Copyright (C) 2006 Trusted Computer Solutions, Inc. <dgoeddel@trustedcs.com>
  9  * Copyright (C) 2006 IBM Corporation, Timothy     11  * Copyright (C) 2006 IBM Corporation, Timothy R. Chavez <tinytim@us.ibm.com>
                                                   >>  12  *
                                                   >>  13  * This program is free software; you can redistribute it and/or modify
                                                   >>  14  * it under the terms of the GNU General Public License version 2,
                                                   >>  15  * as published by the Free Software Foundation.
 10  */                                                16  */
 11                                                    17 
 12 #ifndef _SELINUX_AUDIT_H                           18 #ifndef _SELINUX_AUDIT_H
 13 #define _SELINUX_AUDIT_H                           19 #define _SELINUX_AUDIT_H
 14                                                    20 
 15 #include <linux/audit.h>                       << 
 16 #include <linux/types.h>                       << 
 17                                                << 
 18 /**                                                21 /**
 19  *      selinux_audit_rule_init - alloc/init a     22  *      selinux_audit_rule_init - alloc/init an selinux audit rule structure.
 20  *      @field: the field this rule refers to      23  *      @field: the field this rule refers to
 21  *      @op: the operator the rule uses        !!  24  *      @op: the operater the rule uses
 22  *      @rulestr: the text "target" of the rul     25  *      @rulestr: the text "target" of the rule
 23  *      @rule: pointer to the new rule structu     26  *      @rule: pointer to the new rule structure returned via this
 24  *      @gfp: GFP flag used for kmalloc        << 
 25  *                                                 27  *
 26  *      Returns 0 if successful, -errno if not     28  *      Returns 0 if successful, -errno if not.  On success, the rule structure
 27  *      will be allocated internally.  The cal     29  *      will be allocated internally.  The caller must free this structure with
 28  *      selinux_audit_rule_free() after use.       30  *      selinux_audit_rule_free() after use.
 29  */                                                31  */
 30 int selinux_audit_rule_init(u32 field, u32 op, !!  32 int selinux_audit_rule_init(u32 field, u32 op, char *rulestr, void **rule);
 31                             gfp_t gfp);        << 
 32                                                    33 
 33 /**                                                34 /**
 34  *      selinux_audit_rule_free - free an seli     35  *      selinux_audit_rule_free - free an selinux audit rule structure.
 35  *      @rule: pointer to the audit rule to be     36  *      @rule: pointer to the audit rule to be freed
 36  *                                                 37  *
 37  *      This will free all memory associated w     38  *      This will free all memory associated with the given rule.
 38  *      If @rule is NULL, no operation is perf     39  *      If @rule is NULL, no operation is performed.
 39  */                                                40  */
 40 void selinux_audit_rule_free(void *rule);          41 void selinux_audit_rule_free(void *rule);
 41                                                    42 
 42 /**                                                43 /**
 43  *      selinux_audit_rule_match - determine i     44  *      selinux_audit_rule_match - determine if a context ID matches a rule.
 44  *      @sid: the context ID to check              45  *      @sid: the context ID to check
 45  *      @field: the field this rule refers to      46  *      @field: the field this rule refers to
 46  *      @op: the operator the rule uses        !!  47  *      @op: the operater the rule uses
 47  *      @rule: pointer to the audit rule to ch     48  *      @rule: pointer to the audit rule to check against
                                                   >>  49  *      @actx: the audit context (can be NULL) associated with the check
 48  *                                                 50  *
 49  *      Returns 1 if the context id matches th     51  *      Returns 1 if the context id matches the rule, 0 if it does not, and
 50  *      -errno on failure.                         52  *      -errno on failure.
 51  */                                                53  */
 52 int selinux_audit_rule_match(u32 sid, u32 fiel !!  54 int selinux_audit_rule_match(u32 sid, u32 field, u32 op, void *rule,
                                                   >>  55                              struct audit_context *actx);
 53                                                    56 
 54 /**                                                57 /**
 55  *      selinux_audit_rule_known - check to se     58  *      selinux_audit_rule_known - check to see if rule contains selinux fields.
 56  *      @rule: rule to be checked                  59  *      @rule: rule to be checked
 57  *      Returns 1 if there are selinux fields      60  *      Returns 1 if there are selinux fields specified in the rule, 0 otherwise.
 58  */                                                61  */
 59 int selinux_audit_rule_known(struct audit_krul !!  62 int selinux_audit_rule_known(struct audit_krule *krule);
 60                                                    63 
 61 #endif /* _SELINUX_AUDIT_H */                      64 #endif /* _SELINUX_AUDIT_H */
                                                   >>  65 
 62                                                    66 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php