You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The software\source\server\utils\kernel.py function get_kernel_messages is trying to access a file that doesn't exist on some Linux distros (all?) like Arch, Debian, and Fedora. Unfortunately, similar logs like /var/log/syslog and /var/log/kern.log have access restrictions. This is a security concern.
To Reproduce
Run poetry run 01 on any Linux distro based on Arch, Debian, Fedora.
Expected behavior
A clean boot into 01OS.
Desktop (please complete the following information):
OS: Armbian 24.2.1 (Debian) aarch64
Python Version 3.10.14
Additional context
Task exception was never retrieved
future: <Task finished name='Task-6' coro=<put_kernel_messages_into_queue() done, defined at /home/rb/projects/Open>
Traceback (most recent call last):
File "/home/rb/projects/OpenInterpreter/01/software/source/server/utils/kernel.py", line 65, in put_kernel_messag>
text = check_filtered_kernel()
File "/home/rb/projects/OpenInterpreter/01/software/source/server/utils/kernel.py", line 47, in check_filtered_ke>
messages = get_kernel_messages()
File "/home/rb/projects/OpenInterpreter/01/software/source/server/utils/kernel.py", line 23, in get_kernel_messag>
with open('/var/log/dmesg', 'r') as file:
FileNotFoundError: [Errno 2] No such file or directory: '/var/log/dmesg'
The text was updated successfully, but these errors were encountered:
To resolve quickly simply touch /var/log/dmesg, you might need elevated privileges.
The user has access to the dmesg command and can run without elevated privileges and there is also a readable /dev/kmsg file that is kernel messages but I don't know exactly why 01OS needs access or what messages it will act on.
Proposed PR solution:
Test for the existence of binary dmesg
Pipe dmesg to /tmp/dmesg
Return the path /tmp/dmesg to be used in get_kernel_messages function or None
Describe the bug
The
software\source\server\utils\kernel.py
functionget_kernel_messages
is trying to access a file that doesn't exist on some Linux distros (all?) like Arch, Debian, and Fedora. Unfortunately, similar logs like/var/log/syslog
and/var/log/kern.log
have access restrictions. This is a security concern.To Reproduce
Run
poetry run 01
on any Linux distro based on Arch, Debian, Fedora.Expected behavior
A clean boot into 01OS.
Desktop (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: