librc: fix EACCES errno false-positive crash

Use errno != EACCES to fix false-positive for non-root users
with grsecurity kernels.

Fixes: 37e2944272 ("librc: Add check for crashed state")
This fixes #237
This commit is contained in:
Zac Medico 2018-08-06 14:50:41 -07:00 committed by William Hubbs
parent 2eea73bfd5
commit 84ed570eae

View File

@ -850,7 +850,7 @@ rc_service_state(const char *service)
} }
if (state & RC_SERVICE_STARTED) { if (state & RC_SERVICE_STARTED) {
if (rc_service_daemons_crashed(service)) if (rc_service_daemons_crashed(service) && errno != EACCES)
state |= RC_SERVICE_CRASHED; state |= RC_SERVICE_CRASHED;
} }
if (state & RC_SERVICE_STOPPED) { if (state & RC_SERVICE_STOPPED) {