This bug was never noticed, because 10.6+ uses pam, and the fallback is redundant. On 10.5 original code fails: socket.c:1224:13: error: implicit declaration of function 'getpwnam_shadow' [-Wimplicit-function-declaration] socket.c:1224:11: error: assignment to 'struct passwd *' from 'int' makes pointer from integer without a cast [-Wint-conversion] --- socket.c +++ socket.c 2025-07-22 16:54:39.000000000 +0800 @@ -1208,7 +1208,7 @@ bool ret = false; char *passwd = 0; -#ifndef _PWD_H +#ifdef _PWD_H_ struct passwd *p; #else struct spwd *p; @@ -1220,8 +1220,8 @@ if (seteuid(0) || setegid(0)) Panic(0, "\r\ncan't get root uid/gid\r\n"); -#ifndef _PWD_H - p = getpwnam_shadow(ppp->pw_name); +#ifdef _PWD_H_ + p = getpwnam(ppp->pw_name); #else p = getspnam(ppp->pw_name); #endif @@ -1235,7 +1235,7 @@ AddStr("\r\ncan't open passwd file\r\n"); return false; } -#ifndef _PWD_H +#ifdef _PWD_H_ passwd = crypt(password, p->pw_passwd); ret = (strcmp(passwd, p->pw_passwd) == 0); #else