From 84ed570eaefcbb55b99ba425030bf7d1d1d46137 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 6 Aug 2018 14:50:41 -0700 Subject: librc: fix EACCES errno false-positive crash Use errno != EACCES to fix false-positive for non-root users with grsecurity kernels. Fixes: 37e29442721a ("librc: Add check for crashed state") This fixes #237 --- src/librc/librc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/librc') diff --git a/src/librc/librc.c b/src/librc/librc.c index 01bfac03..c38695cc 100644 --- a/src/librc/librc.c +++ b/src/librc/librc.c @@ -850,7 +850,7 @@ rc_service_state(const char *service) } if (state & RC_SERVICE_STARTED) { - if (rc_service_daemons_crashed(service)) + if (rc_service_daemons_crashed(service) && errno != EACCES) state |= RC_SERVICE_CRASHED; } if (state & RC_SERVICE_STOPPED) { -- cgit v1.2.3