Merge branch 'getuid-fix' into 'development'

https://stackoverflow.com/questions/14950378

See merge request damask/DAMASK!320
This commit is contained in:
Philip Eisenlohr 2021-01-12 21:21:43 +01:00
commit 715504ee53
1 changed files with 1 additions and 1 deletions

View File

@ -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;