Skip to content

Commit ae6d705

Browse files
committed
*-daemon: filter EINFO_ and SVCNAME variables as well
1 parent 491f463 commit ae6d705

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1044,8 +1044,11 @@ int main(int argc, char **argv)
10441044
}
10451045
#endif
10461046

1047+
unsetenv("SVCNAME");
10471048
TAILQ_FOREACH(env, env_list, entries) {
1048-
if (strncmp(env->value, "RC_", 3) == 0 || strncmp(env->value, "SSD_", 4) == 0) {
1049+
if (strncmp(env->value, "RC_", 3) == 0
1050+
|| strncmp(env->value, "SSD_", 4) == 0
1051+
|| strncmp(env->value, "EINFO_", 6) == 0) {
10491052
*strchr(env->value, '=') = '\0';
10501053
unsetenv(env->value);
10511054
}

src/supervise-daemon/supervise-daemon.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,8 +525,11 @@ RC_NORETURN static void child_process(char *exec, char **argv)
525525
}
526526
#endif
527527

528+
unsetenv("SVCNAME");
528529
TAILQ_FOREACH(env, env_list, entries) {
529-
if (strncmp(env->value, "RC_", 3) == 0 || strncmp(env->value, "SSD_", 4) == 0) {
530+
if (strncmp(env->value, "RC_", 3) == 0
531+
|| strncmp(env->value, "SSD_", 4) == 0
532+
|| strncmp(env->value, "EINFO_", 6) == 0) {
530533
*strchr(env->value, '=') = '\0';
531534
unsetenv(env->value);
532535
}

0 commit comments

Comments
 (0)