]> skyeroc.xyz Git - dgamelaunch/commitdiff
Patch from Jeremy Chadwick:
authorPasi Kallinen <paxed@alt.org>
Sat, 26 Sep 2009 19:13:05 +0000 (19:13 +0000)
committerPasi Kallinen <paxed@alt.org>
Sat, 26 Sep 2009 19:13:05 +0000 (19:13 +0000)
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

TODO
dgamelaunch.c

diff --git a/TODO b/TODO
index 496cb80ffcf3a9c261fb993338cb8435ff1731a4..94edd3427a49c8b0143d6ff5001ccd8482cbf504 100644 (file)
--- a/TODO
+++ b/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
index ed6fddd14191f5f75f30b9ee8f3a91c19fd53a36..2ee1969ae1b343ddd0913a88b813e0c27e50511a 100644 (file)
@@ -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 */