Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

busybox.config: SELinux support? #544

Open
Manouchehri opened this issue Nov 5, 2016 · 9 comments
Open

busybox.config: SELinux support? #544

Manouchehri opened this issue Nov 5, 2016 · 9 comments
Labels
enhancement help wanted Help is wanted in order to solve the issue. inactive No activity in a certiain period of time.

Comments

@Manouchehri
Copy link

As someone pointed out in #termux, our busybox build doesn't support SELinux features such as ls -Z to show the security contexts of files.

Is there a reason for this, or should we change our busybox.config to optionally have SELinux support?

https://github.com/ukanth/afwall/wiki/HOWTO-Compiling-busybox#steps-for-selinux-enabled-busybox

https://github.com/ukanth/afwall/wiki/BusyBox#difference-between-selinux-and-non-selinux-busybox

@Rowdster
Copy link

Rowdster commented Jan 10, 2017

Curious to a couple of things.

  1. Did you ever get an answer to this?
  2. I oddly, randomly have a busybox with some limited selinux support. For example, it supports ls -Z. I'm not sure how I landed on this jewel, and it's not even particularly new.

On my nvidia shield TV, rooted:
BusyBox v1.21.0 (2013-07-08 16:00:47 CEST) multi-call binary.

Can you make any sense of this? http://lists.busybox.net/pipermail/buildroot/2015-June/129315.html

@Grief
Copy link

Grief commented Jan 19, 2017

There is an ls tool in coreutils package which has -Z key, however I get question marks ? for every file. Not sure where the issue is, is it a broken ls or I do something wrong though.

@ghost
Copy link

ghost commented Nov 8, 2018

@Grief ls from coreutils always has option -Z. Regardless of SELinux enabled or disabled. This is not a bug.

On my PC it has same behaviour since it is not linked with libselinux:

xeffyr@archlinux-pc-xeffyr:~/test:$ touch a b c
xeffyr@archlinux-pc-xeffyr:~/test:$ ls -Z
? a  ? b  ? c
xeffyr@archlinux-pc-xeffyr:~/test:$ ls -Z -l
итого 0
-rw------- 1 xeffyr xeffyr ? 0 ноя  8 15:42 a
-rw------- 1 xeffyr xeffyr ? 0 ноя  8 15:42 b
-rw------- 1 xeffyr xeffyr ? 0 ноя  8 15:42 c
xeffyr@archlinux-pc-xeffyr:~/test:$ ldd /bin/ls
	linux-vdso.so.1 (0x00007fffe97a0000)
	libcap.so.2 => /usr/lib/libcap.so.2 (0x00007fea43a2c000)
	libc.so.6 => /usr/lib/libc.so.6 (0x00007fea43868000)
	/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007fea43c92000)

Since Termux doesn't have SELinux support, ls -Z will not work.

@isrgish
Copy link

isrgish commented Nov 8, 2018

It does work in Termux when I use ls from /system/bin/. So that seems to show that there is support for this in Termux.

@ghost
Copy link

ghost commented Nov 8, 2018

@isrgish Did you understand what I wrote ? Of course, /system/bin/ls will work. Just linked with libselinux.so...

There no support for SELinux in termux-packages. Maybe one day it will be added.

Library libselinux.so should be built from Android's source. But no guarantee that it will work on different Android's versions.

@isrgish
Copy link

isrgish commented Nov 9, 2018

I guess then my question is when/if this will be added?

@ghost ghost added the help wanted Help is wanted in order to solve the issue. label May 6, 2020
@stale
Copy link

stale bot commented Nov 18, 2021

This issue/PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix Issue won't be fixed. label Nov 18, 2021
@Manouchehri
Copy link
Author

Any progress? =)

@stale stale bot removed the wontfix Issue won't be fixed. label Nov 18, 2021
@stale
Copy link

stale bot commented Jan 2, 2022

This issue/PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix Issue won't be fixed. label Jan 2, 2022
@stale stale bot closed this as completed Jan 16, 2022
@Grimler91 Grimler91 reopened this Jan 16, 2022
@stale stale bot removed the wontfix Issue won't be fixed. label Jan 16, 2022
@xtkoba xtkoba removed the not stale label Dec 24, 2022
@stale stale bot added the inactive No activity in a certiain period of time. label Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement help wanted Help is wanted in order to solve the issue. inactive No activity in a certiain period of time.
Projects
None yet
Development

No branches or pull requests

7 participants