Date: Thu, 1 May 2003 18:07:37 -0700 (PDT) From: "Dorr H. Clark" <dclark@applmath.scu.edu> To: freebsd-bugs@freebsd.org Subject: fix proposal for 43674 Message-ID: <Pine.GHP.4.21.0305011806530.11932-100000@hpux47.dc.engr.scu.edu>
next in thread | raw e-mail | index | archive | help
The problem in 43674 occurs because the implementation presumes the cooperation of the user, which is normally a sub-optimal strategy for system security. If the user chooses not to cooperate, login is not aware. Our proposed fix checks whether the user has actually made the requested password change before proceeding. If they attempt the ^C exploit listed in 43674, they are prompted again. NOTE: This patch is compatible with 4.7-STABLE ! --- /usr/src/usr.bin/login/login.c Wed Mar 13 10:45:33 2002 +++ login.c Mon Apr 28 20:45:24 2003 @@ -704,12 +704,15 @@ (void)signal(SIGQUIT, SIG_DFL); (void)signal(SIGINT, SIG_DFL); (void)signal(SIGTSTP, SIG_IGN); - - if (changepass) { + while (changepass) { if (system(_PATH_CHPASS) != 0) sleepexit(1); + pwd = getpwnam(username); + if(!pwd->pw_change) + changepass = 0; + else + printf("\nSorry!Your password is expired.You have to enter a new password.\n\n"); } - /* * Login shells have a leading '-' in front of argv[0] */ Kuang-Wu "Kerwin" Hsu, engineer Dorr H. Clark, advisor COEN 284 - Operating Systems Case Study Santa Clara University, Santa Clara CA.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GHP.4.21.0305011806530.11932-100000>