From cb2b3be3ad4eeaa1f510261d7640116d72c855e6 Mon Sep 17 00:00:00 2001 From: bebbo Date: Wed, 21 May 2025 20:33:44 +0200 Subject: [PATCH] don't use the UserGroup library if not loaded --- sources/socket/unistd/getpwent.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/socket/unistd/getpwent.c b/sources/socket/unistd/getpwent.c index f21d825..b1a4c48 100644 --- a/sources/socket/unistd/getpwent.c +++ b/sources/socket/unistd/getpwent.c @@ -249,6 +249,8 @@ struct passwd *getpwuid(uid_t uid) /* Don't do this if uid == -2 (nobody2) */ /* This happens when someone doesn't use AmiTCP's login */ if (uid != (uid_t)-2) { + if (!USERGROUP_BASE_NAME) + return 0; if ((pwd=__TCP2InetPwd(UG_getpwuid(uid),lss)) == NULL) errno = ug_GetErr(); return pwd;