Skip to content

Commit d0447a1

Browse files
committed
Add some documentation about protocol detection
1 parent 870d762 commit d0447a1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

audisp/plugins/af_unix/audisp-af_unix.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,9 @@ void read_audit_record(int ifd)
397397
stop = 1;
398398
return;
399399
}
400-
if (peek[0] == 0 || peek[0] == 1)
400+
// If its string, there will be an ascii letter in the first
401+
// character. If it's binary, it will be a 1 (0 is ancient)
402+
if (peek[0] == 1 || peek[0] == 0)
401403
inbound_protocol = F_BINARY;
402404
else
403405
inbound_protocol = F_STRING;

0 commit comments

Comments
 (0)