update patches

This commit is contained in:
Mario Fetka
2011-11-14 19:58:21 +01:00
parent 53086a5b03
commit be2d60525a
18 changed files with 183 additions and 64 deletions

View File

@@ -23,7 +23,9 @@
* mst:01-Jun-00: removed SIG_SEGV in get_eff_rights_by_trustees(),
* when stat error
* mst:01-Sep-00: pcz:added real unix rights patch from Przemyslaw Czerpak
*
* mst:07-Sep-00: corrected trustee rights of subdirs.
* mst:07-Oct-00: corrected result from tru_eff_rights_exists()
* and un_nw_rights().
*
*/
@@ -101,6 +103,9 @@ static int un_nw_rights(int voloptions, uint8 *unixname, struct stat *stb)
norights |= TRUSTEE_E; /* no erase right */
norights |= TRUSTEE_M; /* no modify rights */
}
/* mst:07-Oct-00 */
if ( (!is_dir) && !(accp & R_OK) )
norights |= TRUSTEE_F; /* no file scan rights */
}
if (voloptions & VOL_OPTION_READONLY) {
@@ -739,7 +744,9 @@ static int insert_ugid_trustee(IDS_TRUSTEE *ugid_trustees, int count,
{
while (count--) {
if (ugid_trustees->id==id) {
ugid_trustees->trustee|=trustee;
/* ugid_trustees->trustee|=trustee; wrong */
ugid_trustees->trustee = trustee; /* correct, mst:07-Sep-00 */
/* new trustees must always override the current one */
return(0);
}
ugid_trustees++;
@@ -942,7 +949,13 @@ int tru_eff_rights_exists(int volume, uint8 *unixname, struct stat *stb,
if ((lookfor == TRUSTEE_T) && (rights&TRUSTEE_F) ) /* mst: 13-Apr-00 */
return(0);
return(((rights & TRUSTEE_S)||((rights&lookfor)==lookfor)) ? 0 : -1);
/* return(((rights & TRUSTEE_S)||((rights&lookfor)==lookfor)) ? 0 : -1);*/
if (rights) {
/* mst: 07-Oct-00, -1 as result was bad, because nw_search_file_dir()
* expected the real rights.
*/
return(((rights & TRUSTEE_S)||((rights&lookfor)==lookfor)) ? 0 : rights);
} else return(1 << 31); // no rights
}