X-Git-Url: https://git.xinqibao.xyz/slstatus.git/blobdiff_plain/96f3a8a54eeb3b2294ed953dad8b15349f3e2703..19343ff34385db441b5efc2e1a57cdd7fd95ec26:/components/user.c diff --git a/components/user.c b/components/user.c index ffbd945..b335dc3 100644 --- a/components/user.c +++ b/components/user.c @@ -1,6 +1,8 @@ /* See LICENSE file for copyright and license details. */ +#include #include #include +#include #include #include @@ -18,7 +20,7 @@ username(void) struct passwd *pw = getpwuid(geteuid()); if (pw == NULL) { - fprintf(stderr, "Failed to get username"); + fprintf(stderr, "getpwuid '%d': %s\n", geteuid(), strerror(errno)); return NULL; }