mirror of
https://github.com/gnustep/libs-ec.git
synced 2025-05-30 00:40:42 +00:00
use sudo user information
This commit is contained in:
parent
2abd00e895
commit
ad1bfa6f95
2 changed files with 14 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2022-10-05 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* EcConsole.m: Use SUDO_USER preferentially as username of person
|
||||
executing command. This is supplied when the command is run via sudo.
|
||||
|
||||
2022-07-12 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
configure.ac:
|
||||
|
@ -10,7 +15,7 @@
|
|||
|
||||
2022-07-11 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* EcConsole.m: Exit immediately after egistration with Control server
|
||||
* EcConsole.m: Exit immediately after registration with Control server
|
||||
is rejected (don't re-prompt for password before exit).
|
||||
|
||||
2022-06-17 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
|
|
@ -764,7 +764,14 @@ static NSString *originalUserName = nil;
|
|||
|
||||
- (id) initWithDefaults: (NSDictionary*)defs
|
||||
{
|
||||
ASSIGN(originalUserName, NSUserName());
|
||||
/* When executing a command using sudo, we should use the original username
|
||||
*/
|
||||
ASSIGN(originalUserName,
|
||||
[[[NSProcessInfo processInfo] environment] objectForKey: @"SUDO_USER"]);
|
||||
if (nil == originalUserName)
|
||||
{
|
||||
ASSIGN(originalUserName, NSUserName());
|
||||
}
|
||||
self = [super initWithDefaults: defs];
|
||||
if (self)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue