Bug 1193149

Summary: sensors fails to start after systemd service hardening
Product: [openSUSE] openSUSE Tumbleweed Reporter: llyyr <llyyr.public>
Component: OtherAssignee: Jean Delvare <jdelvare>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: Andreas.Stieger, jsegitz, opensuse
Version: Current   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE Tumbleweed   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 1181400    

Description llyyr 2021-11-29 05:58:57 UTC
systemd security hardening efforts cause lm_sensors.service to fail to start

```
$ systemctl status lm_sensors
× lm_sensors.service - Initialize hardware monitoring sensors
     Loaded: loaded (/usr/lib/systemd/system/lm_sensors.service; enabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Mon 2021-11-29 09:50:13 IST; 4s ago
    Process: 2205 ExecStart=/sbin/modprobe -qab $BUS_MODULES $HWMON_MODULES (code=exited, status=0/SUCCESS)
    Process: 2206 ExecStart=/usr/bin/sensors -s (code=exited, status=1/FAILURE)
   Main PID: 2206 (code=exited, status=1/FAILURE)
        CPU: 69ms
```

Commenting out the following line from lm_sensors.service makes it work again

ProtectKernelTunables=true
Comment 1 Johannes Segitz 2021-11-29 14:57:13 UTC
Thank you for the bug report. https://build.opensuse.org/request/show/934574 should fix this
Comment 2 OBSbugzilla Bot 2021-11-29 19:40:06 UTC
This is an autogenerated message for OBS integration:
This bug (1193149) was mentioned in
https://build.opensuse.org/request/show/934609 Factory / sensors
Comment 3 Arnav Singh 2021-12-11 06:00:01 UTC
This also needs to be fixed in harden_fancontrol.service.patch
because fancontrol service needs it to be able to read
hwmon devices from /sys
Comment 4 OBSbugzilla Bot 2021-12-14 11:40:03 UTC
This is an autogenerated message for OBS integration:
This bug (1193149) was mentioned in
https://build.opensuse.org/request/show/940445 Factory / sensors
Comment 5 Johannes Segitz 2023-06-23 08:23:53 UTC
should be fixed