DNIX has a problem with seteuid() and setegid(). These routines are needed for Samba to work correctly, but they were left out of the DNIX C library for some reason.
For this reason Samba by default defines the macro NO_EID in the DNIX section of includes.h. This works around the problem in a limited way, but it is far from ideal, and some things still will not work right.
To fix the problem properly, you need to assemble the following two functions and then either add them to your C library or link them into Samba. Put the following in the file setegid.s:
.globl _setegid _setegid: moveq #47,d0 movl #100,a0 moveq #1,d1 movl 4(sp),a1 trap #9 bccs 1$ jmp cerror 1$: clrl d0 rts
Put this in the file seteuid.s:
.globl _seteuid _seteuid: moveq #47,d0 movl #100,a0 moveq #0,d1 movl 4(sp),a1 trap #9 bccs 1$ jmp cerror 1$: clrl d0 rts
After creating the above files, you then assemble them using
$ as seteuid.s $ as setegid.s
that should produce the files seteuid.o and setegid.o
Then you need to add these to the LIBSM line in the DNIX section of the Samba Makefile. Your LIBSM line will then look something like this:
LIBSM = setegid.o seteuid.o -ln
You should then remove the line:
from the DNIX section of includes.h .