This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: What does LAV_CURRENT mean backwards compatibility of LD_AUDIT interface?

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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]