diff options
-rw-r--r-- | kernel/auditsc.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index 2bfc64786765..738c03695b79 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c | |||
@@ -1024,7 +1024,7 @@ static int audit_log_single_execve_arg(struct audit_context *context, | |||
1024 | { | 1024 | { |
1025 | char arg_num_len_buf[12]; | 1025 | char arg_num_len_buf[12]; |
1026 | const char __user *tmp_p = p; | 1026 | const char __user *tmp_p = p; |
1027 | /* how many digits are in arg_num? 3 is the length of a=\n */ | 1027 | /* how many digits are in arg_num? 3 is the length of " a=" */ |
1028 | size_t arg_num_len = snprintf(arg_num_len_buf, 12, "%d", arg_num) + 3; | 1028 | size_t arg_num_len = snprintf(arg_num_len_buf, 12, "%d", arg_num) + 3; |
1029 | size_t len, len_left, to_send; | 1029 | size_t len, len_left, to_send; |
1030 | size_t max_execve_audit_len = MAX_EXECVE_AUDIT_LEN; | 1030 | size_t max_execve_audit_len = MAX_EXECVE_AUDIT_LEN; |
@@ -1110,7 +1110,7 @@ static int audit_log_single_execve_arg(struct audit_context *context, | |||
1110 | * so we can be sure nothing was lost. | 1110 | * so we can be sure nothing was lost. |
1111 | */ | 1111 | */ |
1112 | if ((i == 0) && (too_long)) | 1112 | if ((i == 0) && (too_long)) |
1113 | audit_log_format(*ab, "a%d_len=%zu ", arg_num, | 1113 | audit_log_format(*ab, " a%d_len=%zu", arg_num, |
1114 | has_cntl ? 2*len : len); | 1114 | has_cntl ? 2*len : len); |
1115 | 1115 | ||
1116 | /* | 1116 | /* |
@@ -1130,7 +1130,7 @@ static int audit_log_single_execve_arg(struct audit_context *context, | |||
1130 | buf[to_send] = '\0'; | 1130 | buf[to_send] = '\0'; |
1131 | 1131 | ||
1132 | /* actually log it */ | 1132 | /* actually log it */ |
1133 | audit_log_format(*ab, "a%d", arg_num); | 1133 | audit_log_format(*ab, " a%d", arg_num); |
1134 | if (too_long) | 1134 | if (too_long) |
1135 | audit_log_format(*ab, "[%d]", i); | 1135 | audit_log_format(*ab, "[%d]", i); |
1136 | audit_log_format(*ab, "="); | 1136 | audit_log_format(*ab, "="); |
@@ -1138,7 +1138,6 @@ static int audit_log_single_execve_arg(struct audit_context *context, | |||
1138 | audit_log_n_hex(*ab, buf, to_send); | 1138 | audit_log_n_hex(*ab, buf, to_send); |
1139 | else | 1139 | else |
1140 | audit_log_format(*ab, "\"%s\"", buf); | 1140 | audit_log_format(*ab, "\"%s\"", buf); |
1141 | audit_log_format(*ab, "\n"); | ||
1142 | 1141 | ||
1143 | p += to_send; | 1142 | p += to_send; |
1144 | len_left -= to_send; | 1143 | len_left -= to_send; |
@@ -1166,7 +1165,7 @@ static void audit_log_execve_info(struct audit_context *context, | |||
1166 | 1165 | ||
1167 | p = (const char __user *)axi->mm->arg_start; | 1166 | p = (const char __user *)axi->mm->arg_start; |
1168 | 1167 | ||
1169 | audit_log_format(*ab, "argc=%d ", axi->argc); | 1168 | audit_log_format(*ab, "argc=%d", axi->argc); |
1170 | 1169 | ||
1171 | /* | 1170 | /* |
1172 | * we need some kernel buffer to hold the userspace args. Just | 1171 | * we need some kernel buffer to hold the userspace args. Just |