This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: What does LAV_CURRENT mean backwards compatibility of LD_AUDIT interface?
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Ben Woodard <woodard at redhat dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, Roland McGrath <roland at hack dot frob dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>, Matt Legendre <legendre1 at llnl dot gov>
- Date: Fri, 27 Feb 2015 14:13:20 -0500
- Subject: Re: What does LAV_CURRENT mean backwards compatibility of LD_AUDIT interface?
- Authentication-results: sourceware.org; auth=none
- References: <54EFBC96 dot 7010608 at redhat dot com> <D662FD8B-23A9-48B9-8CB0-AA6B7C976627 at redhat dot com> <54EFEEBC dot 2010001 at redhat dot com> <3AE4DFDF-66EA-4760-94EE-19C4AE3D4E97 at redhat dot com>
On 02/27/2015 01:59 PM, Ben Woodard wrote:
> The reason that I thought a warning was appropriate was the case
> where someone for some reason had a version of sotruss-lib.c or had
> copied and pasted code from it and then glibc moved on to a new
> interface version. In other words, this was making it more overt that
> backward compatibility was the intended behavior and hopefully
> preventing something that is appropriate in a file which is part of
> glibc, not introduce a bug in some externally audit library that
> happened to be implemented beginning with a cut and paste from
> sotruss-lib.c
Understood. In which case one should write:
/* Audit interface verification. We also initialize everything if
everything checks out OK. */
unsigned int
la_version (unsigned int v)
{
if (v < LAV_CURRENT)
error (1, 0, "cannot handle interface version %u", v);
if (v > LAV_CURRENT)
warn (1, 0, "recompile for newer audit interface version %u", v);
init ();
return v;
}
Would you agree?
Cheers,
Carlos.