[318] in Info-AFS_Redistribution

home help back first fref pref prev next nref lref last post

Re: the dangers of not using unlog

daemon@ATHENA.MIT.EDU (Wallace Colyer)
Thu Sep 19 20:57:48 1991

Date: Thu, 19 Sep 1991 19:23:12 -0400 (EDT)
From: Wallace Colyer <wally+@andrew.cmu.edu>
To: Info-AFS@transarc.com, Peter Honeyman <honey@citi.umich.edu>,
In-Reply-To: <Added.YcqGe=X0Bi81IGWU97@transarc.com>

Authenticating from within a program is very easy.  All you have to do
is call the routine ka_UserAuthenticate:

           if(ka_UserAuthenticate(pwd->pw_name, /*instance*/"",
                               /*cell*/0, password, /*sepag*/1,
                               &errorstring)) {
            printf("Error authenticating: %s\n",
                     errorstring);
                                                     }


This a great routine to use if you want to create your own su or any
other program that needs to authenticate.

If you do not want another pag just replace the 1 in the setpag line with 0.

You'll need a libpath like (order is very important):


AFSLIBS =  ${LIBDIR}afs/libkauth.a ${LIBDIR}libubik.a ${LIBDIR}afs/libprot.a  \
	     ${LIBDIR}librxkad.a ${LIBDIR}librx.a ${LIBDIR}liblwp.a \
	     ${LIBDIR}afs/libauth.a   ${LIBDIR}afs/libsys.a  \
	     ${LIBDIR}librxkad.a ${LIBDIR}libdes.a \
                   ${LIBDIR}afs/libcmd.a ${LIBDIR}afs/libcom_err.a
${LIBDIR}afs/util.a


If you still want to see the code for guardian I can find a copy that is
public for you.

-Wallace

home help back first fref pref prev next nref lref last post