Skip to content

Commit 4d8cd82

Browse files
lib/audit_help.c: We don't support names that need encoding
See is_valid_name(), which reports EINVAL for any such names. Link: <#1199 (comment)> Signed-off-by: Alejandro Colomar <[email protected]>
1 parent 2e1a85e commit 4d8cd82

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

lib/audit_help.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -96,20 +96,12 @@ audit_logger_with_group(int type, const char *op, const char *name,
9696
id_t id, const char *grp_type, const char *grp,
9797
shadow_audit_result result)
9898
{
99-
int len;
100-
char enc_group[GROUP_NAME_MAX_LENGTH * 2 + 1];
101-
char buf[countof(enc_group) + 100];
99+
char buf[GROUP_NAME_MAX_LENGTH + 100];
102100

103101
if (audit_fd < 0)
104102
return;
105103

106-
len = strnlen(grp, sizeof(enc_group)/2);
107-
if (audit_value_needs_encoding(grp, len)) {
108-
SNPRINTF(buf, "%s %s=%s", op, grp_type,
109-
audit_encode_value(enc_group, grp, len));
110-
} else {
111-
SNPRINTF(buf, "%s %s=\"%s\"", op, grp_type, grp);
112-
}
104+
SNPRINTF(buf, "%s %s=\"%s\"", op, grp_type, grp);
113105

114106
audit_log_acct_message(audit_fd, type, NULL, buf, name, id,
115107
NULL, NULL, NULL, result);

0 commit comments

Comments
 (0)