Thanks everybody for advice. I think I have it working now,
although I was able to test only using the smbclient so far.
Here is the summary of what I did:

1. I wanted a solution where SAMBA runs on the AFS server
(along with NFS translator) but users are not allowed to log on directly
on the server (telnet, ssh) so there is no integrated login. 
We run NIS with "dummy" passwd file - user IDs are then preserved
but encrypted passwords are not stored in the NIS map. Only users on 
clients with integrated login and/or AFS-aware SSHD can login and
get into the AFS space. I did not want to violate this arangement
with SAMBA, which will be used only by W95/98 clients to avoid
W/NT client proxy setup.

2. I copied AFS headers and libraries from /usr/afsws/include and lib
into /usr/include and /usr/lib including the afs and rx subdirectories.
(Without overwriting anything!)

3. gcc was now rebuilt and reinstalled. In retrospect, this may not
be necessary if AFS headers are specified with "-I" but I originally
believed the confusion comes from gcc not being aware of the AFS
stuff.

4. SAMBA was configured with:
../configure --sysconfdir=/etc/samba --localstatedir=/var/samba --with-afs 
--with-lockdir=/var/samba

Some options, such as smb.conf directory, don't get translated correctly into
the Makefile so it needs manual tune-up anyway.

5. I added all AFS libraries to Makefile:

LIBS=-ldl -lafsauthent -lafsrpc -ldes -llwp -lrx -lrxkad -lrxstat -lubik 
-lacl -lafsadminutil -lafsint -laudit -lauth -lauth.krb -lbos -lbosadmin
-lbubasics -lbudb -lbutm -lbxdb -lcfgadmin -lclientadmin -lcmd -lcom_err 
-ldir -lfsprobe -lgtx -lkasadmin -lkauth -lkauth.krb -lnull -lprocmgmt -lprot
-lptsadmin -lsys -ltermlib -lusd -lvldb -lvolser -lvosadmin -lxstat_cm
-lxstat_fs -lpthread -lpthreads -lpthreads_compat 

CC=gcc 
CFLAGS=-O 
CPPFLAGS= -D_LARGE_FILES 
LDFLAGS= -L/usr/lib/afs /usr/afsws/lib/afs/util.a /usr/afsws/lib/afs/vlib.a
AWK=gawk  

Note that pthread libs are needed as well as the AFS stuff. This is
not the minimum working set either, I just threw everything at it.

6. Now I repeatedly tried "make" and edited the offending AFS headers 
as reported by gcc/ld . Generally, whenever rx was in conflict with rpc, I
changed rx into rpc in the header file. Only couple of files needed editing.

7. SAMBA then compiled with some warnings about duplicated function 
definitions. 

Admittedly, it's a rather brute-force method but it seems to have
worked. Of course, it would be nice if Transarc fixed their headers and
perhaps combined the libraries into fewer files.

Honza 
([EMAIL PROTECTED])

Reply via email to