diff options
Diffstat (limited to 'src/util/os_installation.c')
-rw-r--r-- | src/util/os_installation.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/util/os_installation.c b/src/util/os_installation.c index 06eb4ed60..98ac7b989 100644 --- a/src/util/os_installation.c +++ b/src/util/os_installation.c | |||
@@ -741,16 +741,16 @@ GNUNET_OS_check_helper_binary (const char *binary, int check_suid, const char *p | |||
741 | char parameters[512]; | 741 | char parameters[512]; |
742 | PROCESS_INFORMATION proc; | 742 | PROCESS_INFORMATION proc; |
743 | DWORD exit_value; | 743 | DWORD exit_value; |
744 | 744 | ||
745 | GNUNET_snprintf (parameters, | 745 | GNUNET_snprintf (parameters, |
746 | sizeof (parameters), | 746 | sizeof (parameters), |
747 | "-d %s", params); | 747 | "-d %s", params); |
748 | memset (&start, 0, sizeof (start)); | 748 | memset (&start, 0, sizeof (start)); |
749 | start.cb = sizeof (start); | 749 | start.cb = sizeof (start); |
750 | memset (&proc, 0, sizeof (proc)); | 750 | memset (&proc, 0, sizeof (proc)); |
751 | 751 | ||
752 | 752 | ||
753 | // Start the child process. | 753 | // Start the child process. |
754 | if ( ! (CreateProcess( p, // current windows (2k3 and up can handle / instead of \ in paths)) | 754 | if ( ! (CreateProcess( p, // current windows (2k3 and up can handle / instead of \ in paths)) |
755 | parameters, // execute dryrun/priviliege checking mode | 755 | parameters, // execute dryrun/priviliege checking mode |
756 | NULL, // Process handle not inheritable | 756 | NULL, // Process handle not inheritable |
@@ -758,12 +758,12 @@ GNUNET_OS_check_helper_binary (const char *binary, int check_suid, const char *p | |||
758 | FALSE, // Set handle inheritance to FALSE | 758 | FALSE, // Set handle inheritance to FALSE |
759 | CREATE_DEFAULT_ERROR_MODE, // No creation flags | 759 | CREATE_DEFAULT_ERROR_MODE, // No creation flags |
760 | NULL, // Use parent's environment block | 760 | NULL, // Use parent's environment block |
761 | NULL, // Use parent's starting directory | 761 | NULL, // Use parent's starting directory |
762 | &start, // Pointer to STARTUPINFO structure | 762 | &start, // Pointer to STARTUPINFO structure |
763 | &proc ) // Pointer to PROCESS_INFORMATION structure | 763 | &proc ) // Pointer to PROCESS_INFORMATION structure |
764 | )) | 764 | )) |
765 | { | 765 | { |
766 | LOG (GNUNET_ERROR_TYPE_ERROR, | 766 | LOG (GNUNET_ERROR_TYPE_ERROR, |
767 | _("CreateProcess failed for binary %s (%d).\n"), | 767 | _("CreateProcess failed for binary %s (%d).\n"), |
768 | p, GetLastError()); | 768 | p, GetLastError()); |
769 | return GNUNET_SYSERR; | 769 | return GNUNET_SYSERR; |
@@ -771,17 +771,17 @@ GNUNET_OS_check_helper_binary (const char *binary, int check_suid, const char *p | |||
771 | 771 | ||
772 | // Wait until child process exits. | 772 | // Wait until child process exits. |
773 | WaitForSingleObject( proc.hProcess, INFINITE ); | 773 | WaitForSingleObject( proc.hProcess, INFINITE ); |
774 | 774 | ||
775 | if ( ! GetExitCodeProcess (proc.hProcess, &exit_value)){ | 775 | if ( ! GetExitCodeProcess (proc.hProcess, &exit_value)){ |
776 | LOG (GNUNET_ERROR_TYPE_ERROR, | 776 | LOG (GNUNET_ERROR_TYPE_ERROR, |
777 | _("GetExitCodeProcess failed for binary %s (%d).\n"), | 777 | _("GetExitCodeProcess failed for binary %s (%d).\n"), |
778 | p, GetLastError() ); | 778 | p, GetLastError() ); |
779 | return GNUNET_SYSERR; | 779 | return GNUNET_SYSERR; |
780 | } | 780 | } |
781 | // Close process and thread handles. | 781 | // Close process and thread handles. |
782 | CloseHandle( proc.hProcess ); | 782 | CloseHandle( proc.hProcess ); |
783 | CloseHandle( proc.hThread ); | 783 | CloseHandle( proc.hThread ); |
784 | 784 | ||
785 | if (!exit_value) | 785 | if (!exit_value) |
786 | return GNUNET_YES; | 786 | return GNUNET_YES; |
787 | #endif | 787 | #endif |