[2885] in Release_Engineering
quota patch
daemon@ATHENA.MIT.EDU (Richard Basch)
Tue Jun 23 22:28:35 1992
Date: Tue, 23 Jun 92 22:28:13 -0400
To: testers@Athena.MIT.EDU, rel-eng@Athena.MIT.EDU
From: "Richard Basch" <basch@MIT.EDU>
Sorry about this... In my previous testing, it appeared that the
previous change was working, but it turns out to be incorrect. access()
uses the REAL uid/gid, not the EFFECTIVE uid/gid, like every other file
operation. Since this is high visibility, it should probably be
applied.
Sorry...
-R
*** /tmp/,RCSt1022708 Tue Jun 23 22:25:35 1992
--- quota.c Tue Jun 23 22:25:07 1992
***************
*** 505,524 ****
return 0;
for(i=0; i<atp->nowners; i++)
! if (atp->owners[i] == id) {
! #ifdef _IBMR2
! setuidx(ID_EFFECTIVE, getuidx(ID_REAL));
! #else
! setreuid(geteuid(), getuid());
! #endif
! status = (access(dir, W_OK) == 0);
! #ifdef _IBMR2
! setuidx(ID_EFFECTIVE, getuidx(ID_SAVED));
! #else
! setreuid(geteuid(), getuid());
! #endif
! return status;
! }
return 0;
}
--- 505,512 ----
return 0;
for(i=0; i<atp->nowners; i++)
! if (atp->owners[i] == id)
! return (access(dir, W_OK) == 0);
return 0;
}