$NetBSD: patch-ap,v 1.1 2006/08/09 17:31:10 salo Exp $ Security fix for SA21402. --- appl/bsd/login.c.orig 2005-04-07 23:17:25.000000000 +0200 +++ appl/bsd/login.c 2006-08-09 18:52:53.000000000 +0200 @@ -1648,7 +1648,10 @@ int main(argc, argv) } #endif /* HAVE_SETLUID */ #ifdef _IBMR2 - setuidx(ID_LOGIN, pwd->pw_uid); + if (setuidx(ID_LOGIN, pwd->pw_uid) < 0) { + perror("setuidx"); + sleepexit(1); + }; #endif /* This call MUST succeed */