From: didier g. <di...@us...> - 2010-01-26 20:40:02
|
Update of /cvsroot/netatalk/netatalk/etc/afpd In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv29529 Modified Files: directory.c file.c Log Message: use the right test for file/dir invisible attribute bit modification and parent directory modification date update Index: file.c =================================================================== RCS file: /cvsroot/netatalk/netatalk/etc/afpd/file.c,v retrieving revision 1.130 retrieving revision 1.131 diff -C2 -d -r1.130 -r1.131 *** file.c 6 Jan 2010 14:05:15 -0000 1.130 --- file.c 26 Jan 2010 20:39:52 -0000 1.131 *************** *** 738,742 **** char *upath; u_char achar, *fdType, xyy[4]; /* uninitialized, OK 310105 */ ! u_int16_t ashort, bshort; u_int32_t aint; u_int32_t upriv; --- 738,742 ---- char *upath; u_char achar, *fdType, xyy[4]; /* uninitialized, OK 310105 */ ! u_int16_t ashort, bshort, oshort; u_int32_t aint; u_int32_t upriv; *************** *** 886,892 **** case FILPBIT_ATTR : ad_getattr(adp, &bshort); ! if ((bshort & htons(ATTRBIT_INVISIBLE)) != ! (ashort & htons(ATTRBIT_INVISIBLE) & htons(ATTRBIT_SETCLR)) ) ! change_parent_mdate = 1; if ( ntohs( ashort ) & ATTRBIT_SETCLR ) { bshort |= htons( ntohs( ashort ) & ~ATTRBIT_SETCLR ); --- 886,890 ---- case FILPBIT_ATTR : ad_getattr(adp, &bshort); ! oshort = bshort; if ( ntohs( ashort ) & ATTRBIT_SETCLR ) { bshort |= htons( ntohs( ashort ) & ~ATTRBIT_SETCLR ); *************** *** 894,897 **** --- 892,897 ---- bshort &= ~ashort; } + if ((bshort & htons(ATTRBIT_INVISIBLE)) != (oshort & htons(ATTRBIT_INVISIBLE))) + change_parent_mdate = 1; ad_setattr(adp, bshort); break; Index: directory.c =================================================================== RCS file: /cvsroot/netatalk/netatalk/etc/afpd/directory.c,v retrieving revision 1.130 retrieving revision 1.131 diff -C2 -d -r1.130 -r1.131 *** directory.c 26 Jan 2010 08:14:09 -0000 1.130 --- directory.c 26 Jan 2010 20:39:52 -0000 1.131 *************** *** 2026,2030 **** int cdate, bdate; int owner, group; ! u_int16_t ashort, bshort; int err = AFP_OK; int change_mdate = 0; --- 2026,2030 ---- int cdate, bdate; int owner, group; ! u_int16_t ashort, bshort, oshort; int err = AFP_OK; int change_mdate = 0; *************** *** 2182,2188 **** if (isad) { ad_getattr(&ad, &bshort); ! if ((bshort & htons(ATTRBIT_INVISIBLE)) != ! (ashort & htons(ATTRBIT_INVISIBLE) & htons(ATTRBIT_SETCLR)) ) ! change_parent_mdate = 1; if ( ntohs( ashort ) & ATTRBIT_SETCLR ) { bshort |= htons( ntohs( ashort ) & ~ATTRBIT_SETCLR ); --- 2182,2186 ---- if (isad) { ad_getattr(&ad, &bshort); ! oshort = bshort; if ( ntohs( ashort ) & ATTRBIT_SETCLR ) { bshort |= htons( ntohs( ashort ) & ~ATTRBIT_SETCLR ); *************** *** 2190,2193 **** --- 2188,2193 ---- bshort &= ~ashort; } + if ((bshort & htons(ATTRBIT_INVISIBLE)) != (oshort & htons(ATTRBIT_INVISIBLE))) + change_parent_mdate = 1; ad_setattr(&ad, bshort); } |