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

feat: SELinux support #952

Closed
dylanmtaylor opened this issue Apr 27, 2024 · 9 comments
Closed

feat: SELinux support #952

dylanmtaylor opened this issue Apr 27, 2024 · 9 comments

Comments

@dylanmtaylor
Copy link

ls -Z and eza -Z have very different results produced

@cafkafk
Copy link
Member

cafkafk commented Apr 27, 2024

could you describe in more detail what the differences are and how this affects your usage?

@dylanmtaylor
Copy link
Author

ls -Z:
image

eza -Z:
image

@cafkafk
Copy link
Member

cafkafk commented Apr 29, 2024

what does this look like with the -l flag? (I don't have a SELinux box to test on)

@dylanmtaylor
Copy link
Author

ls -l
image

eza -l
image

You can test on a Fedora Live ISO which has SELinux by default.

@MartinFillon
Copy link
Contributor

Hey, as per right now, -Z or security contextm is keeped behind two things, first the -l flag, and secondly xattr, they need to be enabled, they are currenty only supported on target oses:

  • linux
  • netbsd
  • macos
  • freebsd

if SELinux is a different os than those then this can be the reason why its not working. As I dont have the ability to run a SELinux os . Feel free to test and maybe debug the variable to see if its enabled in a rust basic project. code the ENABLED const is here the reason.

@dylanmtaylor
Copy link
Author

Hey, as per right now, -Z or security contextm is keeped behind two things, first the -l flag, and secondly xattr, they need to be enabled, they are currenty only supported on target oses:

* `linux`

* `netbsd`

* `macos`

* `freebsd`

if SELinux is a different os than those then this can be the reason why its not working. As I dont have the ability to run a SELinux os . Feel free to test and maybe debug the variable to see if its enabled in a rust basic project. code the ENABLED const is here the reason.

SELinux is not a different OS than Linux.

@MartinFillon
Copy link
Contributor

SELinux is not a different OS than Linux.

Ok then i think you not having the same output is due to us gatekeeping it behind -l

@shdwchn10
Copy link

shdwchn10 commented Jun 19, 2024

I use SELinux-enabled Linux system (Fedora Silverblue) and can't see SELinux labels in eza -l output.

UPD: eza -lZ works, so issue can be closed:

❯ eza -lZ            
drwxr-xr-x    - shdwchn10 unconfined_u:object_r:container_file_t:s0:c1022,c1023 11 Jun 12:03 chezmoi
drwxr-xr-x    - shdwchn10 unconfined_u:object_r:container_file_t:s0:c1022,c1023  8 Jun 12:33 eza
drwxr-xr-x    - shdwchn10 unconfined_u:object_r:container_file_t:s0:c1022,c1023 17 Jun 23:24 fzf
drwxr-xr-x    - shdwchn10 unconfined_u:object_r:container_file_t:s0:c1022,c1023  8 Jun 14:14 gum
.rw-r--r--  11k shdwchn10 unconfined_u:object_r:container_file_t:s0:c1022,c1023  8 Jun 15:39 LICENSE
drwxr-xr-x    - shdwchn10 unconfined_u:object_r:container_file_t:s0:c1022,c1023 11 Jun 11:39 nu
drwxr-xr-x    - shdwchn10 unconfined_u:object_r:container_file_t:s0:c1022,c1023 18 Jun 07:38 pueue
.rw-r--r-- 1.8k shdwchn10 unconfined_u:object_r:container_file_t:s0:c1022,c1023 18 Jun 09:40 README.md
drwxr-xr-x    - shdwchn10 unconfined_u:object_r:container_file_t:s0:c1022,c1023 18 Jun 09:17 solo2
drwxr-xr-x    - shdwchn10 unconfined_u:object_r:container_file_t:s0:c1022,c1023  8 Jun 14:28 starship
drwxr-xr-x    - shdwchn10 unconfined_u:object_r:container_file_t:s0:c1022,c1023 18 Jun 07:16 topgrade
drwxr-xr-x    - shdwchn10 unconfined_u:object_r:container_file_t:s0:c1022,c1023 17 Jun 23:24 zoxide

@cafkafk
Copy link
Member

cafkafk commented Jun 21, 2024

Okay, closing as solved :3

@cafkafk cafkafk closed this as completed Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants