-
Notifications
You must be signed in to change notification settings - Fork 104
Open
Description
STR:
- Follow the build instructions from the README to build on a Linux system:
autoreconf -i
./configure
make
sudo cp ./seinfo ./sesearch ./sepolicy-inject /usr/local/bin # optional
The result is successful.
Then, using a sepolicy
file from unpacked Android boot.img:
- Test to inject a policy as described in the README:
$ sepolicy-inject -s vdc -t devpts -c chr_file -p read,write -P sepolicy -o sepolicy2
(Android M policy compatibility mode)
libsepol.policydb_index_others: security: 1 users, 2 roles, 577 types, 0 bools
libsepol.policydb_index_others: security: 1 sens, 1024 cats
libsepol.policydb_index_others: security: 87 classes, 5374 rules, 0 cond rules
Success
So, this works.
Now, I want to create a new context. For the sake of testing I name it tezzzt
:
- Run this command
$ sepolicy-inject -s tezzzt -t devpts -c chr_file -p read,write -P sepolicy -o sepolicy2
(Android M policy compatibility mode)
libsepol.policydb_index_others: security: 1 users, 2 roles, 577 types, 0 bools
libsepol.policydb_index_others: security: 1 sens, 1024 cats
libsepol.policydb_index_others: security: 87 classes, 5374 rules, 0 cond rules
type tezzzt does not exist, creating
Segmentation fault (core dumped)
The problem:
seplicy-inject
says it is creating the non-existing source context but for some reason this ends up with a segmentation fault. I have no clue how to fix this and how to create a new context in the sepolicy
.
Please advise.
Metadata
Metadata
Assignees
Labels
No labels