Subject: Re: Netatalk library problems.
To: None <PORT-MACPPC@NETBSD.ORG>
From: Roger Ivie <IVIE@cc.usu.edu>
List: port-macppc
Date: 12/20/1999 15:37:31
>I assume this is with the packaged netatalk?
>
>Roger, you mentioned you'd seen a fix for this in FreeBSD? Could you tell
>me what it was?

Well, since the latest release of netatalk doesn't do UAMs, it's got
to be with one of the pre-releases. In my case, I've been playing with
pre-asun2.1.4-35. Someone a few weeks ago mentioned pre-asun2.1.4-36,
but I haven't come across it yet; the latest I've seen is pre-asun2.1.4-35.

In netatalk-1.4b2+asun2.1.4/sys/freebsd/Makefile, uncomment the line which
reads 

#LDFLAGS_EXPORT=-Wl,-E

and rebuild it. That fixed it for me on FreeBSD 3.2-RELEASE. I had no
trouble building it as distributed for x86 NetBSD, but I've not succeeded
in getting any other NetBSD port up far enough to play with it (all my spare
Macs are beige G3s that give CLAIM FAILED or B&W G3s on which I have only 
one hard disk and can't dedicate the machine to NetBSD; my spare VAX is
a 3100 with only 4MB of RAM, I've had little success with my other machines
and my trusty MicroVAX II is currently in a state of disrepair), so I can't
vouch for building it under any other port.

There is a bit of a nasty bug that I found in -35 and reported to Asun. If
there is a -36 it should be fixed. If you open a file for read access to
which you have read/write privileges,  afpd never closes the file.
The problem is in etc/afpd/fork.c function afp_openfork under the
switch(errno) at case ENOENT. Rewrite the condition of the if statement
so it doesn't call ad_open twice in this case and you should be set; I've
had no problems with -35 since then.

Roger Ivie
ivie@cc.usu.edu