[apparmor] [PATCH RFC] Add profile-based libapparmor query interface

Tyler Hicks tyhicks at canonical.com
Fri Mar 8 01:21:25 UTC 2013


On 2013-03-07 16:15:19, Seth Arnold wrote:
> On Thu, Mar 07, 2013 at 03:38:17PM -0800, Tyler Hicks wrote:
> > It sounds like we're both on the same page.
> 
> Yes. :)
> 
> > $ gcc -Wall -o query-profile query_profile.c -lapparmor
> > $ ldd query-profile 
> > 	linux-vdso.so.1 =>  (0x00007fffe41fe000)
> > 	libapparmor.so.1 => /usr/lib/libapparmor.so.1 (0x00007fcf8dfdf000)
> > 	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fcf8dc17000)
> > 	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fcf8d9f9000)
> > 	/lib64/ld-linux-x86-64.so.2 (0x00007fcf8e20d000)
> 
> Excellent example, thanks for including it.
> 
> Do we need to worry about non-pthread based threading libraries linking
> against it? (Say, a JNI shim?) (It feels fair to ask those other threading
> platforms to re-implement this routine, but it'd be nice to know about
> it up-front if possible.)

I may be misunderstanding, but as long as libpthread is available, we'll
be fine since that's what our library will be linking against. I don't
think that we currently care about running on OS'es where libpthread
is not available but the call to pthread_once() could be #ifdef'ed out
to call whatever threading library is available on that platform.

Tyler
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20130307/012678a0/attachment.pgp>


More information about the AppArmor mailing list