Commit f0223fa
rpm-loader: add errno to sendmsg error message + switch from stderr to syslog for diagnostics
The daemon's become_daemon() redirects stderr to /dev/null before
spawning the loader. Since the loader used MSG_STDERR, all its
diagnostic messages (config errors, RPM load failures, sendmsg
errors) were silently lost, making failures impossible to diagnose.
Switch to MSG_SYSLOG so messages appear in the journal as
fapolicyd-rpm-loader[PID].
Also add strerror_r(errno) to the sendmsg and recvmsg error
messages for diagnosability.1 parent 40026ed commit f0223fa
2 files changed
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
120 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
121 | 124 | | |
122 | 125 | | |
123 | 126 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
281 | | - | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
282 | 284 | | |
283 | 285 | | |
284 | 286 | | |
| |||
0 commit comments