Ticket #274: discuss-nokerberos.diff

File discuss-nokerberos.diff, 3.2 KB (added by mitchb, 12 years ago)

Patch to restore local/dumb authentication functionality requred for dsmail and running the discuss client locally

  • libds/Makefile.in

    diff -ur ./libds/Makefile.in ../debathena-discuss-10.0.8/libds/Makefile.in
    old new  
    6060        mv res_module.o res_module.k.o 
    6161 
    6262res_module.nk.o: res_module.c 
    63         ${CC} ${ALL_CFLAGS} -c res_module.c 
     63        ${CC} ${ALL_CFLAGS} -DNOKERBEROS -c res_module.c 
    6464        mv res_module.o res_module.nk.o 
    6565 
    6666auth_krb.o: 
     
    7171        mv rpcall.o rpcall.k.o 
    7272 
    7373rpcall.nk.o: 
    74         ${CC} ${ALL_CFLAGS} -c rpcall.c 
     74        ${CC} ${ALL_CFLAGS} -DNOKERBEROS -c rpcall.c 
    7575        mv rpcall.o rpcall.nk.o 
    7676 
  • libds/res_module.c

    diff -ur ./libds/res_module.c ../debathena-discuss-10.0.8/libds/res_module.c
    old new  
    3333#include <string.h> 
    3434#include <ctype.h> 
    3535 
     36#ifdef NOKERBEROS 
     37#undef HAVE_KRB4 
     38#undef HAVE_KRB5 
     39#endif /* NOKERBEROS */ 
     40 
    3641#ifdef HAVE_KRB4 
    3742#include <krb.h> 
    3843#ifndef MAX_K_NAME_SZ 
     
    289294 
    290295    retval = krb5_init_context(&context); 
    291296    if (!retval) 
    292       krb5_get_host_realm(context, primary_name, &hrealms); 
    293     if (!retval && !hrealms[0]) 
     297      retval = krb5_get_host_realm(context, primary_name, &hrealms); 
     298    if (!retval && hrealms && hrealms[0] && *(hrealms[0])) 
    294299      strcpy(krb_realm, hrealms[0]); 
    295     if (retval) 
     300    else 
    296301      strcpy(krb_realm, local_realm()); 
    297302 
    298303    if (hrealms) 
  • libds/rpcall.c

    diff -ur ./libds/rpcall.c ../debathena-discuss-10.0.8/libds/rpcall.c
    old new  
    3838#include <discuss/tfile.h> 
    3939#include "rpc.h" 
    4040#include "config.h" 
     41 
     42#ifdef NOKERBEROS 
     43#undef HAVE_KRB4 
     44#undef HAVE_KRB5 
     45#endif /* NOKERBEROS */ 
     46 
    4147#ifdef HAVE_KRB5 
    4248#include "krb5.h" 
    4349#endif /* HAVE_KRB5 */ 
  • mclient/Makefile.in

    diff -ur ./mclient/Makefile.in ../debathena-discuss-10.0.8/mclient/Makefile.in
    old new  
    6161        ${CC} ${LDFLAGS} -o pmtg pmtg.o ../ets/dsc_et.o ${KLIBS} 
    6262 
    6363dsmail: dsmail.o ../ets/dsc_et.o 
    64         ${CC} ${LDFLAGS} -o dsmail dsmail.o ../ets/dsc_et.o ${KLIBS} 
     64        ${CC} ${LDFLAGS} -o dsmail dsmail.o ../ets/dsc_et.o ${NKLIBS} 
    6565 
    6666dspipe: dspipe.o ../ets/dsc_et.o 
    6767        ${CC} ${LDFLAGS} -o dspipe dspipe.o ../ets/dsc_et.o ${KLIBS} 
  • server/Makefile.in

    diff -ur ./server/Makefile.in ../debathena-discuss-10.0.8/server/Makefile.in
    old new  
    7878        mv rpproc.o rpproc.k.o 
    7979 
    8080rpproc.nk.o: rpproc.c 
    81         ${CC} ${ALL_CFLAGS} -DSUBPROC -c rpproc.c 
     81        ${CC} ${ALL_CFLAGS} -DSUBPROC -DNOKERBEROS -c rpproc.c 
    8282        mv rpproc.o rpproc.nk.o 
    8383 
    8484rpproc.debug.o: rpproc.c 
  • server/rpproc.c

    diff -ur ./server/rpproc.c ../debathena-discuss-10.0.8/server/rpproc.c
    old new  
    2020 */ 
    2121 
    2222 
     23#ifdef NOKERBEROS 
     24#undef HAVE_KRB4 
     25#undef HAVE_KRB5 
     26#endif /* NOKERBEROS */ 
     27 
    2328#ifdef INETD 
    2429#define ASSOC 1 
    2530#endif