Patch #: 82 Type: bug fix Priority: low Affects: sites using ULTRIX SECURITY with some compilers Reported: Stephane Bortzmeyer Reported: Frederic Chauveau Archived: munnari.OZ.AU mac/cap.patches/cap60.patch082 Application: 'cd cap60; patch -p < cap60.patches/cap60.patch082' Summary: rearrange code to avoid evaluation order problem File: cap60/applications/aufs/afpos.c *** applications/aufs/afpos.c.orig Sun Feb 16 02:54:38 1992 --- applications/aufs/afpos.c Sun Feb 16 19:18:43 1992 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 1992/02/15 15:54:16 $ ! * $Header: /mac/src/cap60/applications/aufs/RCS/afpos.c,v 2.17 1992/02/15 15:54:16 djh Rel djh $ ! * $Revision: 2.17 $ */ /* --- 1,7 ---- /* ! * $Author: djh $ $Date: 1992/02/16 08:18:21 $ ! * $Header: /mac/src/cap60/applications/aufs/RCS/afpos.c,v 2.18 1992/02/16 08:18:21 djh Rel djh $ ! * $Revision: 2.18 $ */ /* *************** *** 3048,3053 **** --- 3048,3054 ---- char *crypt(); #ifdef ULTRIX_SECURITY char *ultrix_crypt(); + char *crypted_password; #endif ULTRIX_SECURITY #ifdef LWSRV_AUFS_SECURITY extern char *userlogindir; *************** *** 3136,3142 **** return(aeUserNotAuth); } #ifdef ULTRIX_SECURITY ! if (strcmp(ultrix_crypt(pwd,p),p->pw_passwd) != 0) { #else ULTRIX_SECURITY if (strcmp(crypt(pwd,p->pw_passwd),p->pw_passwd) != 0) { #endif ULTRIX_SECURITY --- 3137,3145 ---- return(aeUserNotAuth); } #ifdef ULTRIX_SECURITY ! /* avoid evaluation order problem */ ! crypted_password = ultrix_crypt(pwd, p); ! if (strcmp(crypted_password, p->pw_passwd) != 0) { #else ULTRIX_SECURITY if (strcmp(crypt(pwd,p->pw_passwd),p->pw_passwd) != 0) { #endif ULTRIX_SECURITY *** README.orig Sun Feb 16 19:18:58 1992 --- README Sun Feb 16 19:19:21 1992 *************** *** 3,9 **** (For use with AppleTalk/Ethernet bridge) o RELEASE NOTES ! o CAP Distribution 6.0, Patch Level 81, February 1992 Introduction ------------ --- 3,9 ---- (For use with AppleTalk/Ethernet bridge) o RELEASE NOTES ! o CAP Distribution 6.0, Patch Level 82, February 1992 Introduction ------------