Subject: bin/2839: su won't make w/Kerberos
To: None <>
From: William O Ferry <woferry@WarpDrive.RES.CMU.EDU>
List: netbsd-bugs
Date: 10/12/1996 15:00:53
>Number:         2839
>Category:       bin
>Synopsis:       su Makefile does not support compiling with Kerberos
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Oct 12 12:05:01 1996
>Originator:     William O Ferry
WarpDrive Internet Solutions
>Release:        1.2
System: NetBSD WarpDrive.RES.CMU.EDU 1.2 NetBSD 1.2 (WARPDRIVE) #0: Mon Sep 23 10:10:05 EDT 1996 woferry@WarpDrive.RES.CMU.EDU:/usr/src/sys/arch/i386/compile/WARPDRIVE i386

	su Makefile will not use -DKERBEROS while making su.c, even on a
domestic system with KERBEROS defined in /etc/mk.conf.  After fixing the
Makefile so that it does use -DKERBEROS, compile failed due to type mismatch
on krb_err_txt[].


	I'm not sure if this is the proper way to do this, or if there's a
better way.  I'm also assuming that this is okay to do, considering that this
is not in /usr/src/domestic, but straight /usr/src (but I guess there's nothing
in su.c that is non-exportable).  And since krb_err_txt is defined in krb.h,
which is included by su.c, the declaration fixed in the second diff can
probably be removed altogether.

WARPDRIVE.RES.CMU.EDU (root) /usr/src/usr.bin/su % diff -uN Makefile.orig Makefile
--- Makefile.orig  Fri Oct 13 23:25:18 1995
+++ Makefile    Sat Oct 12 14:36:37 1996
@@ -1,10 +1,16 @@
 #      from: @(#)Makefile      5.5 (Berkeley) 5/11/90
 #      $Id: Makefile,v 1.6 1994/05/24 06:52:17 deraadt Exp $
+.include <>
 PROG=  su
 BINOWN=        root
+.ifdef KERBEROS
+LDADD+= -lkrb -ldes
 LDADD+= -lcrypt -lskey

WARPDRIVE.RES.CMU.EDU (root) /usr/src/usr.bin/su % diff -uN su.c.orig su.c
--- su.c.orig      Fri Oct 13 23:25:22 1995
+++ su.c        Sat Oct 12 14:33:51 1996
@@ -311,7 +314,7 @@
        char *username, *user;
        int uid;
-       extern char *krb_err_txt[];
+       extern const char *krb_err_txt[];
        KTEXT_ST ticket;
        AUTH_DAT authdata;
        struct hostent *hp;