Skip to content

Commit 491f463

Browse files
committed
*-daemon: actually filter RC_/SSD_ variables
oops, inverted check Fixes: 7208da2
1 parent ec00ad7 commit 491f463

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/start-stop-daemon/start-stop-daemon.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1045,7 +1045,7 @@ int main(int argc, char **argv)
10451045
#endif
10461046

10471047
TAILQ_FOREACH(env, env_list, entries) {
1048-
if (strncmp(env->value, "RC_", 3) == 0 && strncmp(env->value, "SSD_", 4) == 0) {
1048+
if (strncmp(env->value, "RC_", 3) == 0 || strncmp(env->value, "SSD_", 4) == 0) {
10491049
*strchr(env->value, '=') = '\0';
10501050
unsetenv(env->value);
10511051
}

src/supervise-daemon/supervise-daemon.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ RC_NORETURN static void child_process(char *exec, char **argv)
526526
#endif
527527

528528
TAILQ_FOREACH(env, env_list, entries) {
529-
if (strncmp(env->value, "RC_", 3) == 0 && strncmp(env->value, "SSD_", 4) == 0) {
529+
if (strncmp(env->value, "RC_", 3) == 0 || strncmp(env->value, "SSD_", 4) == 0) {
530530
*strchr(env->value, '=') = '\0';
531531
unsetenv(env->value);
532532
}

0 commit comments

Comments
 (0)