@@ -491,7 +491,7 @@ xccdf_test_result_type_t sce_engine_eval_rule(struct xccdf_policy *policy, const
491
491
env_values [env_value_count ] = env_operator_entry ;
492
492
env_value_count ++ ;
493
493
}
494
-
494
+
495
495
env_values = realloc (env_values , (env_value_count + 1 ) * sizeof (char * ));
496
496
env_values [env_value_count ] = NULL ;
497
497
@@ -507,7 +507,7 @@ xccdf_test_result_type_t sce_engine_eval_rule(struct xccdf_policy *policy, const
507
507
508
508
// FIXME: We definitely want to impose security restrictions in the forked child process in the future.
509
509
// This would prevent scripts from writing to files or deleting them.
510
-
510
+
511
511
int fork_result = fork ();
512
512
if (fork_result >= 0 )
513
513
{
@@ -519,7 +519,7 @@ xccdf_test_result_type_t sce_engine_eval_rule(struct xccdf_policy *policy, const
519
519
// we won't read from the pipes, so close the reading fd
520
520
close (stdout_pipefd [0 ]);
521
521
close (stderr_pipefd [0 ]);
522
-
522
+
523
523
// forward stdout and stderr to our custom opened pipes
524
524
dup2 (stdout_pipefd [1 ], fileno (stdout ));
525
525
dup2 (stderr_pipefd [1 ], fileno (stderr ));
@@ -547,7 +547,7 @@ xccdf_test_result_type_t sce_engine_eval_rule(struct xccdf_policy *policy, const
547
547
} else {
548
548
execve (tmp_href , argvp , env_values );
549
549
}
550
-
550
+
551
551
free_env_values (env_values , index_of_first_env_value_not_compiled_in , env_value_count );
552
552
553
553
// no need to check the return value of execve, if it returned at all we are in trouble
0 commit comments