summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2020-08-14 19:26:43 -0400
committerJakob Kaivo <jkk@ung.org>2020-08-14 19:26:43 -0400
commit478e6d562e5d6fd3abb8daed7e47d78cc832a1a3 (patch)
tree14d2809a30b3ad1dfe686d0de7cbf0293aaa634e /src
parentc2930803f1f379be7cabbd9e784dc9e07ac2633b (diff)
quick and dirty implementation
Diffstat (limited to 'src')
-rw-r--r--src/unistd/getlogin.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/unistd/getlogin.c b/src/unistd/getlogin.c
index 462b5a6d..bd110395 100644
--- a/src/unistd/getlogin.c
+++ b/src/unistd/getlogin.c
@@ -1,11 +1,15 @@
#include "stddef.h"
#include "sys/types.h"
#include <unistd.h>
+#include "stdlib.h"
char * getlogin(void)
{
- return 0;
+ /* TODO: get actual controlling terminal, then read utmpx */
+
+ return getenv("LOGNAME");
}
+
/*
POSIX(1)
*/