diff options
author | Disconnect3d <dominik.b.czarnota@gmail.com> | 2020-04-13 16:27:06 +0200 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2021-02-22 16:09:32 -0600 |
commit | 0ddab761be249f54388c12f6cc8197dd01a63673 (patch) | |
tree | 8d3dbfb7c29b6d2b12973e56ddf2e45f47f4f3dd /src/rc/start-stop-daemon.c | |
parent | f5dd2f5baf1a33173c8ac47495e53d32aee834f5 (diff) |
start-stop-daemon: Fix off by ones when checking for RC_* envvars
The same as https://github.com/OpenRC/openrc/pull/361
This fixes #362.
Diffstat (limited to 'src/rc/start-stop-daemon.c')
-rw-r--r-- | src/rc/start-stop-daemon.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rc/start-stop-daemon.c b/src/rc/start-stop-daemon.c index 99e5b6a0..6bc70685 100644 --- a/src/rc/start-stop-daemon.c +++ b/src/rc/start-stop-daemon.c @@ -864,8 +864,8 @@ int main(int argc, char **argv) TAILQ_FOREACH(env, env_list, entries) { if ((strncmp(env->value, "RC_", 3) == 0 && - strncmp(env->value, "RC_SERVICE=", 10) != 0 && - strncmp(env->value, "RC_SVCNAME=", 10) != 0) || + strncmp(env->value, "RC_SERVICE=", 11) != 0 && + strncmp(env->value, "RC_SVCNAME=", 11) != 0) || strncmp(env->value, "SSD_NICELEVEL=", 14) == 0 || strncmp(env->value, "SSD_IONICELEVEL=", 16) == 0) { |