[apparmor] [PATCH] libapparmor: Fix FTBFS when secure_getenv() is not available

Tyler Hicks tyhicks at canonical.com
Thu Mar 26 21:21:56 UTC 2015


On 2015-03-26 13:43:17, Steve Beattie wrote:
> On Thu, Mar 26, 2015 at 11:04:30AM -0500, Tyler Hicks wrote:
> > Allow libapparmor to build on older systems where secure_getenv() is
> > still named __secure_getenv(). This snippet was taken from the glibc
> > wiki:
> > 
> >  https://sourceware.org/glibc/wiki/Tips_and_Tricks/secure_getenv
> > 
> > Signed-off-by: Tyler Hicks <tyhicks at canonical.com>
> 
> Acked-by: Steve Beattie <steve at nxnw.org> as-is, though it perhaps
> might make sense to hide this in an aa_secure_getenv() function,
> to keep the ifdef rats nest contained to a single source.

That is a good idea but it seems like getting the config.h
infrastructure set up, sticking this ifdef rats nest in there, and then
having all libapparmor source files automatically #include "config.h" is
the better answer since it future proofs us against making the same
mistake of introducing a new call to secure_getenv(3).

I think I'll go ahead and commit the patch as-is and then we'll do one
of the two approaches above in the short-term.

Thanks for the suggestion!

Tyler

> 
> > We need to start using a configuration header file (config.h) for things like
> > this, the recent asprintf() redefine, etc.
> > 
> >  https://www.gnu.org/software/autoconf/manual/autoconf-2.65/html_node/Configuration-Headers.html
> 
> Agreed. I'll take a look at some point.
> 
> -- 
> Steve Beattie
> <sbeattie at ubuntu.com>
> http://NxNW.org/~steve/



> -- 
> AppArmor mailing list
> AppArmor at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20150326/096462b7/attachment-0001.pgp>


More information about the AppArmor mailing list