Patch from Jeremy Chadwick:
Linux telnetd allows importing the USER envvar via telnet, while FreeBSD does not. FreeBSD, on the other hand, does allow the LOGNAME envvar. Check USER first, then LOGNAME. git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@462 db0b04b0-f4d1-0310-9a6d-de3e77497b0e
This commit is contained in:
parent
3801c41172
commit
5782235ecf
2
TODO
2
TODO
|
@ -1,3 +1,5 @@
|
|||
-inprogress-dir config option prepends the dgl-root dir, other
|
||||
config dirs do not. unify.
|
||||
-allow changing the name where the ttyrecs are saved, like
|
||||
ttyrec_fn = "%rttyrec/%n/%g/%p.ttyrec"
|
||||
-allow typing / in watching screen to search for a user
|
||||
|
|
|
@ -1847,6 +1847,14 @@ main (int argc, char** argv)
|
|||
|
||||
p = getenv("USER");
|
||||
|
||||
/* Linux telnetd allows importing the USER envvar via telnet,
|
||||
* while FreeBSD does not. FreeBSD, on the other hand, does allow
|
||||
* the LOGNAME envvar. Check USER first, then LOGNAME.
|
||||
*/
|
||||
if (p == NULL) {
|
||||
p = getenv("LOGNAME");
|
||||
}
|
||||
|
||||
if (p && *p != '\0')
|
||||
auth = strdup(p);
|
||||
/* else auth is still NULL */
|
||||
|
|
Loading…
Reference in New Issue