@@ -1570,7 +1570,7 @@ CreateRestrictedProcess(char *cmd, PROCESS_INFORMATION *processInfo, bool as_ser
1570
1570
* NT4 doesn't have CreateRestrictedToken, so just call ordinary
1571
1571
* CreateProcess
1572
1572
*/
1573
- write_stderr (" WARNING: cannot create restricted tokens on this platform\n" );
1573
+ write_stderr (_ ( "%s: WARNING: cannot create restricted tokens on this platform\n"), progname );
1574
1574
if (Advapi32Handle != NULL )
1575
1575
FreeLibrary (Advapi32Handle );
1576
1576
return CreateProcess (NULL , cmd , NULL , NULL , FALSE, 0 , NULL , NULL , & si , processInfo );
@@ -1579,7 +1579,7 @@ CreateRestrictedProcess(char *cmd, PROCESS_INFORMATION *processInfo, bool as_ser
1579
1579
/* Open the current token to use as a base for the restricted one */
1580
1580
if (!OpenProcessToken (GetCurrentProcess (), TOKEN_ALL_ACCESS , & origToken ))
1581
1581
{
1582
- write_stderr ("Failed to open process token: %lu\n" , GetLastError ());
1582
+ write_stderr (_ ( "%s: could not open process token: %lu\n"), progname , GetLastError ());
1583
1583
return 0 ;
1584
1584
}
1585
1585
@@ -1592,7 +1592,7 @@ CreateRestrictedProcess(char *cmd, PROCESS_INFORMATION *processInfo, bool as_ser
1592
1592
SECURITY_BUILTIN_DOMAIN_RID , DOMAIN_ALIAS_RID_POWER_USERS , 0 , 0 , 0 , 0 , 0 ,
1593
1593
0 , & dropSids [1 ].Sid ))
1594
1594
{
1595
- write_stderr ("Failed to allocate SIDs: %lu\n" , GetLastError ());
1595
+ write_stderr (_ ( "%s: could not allocate SIDs: %lu\n"), progname , GetLastError ());
1596
1596
return 0 ;
1597
1597
}
1598
1598
@@ -1611,7 +1611,7 @@ CreateRestrictedProcess(char *cmd, PROCESS_INFORMATION *processInfo, bool as_ser
1611
1611
1612
1612
if (!b )
1613
1613
{
1614
- write_stderr ("Failed to create restricted token: %lu\n" , GetLastError ());
1614
+ write_stderr (_ ( "%s: could not create restricted token: %lu\n"), progname , GetLastError ());
1615
1615
return 0 ;
1616
1616
}
1617
1617
@@ -1649,7 +1649,7 @@ CreateRestrictedProcess(char *cmd, PROCESS_INFORMATION *processInfo, bool as_ser
1649
1649
* Log error if we can't get version, or if we're on WinXP/2003 or
1650
1650
* newer
1651
1651
*/
1652
- write_stderr (" WARNING: could not locate all job object functions in system API\n" );
1652
+ write_stderr (_ ( "%s: WARNING: could not locate all job object functions in system API\n"), progname );
1653
1653
}
1654
1654
else
1655
1655
{
0 commit comments