Add flatstore-users
[moonshot-ui.git] / src / moonshot-futils.c
1 #ifdef HAVE_GETPWUID
2 #include <stdlib.h>
3 #include <sys/types.h>
4 #include <pwd.h>
5 #endif
6
7 const char * GetUserName()
8 {
9 #ifdef HAVE_GETPWUID
10    struct passwd *pwd = getpwuid(getuid());
11    return pwd ? pwd->pw_name : "unknown";
12 #else
13    return "unknown";
14 #endif
15 }
16
17 const char * GetFlatStoreUsersFilePath()
18 {
19    return MOONSHOT_FLATSTORE_USERS;
20 }