@@ -2431,7 +2431,7 @@ CreateRestrictedProcess(char *cmd, PROCESS_INFORMATION *processInfo)
2431
2431
2432
2432
if (_CreateRestrictedToken == NULL )
2433
2433
{
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 );
2435
2435
if (Advapi32Handle != NULL )
2436
2436
FreeLibrary (Advapi32Handle );
2437
2437
return 0 ;
@@ -2440,7 +2440,7 @@ CreateRestrictedProcess(char *cmd, PROCESS_INFORMATION *processInfo)
2440
2440
/* Open the current token to use as a base for the restricted one */
2441
2441
if (!OpenProcessToken (GetCurrentProcess (), TOKEN_ALL_ACCESS , & origToken ))
2442
2442
{
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 ());
2444
2444
return 0 ;
2445
2445
}
2446
2446
@@ -2453,7 +2453,7 @@ CreateRestrictedProcess(char *cmd, PROCESS_INFORMATION *processInfo)
2453
2453
SECURITY_BUILTIN_DOMAIN_RID , DOMAIN_ALIAS_RID_POWER_USERS , 0 , 0 , 0 , 0 , 0 ,
2454
2454
0 , & dropSids [1 ].Sid ))
2455
2455
{
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 ());
2457
2457
return 0 ;
2458
2458
}
2459
2459
@@ -2472,7 +2472,7 @@ CreateRestrictedProcess(char *cmd, PROCESS_INFORMATION *processInfo)
2472
2472
2473
2473
if (!b )
2474
2474
{
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 ());
2476
2476
return 0 ;
2477
2477
}
2478
2478
@@ -2493,7 +2493,7 @@ CreateRestrictedProcess(char *cmd, PROCESS_INFORMATION *processInfo)
2493
2493
processInfo ))
2494
2494
2495
2495
{
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 ());
2497
2497
return 0 ;
2498
2498
}
2499
2499
@@ -2835,7 +2835,7 @@ main(int argc, char *argv[])
2835
2835
2836
2836
if (!CreateRestrictedProcess (cmdline , & pi ))
2837
2837
{
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 ());
2839
2839
}
2840
2840
else
2841
2841
{
@@ -2850,7 +2850,7 @@ main(int argc, char *argv[])
2850
2850
2851
2851
if (!GetExitCodeProcess (pi .hProcess , & x ))
2852
2852
{
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 ());
2854
2854
exit (1 );
2855
2855
}
2856
2856
exit (x );
0 commit comments