[patch] Syscall auditing - move "name=" field to the end

Valdis.Kletnieks at vt.edu Valdis.Kletnieks at vt.edu
Fri Mar 18 05:57:28 UTC 2005


On Thu, 17 Mar 2005 19:30:58 GMT, David Woodhouse said:

> +		if (*p == '"' || *p == ' ' || *p < 0x20 || *p > 0x7f) {
> +			audit_log_hex(ab, string, strlen(string));
> +			return;
> +		}
> +		p++;
> +	}
> +	audit_log_format(ab, "\"%s\"", string);

Hmm.. we either get a "string" or a stream-of-hex-digits, we can identify
which it is by looking at the first byte, we can always unambiguously find
the end, and there's no ambiguous representations, plus the code is relatively
simple.  Not bad.

audit_log_hex is almost a one-liner, would probably benefit from an 'inline' or
just open-coding it.  Not sure if the inner audit_log_format() call can
be further optimized.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 226 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/linux-audit/attachments/20050318/c72f8bdf/attachment.sig>


More information about the Linux-audit mailing list