• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

Doctorin' the Tardis (and Timelord): The Revived AppleTalk Time Server

slipperygrey

Well-known member
I found something that seems to work. The only drawback is that unlike tm->tm_gmtoff, the timezone variable does not accommodate for DST.

C:
diff --git a/contrib/timelord/timelord.c b/contrib/timelord/timelord.c
index 572d6555..6b0f01a2 100644
--- a/contrib/timelord/timelord.c
+++ b/contrib/timelord/timelord.c
@@ -243,7 +243,11 @@ int main( int ac, char **av )
             exit( 1 );
             }

-            mtime = tv.tv_sec + EPOCH + tm->tm_gmtoff;
+#if defined (HAVE_STRUCT_TM_GMTOFF)
+                       mtime = tv.tv_sec + EPOCH + tm->tm_gmtoff;
+#else /* HAVE_STRUCT_TM_GMTOFF */
+                       mtime = tv.tv_sec + EPOCH - timezone;
+#endif /* HAVE_STRUCT_TM_GMTOFF */
         }
         else {
             if (( tm = gmtime( &tv.tv_sec )) == 0 ) {

 

NJRoadfan

Well-known member
I figure I'd ask here. Has anyone gotten tardis to communicate with timelord (either the original cdev or netatalk daemon) on a network with an AppleTalk zone applied to it? It works fine if you don't have any routers on the network (you are in the "*" zone). Tried with both netatalk's atalkd in router mode and with a Shiva FastPath present on the network.
 

cheesestraws

Well-known member
Has anyone gotten tardis to communicate with timelord (either the original cdev or netatalk daemon) on a network with an AppleTalk zone applied to it

Vague memory here: I think that doing 'set time' interactively from the Chooser works but the INIT part of the code doesn't? So you have to do it manually :\. This is with Apple Internet Router doing routing. I may be misremembering though... But I've definitely used this to set the time on LT boxes from a netatalk machine on Ethernet.
 

robin-fo

Well-known member
I figure I'd ask here. Has anyone gotten tardis to communicate with timelord (either the original cdev or netatalk daemon) on a network with an AppleTalk zone applied to it? It works fine if you don't have any routers on the network (you are in the "*" zone). Tried with both netatalk's atalkd in router mode and with a Shiva FastPath present on the network.
There *are* issues concerning this in the Tardis chooser extension. Attach Wireshark to your network and you might see parts of the chooser binary or resource fork popping up in the zone field of NBP requests. At least this is how I remember it…
 

NJRoadfan

Well-known member
I suspect a buffer overrun when there is a zone name involved. How did this go unnoticed for several versions of the extension?
 

slipperygrey

Well-known member
Oh dear, that is quite the nasty bug.

FWIW I reached out to the University of Melbourne last year inquiring about releasing their AppleTalk software under a permissive license, but they never got back to me unfortunately. It's probably a long shot that they're sitting on the original Mac source code but I thought it was worth a shot.

Anyone here has connections at this or other Australian universities who can perhaps work their network to get attention from administration?
 

robin-fo

Well-known member
There *are* issues concerning this in the Tardis chooser extension. Attach Wireshark to your network and you might see parts of the chooser binary or resource fork popping up in the zone field of NBP requests. At least this is how I remember it…
I must admit that I wasn‘t able to reproduce this yesterday, except with a system where some related files were apparently corrupted. I didn‘t try with Netatalk as router though..

@NJRoadfan Could you capture your network traffic for us to analyse?
 

halkyardo

Well-known member
I suspect a buffer overrun when there is a zone name involved. How did this go unnoticed for several versions of the extension?
Just saw this thread crop up, and I'm chiming in to say that I can reproduce this reliably on my network too. At one point I investigated a little and if I remember right, the bogus zone name was coming from the 'STR ' -4066 resource inside the Tardis extension that was supposed to be reserved for use by the Chooser. If I changed the string in there to my zone name, it worked.

From memory, I got as far as figuring out that if that 'STR ' -4066 wasn't present, it would create it with the correct zone name, but once it existed, it would never get updated and that zone name would become "permanent," so clearly something's not quite right there.

I ended up stopping using it just because I finally replaced my SE's missing soldered-in battery with a replaceable one and didn't really have a need for it, but if it's something that other people are also running into, I might poke at it some more.

And a last resort, the protocol is so simple I'm sure it wouldn't be that hard to just reimplement the Mac side of it lock, stock and barrel!
 

mousehouse

Active member
Hi all,

I'm trying to get Tardis installed on my SE but no luck. The file does not have the correct resource info - even if I bring the ZIP file over, fix the type to PACT/CPCT and expand I get errors (file corrupt).

Must be something trivial, tips?
 

cheesestraws

Well-known member
Hi all,

I'm trying to get Tardis installed on my SE but no luck. The file does not have the correct resource info - even if I bring the ZIP file over, fix the type to PACT/CPCT and expand I get errors (file corrupt).

Must be something trivial, tips?

You need to unzip the file on a modern machine first not just transfer it. It's a compact pro file inside a zip which is silly but at the time I posted it the forum had a restricted allowed set of file types
 

mousehouse

Active member
Thanks. Tried that and moved the compact-pro file to the Mac, but no luck. Any chance I can pull the executable from somewhere else like an existing harddisk image, etc.?
 

slipperygrey

Well-known member
You can also go back to the source: the University of Melbourne FTP server is still online after all these years: ftp://munnari.oz.au/mac/
 

mousehouse

Active member
Awesome, that did it!

Expanded using Stuffit, moved the extension to Extensions and the application to Control Panels and immediately got a working timesync.

Maybe someone can put this one on MacintoshGarden as well for future fun?
 
Top