- exit (1);
-}
-
-/* After forking, set LD_PRELOAD to preload libfips-{32,64}.so within
- * child environment, then exec given arguments.
- */
-static int
-fork_exec_with_fips_preload_and_wait (char * const argv[])
-{
- pid_t pid;
- int i, status;
-
- pid = fork ();
-
- /* Child */
- if (pid == 0) {
- void *ctx = talloc_new (NULL);
- char *lib_path;
-
- lib_path = find_libfips_path (ctx, argv[0]);
-
- setenv ("LD_PRELOAD", lib_path, 1);
-
- talloc_free (ctx);
-
- execvp (argv[0], argv);
- fprintf (stderr, "Failed to execute:");
- for (i = 0; argv[i]; i++) {
- fprintf (stderr, " %s", argv[i]);
- }
- fprintf (stderr, "\n");
- exit (1);
- }