[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Apple IIGS Netboot Authentication



Steven Hirsch wrote:

BTW, are you finding that the file dates are not being preserved when moving things to the server? This used to work properly, but with netatalk 2.0.3, it's broken. I need to put a gun to my head and figure out what got munged.

Very annoying when things regress like this, but in all fairness I doubt the maintainers have any means for testing the A2 ProDOS support.

Quick followup to my own post. I tracked down the underlying cause for dates not being preserved. It's a one-line patch to /etc/afpd/file.c:

--- file.c.orig 2005-04-28 05:24:04.000000000 -0400
+++ file.c      2007-07-03 21:58:59.000000000 -0400
@@ -825,7 +825,7 @@
         }
         switch(  bit ) {
         case FILPBIT_ATTR :
-            change_mdate = 1;
+          /*            change_mdate = 1; */
             memcpy(&ashort, buf, sizeof( ashort ));
             buf += sizeof( ashort );
             break;


The net effect of flipping on that flag is to set the create and modify dates of the file to the current system time. I'm not clear why they feel that changing attributes should cause this - it certainly doesn't on a Unix system.

The total chain of events is that the client A2 machine makes three afp_setfilparam calls after creating and copying a file to the server.

1st:  Set PDINFO and ATTR
2nd:  Set PDINFO, CDATE, MDATE and ATTR
3rd:  Set ATTR

The last one is what causes the previously set create and modify date to be updated to current system time (in the absence of the above patch).

Can anyone shed light on why the client is making this sequence of calls? It's been a long time since I've delved into low-level detail of AFP.

Steve