RE: Bug report: xfce4-sensors-plugin pollutes panel $CWD with relative chdir() in Wayland session

Fabian Nowak <[email protected]>
Newsgroups gmane.comp.desktop.xfce.devel.version4
Message-ID <[email protected]>
Hi,already done so 10 months ago: https://gitlab.xfce.org/panel-plugins/xfce4-sensors-plugin/-/commit/b515a128131d9c24aeab919ed7fd31adda9c2e38 (thanks to Gaël).It depends on your distro and update path / release to incorporate a newer version in your system.HTHFabian
-------- Ursprüngliche Nachricht --------Von: Markus Giese <[email protected]> Datum: 08.08.26  15:37  (GMT+01:00) An: [email protected], [email protected], [email protected] Betreff: Bug report: xfce4-sensors-plugin pollutes panel $CWD with relative chdir() in Wayland session Hi guys,thank you for your time in the XFCE4 project. I really love this DE for years. Now I found a serious issue. And I am too lazy to create an account and submit a regular bug report. That's why I am writing to all 3 of you at once.I am writing to report a critical bug in the xfce4-sensors-plugin (or related Xfce panel power components) that breaks the global working directory ($CWD) of the user session under XFCE Wayland session. The plugin changes the entire xfce4-panel process's working directory to "/sys/class/power_supply" and leaves it stuck there. This causes any application spawned by the panel to inherit this incorrect path. I ran an strace on the panel process during a manual refresh (`xfce4-panel -r`).The output clearly shows that the plugin performs relative chdir() calls without saving and restoring the original directory context afterwards:

4485  chdir("/sys/class/")              = 0
4485  chdir("power_supply")             = 0
4485  chdir("/sys/class/")              = 0
4485  chdir("thermal")                  = 0
4485  chdir("/proc/acpi")               = 0
4485  chdir("fan")                      = "-1" ENOENT (No such file or directory)
4485  chdir("/sys/class/")              = 0
4485  chdir("power_supply")             = 0 Because these calls happen within the panel's process/thread context, the relative pathing gets confused and the panel gets stuck inside "/sys/class/power_supply".

Could you please fix the C code of the plugin to either use absolute paths for these sysfs/procfs checks, or properly back up and restore the original CWD using fchdir()? Even the file browser starts in "/sys/class/power_supply" directory as well as all other users terminals. Thank you!

_______________________________________________
Xfce4-dev mailing list
[email protected]
https://mail.xfce.org/mailman/listinfo/xfce4-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.