Patch #: 65 Type: operational change Priority: none Modification: make 'Network Trash Folder' mode same as parent dir. Submitted: Edward Moy Archived: munnari.OZ.AU mac/cap.patches/cap60.patch065 Application: 'cd cap60; patch -p < cap60.patches/cap60.patch065' Summary: default mode is 0707 (world write), reset to directory mode File: cap60/applications/aufs/afpos.c *** applications/aufs/afpos.c.orig Sun Nov 17 16:07:57 1991 --- applications/aufs/afpos.c Sun Nov 17 19:14:53 1991 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 1991/11/17 05:07:19 $ ! * $Header: /mac/src/cap60/applications/aufs/RCS/afpos.c,v 2.14 1991/11/17 05:07:19 djh Rel djh $ ! * $Revision: 2.14 $ */ /* --- 1,7 ---- /* ! * $Author: djh $ $Date: 1991/11/17 08:14:34 $ ! * $Header: /mac/src/cap60/applications/aufs/RCS/afpos.c,v 2.15 1991/11/17 08:14:34 djh Rel djh $ ! * $Revision: 2.15 $ */ /* *************** *** 1712,1717 **** --- 1712,1720 ---- int own,grp,err; /* owner and group ids */ DirParm *dp = &fdp->fdp_parms.dp_parms; int flags; + #ifdef NETWORKTRASH + struct stat buf; + #endif NETWORKTRASH if (fdp->fdp_dbitmap & (DP_FINFO|DP_ATTR|DP_PDOS)) OSSetFA(ipdir,fn,fdp->fdp_dbitmap,fdp); *************** *** 1748,1753 **** --- 1751,1771 ---- if (fdp->fdp_dbitmap & DP_ACCES) { u_short acc, accd; acc = accd = EtoIAccess(dp->dp_accright); + #ifdef NETWORKTRASH + /* make the Network Trash Folder the same */ + /* access mode as the parent directory */ + if (*fn == 'N') { /* if first letter is 'N' */ + if (strcmp(fn, "Network Trash Folder") == 0 + #ifndef STAT_CACHE + && stat(pathstr(ipdir),&buf) == 0 /* and stat() OK */ + #else STAT_CACHE + && OSstat(pathstr(ipdir),&buf) == 0 /* and stat() OK */ + #endif STAT_CACHE + ) + /* parent directory mode */ + acc = accd = buf.st_mode; + } + #endif NETWORKTRASH #ifdef USEDIRSETGID if (grp != usrgid) accd |= I_SETGID; *** README.orig Sun Nov 17 19:15:25 1991 --- README Sun Nov 17 19:20:53 1991 *************** *** 3,9 **** (For use with AppleTalk/Ethernet bridge) o RELEASE NOTES ! o CAP Distribution 6.0, Patch Level 64, November 1991 Introduction ------------ --- 3,9 ---- (For use with AppleTalk/Ethernet bridge) o RELEASE NOTES ! o CAP Distribution 6.0, Patch Level 65, November 1991 Introduction ------------