From 2b91bad53ee63d9b8701244fa7c516d3084d0c80 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 10 Jan 2021 10:17:16 +0100 Subject: [PATCH] https://stackoverflow.com/questions/14950378 --- src/C_routines.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/C_routines.c b/src/C_routines.c index 4b07c0ee0..3d62a87c2 100644 --- a/src/C_routines.c +++ b/src/C_routines.c @@ -43,7 +43,7 @@ void gethostname_c(char hostname[], int *stat){ void getusername_c(char username[], int *stat){ - struct passwd *pw = getpwuid(geteuid()); + struct passwd *pw = getpwuid(getuid()); if(pw && strlen(pw->pw_name) <= STRLEN){ strncpy(username,pw->pw_name,STRLEN+1); *stat = 0;