audit: remove trailing spaces and tabs
authorZhen Lei <thunder.leizhen@huawei.com>
Wed, 9 Jun 2021 02:27:01 +0000 (10:27 +0800)
committerPaul Moore <paul@paul-moore.com>
Fri, 11 Jun 2021 00:59:05 +0000 (20:59 -0400)
Run the following command to find and remove the trailing spaces and tabs:

sed -r -i 's/[ \t]+$//' <audit_files>

The files to be checked are as follows:
kernel/audit*
include/linux/audit.h
include/uapi/linux/audit.h

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Acked-by: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
include/uapi/linux/audit.h
kernel/audit.h
kernel/auditsc.c

index cd2d827..daa4817 100644 (file)
@@ -48,7 +48,7 @@
  * 2500 - 2999 future user space (maybe integrity labels and related events)
  *
  * Messages from 1000-1199 are bi-directional. 1200-1299 & 2100 - 2999 are
- * exclusively user space. 1300-2099 is kernel --> user space 
+ * exclusively user space. 1300-2099 is kernel --> user space
  * communication.
  */
 #define AUDIT_GET              1000    /* Get status */
@@ -78,7 +78,7 @@
 #define AUDIT_LAST_USER_MSG    1199
 #define AUDIT_FIRST_USER_MSG2  2100    /* More user space messages */
 #define AUDIT_LAST_USER_MSG2   2999
+
 #define AUDIT_DAEMON_START      1200    /* Daemon startup record */
 #define AUDIT_DAEMON_END        1201    /* Daemon normal stop record */
 #define AUDIT_DAEMON_ABORT      1202    /* Daemon error stop record */
index e518ad9..b565ea1 100644 (file)
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: GPL-2.0-or-later */
-/* audit -- definition of audit_context structure and supporting types 
+/* audit -- definition of audit_context structure and supporting types
  *
  * Copyright 2003-2004 Red Hat, Inc.
  * Copyright 2005 Hewlett-Packard Development Company, L.P.
index 123f9dc..8dd73a6 100644 (file)
@@ -343,13 +343,13 @@ static int audit_compare_uid(kuid_t uid,
 {
        struct audit_names *n;
        int rc;
+
        if (name) {
                rc = audit_uid_comparator(uid, f->op, name->uid);
                if (rc)
                        return rc;
        }
+
        if (ctx) {
                list_for_each_entry(n, &ctx->names_list, list) {
                        rc = audit_uid_comparator(uid, f->op, n->uid);
@@ -367,13 +367,13 @@ static int audit_compare_gid(kgid_t gid,
 {
        struct audit_names *n;
        int rc;
+
        if (name) {
                rc = audit_gid_comparator(gid, f->op, name->gid);
                if (rc)
                        return rc;
        }
+
        if (ctx) {
                list_for_each_entry(n, &ctx->names_list, list) {
                        rc = audit_gid_comparator(gid, f->op, n->gid);