Re: [PATCH 1/1] selinux-testsuite: Update binder test applications

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 11, 2019 at 6:07 PM Paul Moore <paul@xxxxxxxxxxxxxx> wrote:
> On the negative side I realized when playing with your test changes
> that I wasn't building BINDERFS in my test kernels - oops.  I'm fixing
> that now, but I might not get a chance to do another test until
> tomorrow; at least I can verify that your BINDERFS testing logic works
> :)

I rebuilt my test kernel (the latest "secnext" builds have it) with
BINDERFS only to realize that Fedora Rawhide doesn't seem to ship
/usr/include/linux/android/binderfs.h so I manually copied the file
from the kernel-devel package only to run into this when building the
new binder tests:

# make
cc -DHAVE_BINDERFS    check_binder.c binder_common.c binder_common.h
-lselinux -lrt -o check_binder
binder_common.c: In function ‘cmd_name’:
binder_common.c:35:7: error: ‘BR_TRANSACTION_SEC_CTX’ undeclared (first use in t
his function); did you mean ‘BC_TRANSACTION_SG’?
  35 |  case BR_TRANSACTION_SEC_CTX:
     |       ^~~~~~~~~~~~~~~~~~~~~~
     |       BC_TRANSACTION_SG
binder_common.c:35:7: note: each undeclared identifier is reported only once for
each function it appears in
binder_common.c: In function ‘print_trans_data’:
binder_common.c:126:23: error: ‘FLAT_BINDER_FLAG_TXN_SECURITY_CTX’ undeclared (f
irst use in this function)
 126 |          obj->flags & FLAT_BINDER_FLAG_TXN_SECURITY_CTX ? "YES" : "NO");
     |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [<builtin>: check_binder] Error 1
# grep "BR_TRANSACTION_SEC_CTX" *
binder_common.c:        case BR_TRANSACTION_SEC_CTX:
binder_common.c:                return "BR_TRANSACTION_SEC_CTX";
service_provider.c:             case BR_TRANSACTION_SEC_CTX: {
# grep "BR_TRANSACTION_SEC_CTX" /usr/include/linux/android/binderfs.h
# grep "BR_TRANSACTION_SEC_CTX" /usr/include/linux/android/binder.h

... and that's when I stopped playing with this.  If it helps, I
pulled my binderfs.h file from a current Rawhide kernel.  What are you
using to run these tests?

At the very least, I'm thinking we'll also want to include some notes
in the README.md file under the "Optional Prerequisites" section about
how to get this running with BINDERFS.

--
paul moore
www.paul-moore.com




[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux