getsolus / packages

Solus Package Monorepo & Issue Tracker
64 stars 85 forks source link

ufw permissions break tab completion #3738

Closed solomongrundy6 closed 2 months ago

solomongrundy6 commented 2 months ago

Please confirm there isn't an existing open bug report

Summary

I was reporting an issue here that ufw's permissions break their tab completion. While debugging I noticed that ufw is the only file in /usr/sbin that does not have the executable bits for group/other set, which appears to be what causes the bug (at the very least, setting the permissions to rwxr-xr-x causes the bug to no longer appear). I don't know if this is intended behavior for some security reason or not, the bug is a pretty oblique edge case and doesn't necessarily need fixing but I thought I'd file an issue to bring it to someone's attention if it's unintended. I imagine it's also possible that an addition to the regular bash completion rules for ufw on Solus might also fix this without changing permissions of ufw if that is as-intended permissions.

EDIT: Additionally, after some investigation, it seems that ufw breaks normal bash tab completion on Solus as well.

Steps to reproduce

1. install ble.sh

  1. open a terminal and type ufw status - before finishing ble.sh errors pop out:
    $ ufw sbash: /usr/sbin/ufw: Permission denied
    stbash: /usr/sbin/ufw: Permission denied
    bash: /usr/sbin/ufw: Permission denied
    tabash: /usr/sbin/ufw: Permission denied
    bash: /usr/sbin/ufw: Permission denied
    bash: /usr/sbin/ufw: Permission denied
    bash: /usr/sbin/ufw: Permission denied
    atbash: /usr/sbin/ufw: Permission denied

    Type ufw stat in a bash prompt and try to tab complete. Changing permissions of /usr/sbin/ufw to add the executable bits will cause this error to no longer happen. Regular bash tab completion seems to work fine.

Expected result

tab completion with ble.sh works fine

Actual result

see steps above

Environment

Repo

Shannon (stable)

Desktop Environment

Budgie

System details

System: Host: soluspc Kernel: 6.10.6-300.current arch: x86_64 bits: 64 Desktop: Budgie v: 10.9.2 Distro: Solus 4.5 resilience Machine: Type: Desktop System: Gigabyte product: X570 AORUS ELITE WIFI v: -CF serial: Mobo: Gigabyte model: X570 AORUS ELITE WIFI v: x.x serial: UEFI: American Megatrends LLC. v: F33 date: 05/21/2021 CPU: Info: 12-core AMD Ryzen 9 5900X [MT MCP] speed (MHz): avg: 2530 min/max: 2200/3700 Graphics: Device-1: Intel DG2 [Arc A380] driver: i915 v: kernel Device-2: NVIDIA GA104 [GeForce RTX 3070] driver: vfio-pci v: N/A Display: x11 server: X.Org v: 21.1.13 with: Xwayland v: 24.1.2 driver: X: loaded: amdgpu,modesetting,nouveau unloaded: fbdev,vesa dri: radeonsi,nouveau gpu: i915 resolution: 1: 1920x1080 2: 1920x1080 API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa v: 24.1.6 renderer: Mesa Intel Arc A380 Graphics (DG2) Network: Device-1: Intel Dual Band Wireless-AC 3168NGW [Stone Peak] driver: iwlwifi Device-2: Intel I211 Gigabit Network driver: igb Device-3: Sony DualSense wireless controller (PS5) driver: playstation,snd-usb-audio,usbhid type: USB Device-4: Realtek RTL8153 Gigabit Ethernet Adapter driver: r8152 type: USB Drives: Local Storage: total: 5.05 TiB used: 3.6 TiB (71.4%) Info: Memory: total: 48 GiB available: 46.99 GiB used: 4.24 GiB (9.0%) Processes: 579 Uptime: 1h 18m Shell: Bash inxi: 3.3.35

Other comments

No response

akinomyoga commented 2 months ago

Do not click the above link. That is a virus link. Currently, that link is posted to many threads. The same type of attack happened a few days ago.

Edit: The comment was deleted by @getsolus.

solomongrundy6 commented 2 months ago

Thank you, I've reported the user, for what it's worth.