@@ -2431,7 +2431,7 @@ CreateRestrictedProcess(char *cmd, PROCESS_INFORMATION *processInfo)
24312431
24322432if (_CreateRestrictedToken == NULL )
24332433{
2434- fprintf (stderr ," WARNING: cannot create restricted tokens on this platform\n" );
2434+ fprintf (stderr ,_ ( "%s: WARNING: cannot create restricted tokens on this platform\n"), progname );
24352435if (Advapi32Handle != NULL )
24362436FreeLibrary (Advapi32Handle );
24372437return 0 ;
@@ -2440,7 +2440,7 @@ CreateRestrictedProcess(char *cmd, PROCESS_INFORMATION *processInfo)
24402440/* Open the current token to use as a base for the restricted one */
24412441if (!OpenProcessToken (GetCurrentProcess (),TOKEN_ALL_ACCESS ,& origToken ))
24422442{
2443- fprintf (stderr ,"Failed to open process token: error code %lu\n" ,GetLastError ());
2443+ fprintf (stderr ,_ ( "%s: could not open process token: error code %lu\n"), progname ,GetLastError ());
24442444return 0 ;
24452445}
24462446
@@ -2453,7 +2453,7 @@ CreateRestrictedProcess(char *cmd, PROCESS_INFORMATION *processInfo)
24532453SECURITY_BUILTIN_DOMAIN_RID ,DOMAIN_ALIAS_RID_POWER_USERS ,0 ,0 ,0 ,0 ,0 ,
245424540 ,& dropSids [1 ].Sid ))
24552455{
2456- fprintf (stderr ,"Failed to allocate SIDs: error code %lu\n" ,GetLastError ());
2456+ fprintf (stderr ,_ ( "%s: could not to allocate SIDs: error code %lu\n"), progname ,GetLastError ());
24572457return 0 ;
24582458}
24592459
@@ -2472,7 +2472,7 @@ CreateRestrictedProcess(char *cmd, PROCESS_INFORMATION *processInfo)
24722472
24732473if (!b )
24742474{
2475- fprintf (stderr ,"Failed to create restricted token: error code %lu\n" ,GetLastError ());
2475+ fprintf (stderr ,_ ( "%s: could not create restricted token: error code %lu\n"), progname ,GetLastError ());
24762476return 0 ;
24772477}
24782478
@@ -2493,7 +2493,7 @@ CreateRestrictedProcess(char *cmd, PROCESS_INFORMATION *processInfo)
24932493processInfo ))
24942494
24952495{
2496- fprintf (stderr ,"CreateProcessAsUser failed : error code %lu\n" ,GetLastError ());
2496+ fprintf (stderr ,_ ( "%s: could not start process for \"%s\" : error code %lu\n"), progname , cmd ,GetLastError ());
24972497return 0 ;
24982498}
24992499
@@ -2835,7 +2835,7 @@ main(int argc, char *argv[])
28352835
28362836if (!CreateRestrictedProcess (cmdline ,& pi ))
28372837{
2838- fprintf (stderr ,"Failed to re-exec with restricted token: error code %lu\n" ,GetLastError ());
2838+ fprintf (stderr ,_ ( "%s: could not re-exec with restricted token: error code %lu\n"), progname ,GetLastError ());
28392839}
28402840else
28412841{
@@ -2850,7 +2850,7 @@ main(int argc, char *argv[])
28502850
28512851if (!GetExitCodeProcess (pi .hProcess ,& x ))
28522852{
2853- fprintf (stderr ,"Failed to get exit code from subprocess: error code %lu\n" ,GetLastError ());
2853+ fprintf (stderr ,_ ( "%s: could not get exit code from subprocess: error code %lu\n"), progname ,GetLastError ());
28542854exit (1 );
28552855}
28562856exit (x );