[1025] in arla-drinkers
Re: random problems, mostly relating to dependencies on kth-krb?
daemon@ATHENA.MIT.EDU (Assar Westerlund)
Thu Jul 29 04:25:53 1999
From owner-arla-drinkers@stacken.kth.se Thu Jul 29 08:25:53 1999
Return-Path: <owner-arla-drinkers@stacken.kth.se>
Delivered-To: arla-drinkers-mtg@bloom-picayune.mit.edu
Received: (qmail 2518 invoked from network); 29 Jul 1999 08:25:52 -0000
Received: from unknown (HELO sundance.stacken.kth.se) (130.237.234.41)
by bloom-picayune.mit.edu with SMTP; 29 Jul 1999 08:25:52 -0000
Received: (from majordom@localhost)
by sundance.stacken.kth.se (8.8.8/8.8.8) id KAA00817
for arla-drinkers-list; Thu, 29 Jul 1999 10:18:54 +0200 (MET DST)
Received: from assaris.stacken.kth.se (assaris.sics.se [193.10.66.108])
by sundance.stacken.kth.se (8.8.8/8.8.8) with ESMTP id KAA00776
for <arla-drinkers@stacken.kth.se>; Thu, 29 Jul 1999 10:18:48 +0200 (MET DST)
Received: (from assar@localhost) by assaris.stacken.kth.se (8.9.3/8.7.3) id KAA42823; Thu, 29 Jul 1999 10:19:33 +0200 (CEST)
From: Assar Westerlund <assar@stacken.kth.se>
To: Ken Raeburn <raeburn@raeburn.org>
Cc: arla-drinkers@stacken.kth.se
Subject: Re: random problems, mostly relating to dependencies on kth-krb?
References: <199907131505.LAA11819@raeburn.org> <5l908jug0h.fsf@assaris.sics.se> <5lyagi96v5.fsf@assaris.sics.se> <tx13dydak5l.fsf@raeburn.org>
Mime-Version: 1.0 (generated by tm-edit 7.68)
Content-Type: multipart/mixed;
boundary="Multipart_Thu_Jul_29_10:19:32_1999-1"
Content-Transfer-Encoding: 7bit
Date: 29 Jul 1999 10:19:32 +0200
In-Reply-To: Ken Raeburn's message of "24 Jul 1999 16:05:10 -0400"
Message-ID: <5l3dy7lvfv.fsf@assaris.stacken.kth.se>
Lines: 128
X-Mailer: Gnus v5.5/Emacs 19.34
Sender: owner-arla-drinkers@stacken.kth.se
Precedence: bulk
--Multipart_Thu_Jul_29_10:19:32_1999-1
Content-Type: text/plain; charset=US-ASCII
Ken Raeburn <raeburn@raeburn.org> writes:
> I had to delete the definition of krb_principal from acl_files.c,
> because it was already defined via header files.
Ok, I should have figured that.
> In fact, the NetBSD-current libkafs sources haven't changed from the
> old libkafs that didn't define the syscall number on this OS.
I think the kafs library in NetBSD is way old and I dunno why they
haven't bothered to update to anything recent. Feel free to hit them
on the head over that :-)
> So I've installed krbafs-0.9.8 from CMU. It wasn't immediately
> obvious to me that the --with-krbafs option wants the directory
> containing the library itself, not the --prefix option passed when
> configuring krbafs.
Yeah, I think it would make more sense to point to the prefix option
instead. We should probably change it, modulo that some people will
get burned. What do you think of the appended patch to configure.in?
(It should DTRT except when directories are called something
strange...)
> Still missing, in the build for klog:
> krb_get_pw_in_tkt2
That's not needed for klog and I think it's there because that's what
kauth used. Fixed.
> krb_get_default_principal
I took the easy way out and just did getpwuid(getuid()) instead.
Patches to klog.c are at the end and commited to CVS.
/assar
--Multipart_Thu_Jul_29_10:19:32_1999-1
Content-Type: text/plain; charset=US-ASCII
Index: configure.in
===================================================================
RCS file: /afs/stacken.kth.se/src/SourceRepository/arla/configure.in,v
retrieving revision 1.294
diff -u -w -u -w -r1.294 configure.in
--- configure.in 1999/07/24 13:10:43 1.294
+++ configure.in 1999/07/29 08:09:56
@@ -520,8 +520,14 @@
export RXKAD_LIBS
MILKO_RXKAD_LIBS=`echo $RXKAD_LIBS | sed s,\.\./,\.\./\.\./,`
if test "$with_krbafs" != "no"; then
+ if test -f "${with_krbafs}/lib/libkrbafs.a"; then
+ KAFS_LIBS="-L${with_krbafs}/lib -lkrbafs"
+ elif test -f "${with_krbafs}/libkrbafs.a"; then
KAFS_LIBS="-L${with_krbafs} -lkrbafs"
else
+ AC_MSG_ERROR(didn't find any libkrbafs.a in ${with_krbafs})
+ fi
+ else
KAFS_LIBS="-L${KRB_LIB_DIR} -lkafs"
fi
RXKAD_MAKEFILE="rxkad/Makefile"
--Multipart_Thu_Jul_29_10:19:32_1999-1
Content-Type: text/plain; charset=US-ASCII
Index: appl/klog.c
===================================================================
RCS file: /afs/stacken.kth.se/src/SourceRepository/arla/appl/klog.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -w -u -w -r1.4 -r1.5
--- klog.c 1999/07/14 22:14:56 1.4
+++ klog.c 1999/07/29 08:17:28 1.5
@@ -52,7 +52,7 @@
#include <config.h>
#endif
-RCSID("$Id: klog.c,v 1.4 1999/07/14 22:14:56 assar Exp $");
+RCSID("$Id: klog.c,v 1.5 1999/07/29 08:17:28 assar Exp $");
#include "appl_locl.h"
#include "klog.h"
@@ -245,7 +245,6 @@
int get_k4_ticket(void)
{
int rc;
- des_cblock key;
int krb_lifetime;
@@ -260,9 +259,9 @@
if( (krb_lifetime > 255) || (krb_lifetime == 0) )
krb_lifetime = 255;
- rc = krb_get_pw_in_tkt2(principal, "", realm,
- KRB_TICKET_GRANTING_TICKET, realm, krb_lifetime, password, &key);
- memset (key, 0, sizeof(key));
+ rc = krb_get_pw_in_tkt(principal, "", realm,
+ KRB_TICKET_GRANTING_TICKET, realm,
+ krb_lifetime, password);
if(rc)
fprintf(stderr, "Unable to authenticate to Kerberos: %s\n",
@@ -641,13 +640,13 @@
/* Figure out the Kerberos principal we are going to use */
if (principal == NULL) {
if(princ.name[0] == '\0') {
- if(krb_get_default_principal (princ.name, princ.instance,
- princ.realm) < 0) {
+ struct passwd *pwd = getpwuid (getuid ());
+
+ if (pwd == NULL) {
fprintf(stderr, "Could not get default principal\n");
die(1);
- } else {
- principal = princ.name;
}
+ principal = pwd->pw_name;
} else {
principal = princ.name;
}
--Multipart_Thu_Jul_29_10:19:32_1999-1--