Discussion:
[Xquartz-dev] getlogin() returns wrong user
Richard Tobin
2017-06-01 12:01:46 UTC
Permalink
On several occasions - but this is the first when I've had time to
look into it - the first few xterms opened in a new session
have been returning the wrong username from getlogin():

getuid() -> 26013 (correct)
getpwuid(getuid()) -> richard (correct)
getlogin() -> _spotlight (wrong)

The terminal ownership is right:

macaroni$ tty
/dev/ttys001

macaroni$ ls -l /dev/ttys001
crw--w---- 1 richard tty 16, 1 Jun 1 12:58 /dev/ttys001

The xterms are run with "xterm -ls".

Any suggestions as to what to look for?

-- Richard
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
Jeremy Huddleston Sequoia
2017-06-02 03:14:21 UTC
Permalink
Seems quite odd to me. Please file a radar at http://bugreport.apple.com, and let me know the number, so I can CC myself. Make sure you include a sysdiagnose and reproduction steps.
Post by Richard Tobin
On several occasions - but this is the first when I've had time to
look into it - the first few xterms opened in a new session
getuid() -> 26013 (correct)
getpwuid(getuid()) -> richard (correct)
getlogin() -> _spotlight (wrong)
macaroni$ tty
/dev/ttys001
macaroni$ ls -l /dev/ttys001
crw--w---- 1 richard tty 16, 1 Jun 1 12:58 /dev/ttys001
The xterms are run with "xterm -ls".
Any suggestions as to what to look for?
-- Richard
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
_______________________________________________
Xquartz-dev mailing list
https://lists.macosforge.org/mailman/listinfo/xquartz-dev
Loading...