Hi,

I want to check file capabilities on a device. I can easily do that in 
Linux by using the capability API defined in the libcap2 package.

I want to list down all the capabilities associated with a file and a 
process. The calls to cap_get_file() and cap_get_proc() gives us the 
required capability listing.

How do we do the same calls on an Android device via an NDK App? We tried a 
sample app linking to sys/capability.h and did an ndk-build. It fails with 
the error:

C:\d_drv\android-ndk-r9-windows-x86_64\android-ndk-r9\samples\xyz>ndk-build

Gdbserver: [x86-4.6] libs/x86/gdbserver

Gdbsetup: libs/x86/gdb.setup

"Compile++ x86  : xyz <= cap-set.cpp

jni/cap-set.cpp:7:28: fatal error: sys/capability.h: No such file or 
directory

compilation terminated.

make: *** [obj/local/x86/objs-debug/xyz/cap-set.o] Error 1

Thank you for the help.

-- 
You received this message because you are subscribed to the Google Groups 
"Android Security Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/android-security-discuss.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to